Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    How to properly use OpenSSL for local validation

    Cinema 4D SDK
    c++ r21
    4
    5
    802
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sean
      last edited by sean

      Hello, I'm writing a local verification signature for Openssl for my plug-in.These functional modules are tested independently, but oddly enough, once compiled with the plug-in's source code, the compiled xdl64 file is not loaded by C4D, even if the plug-in's code does not call these openssl functions.That is, as long as the files are in the plug-in's project folder, C4D cannot load the plug-in.Unless I annotate the Openssl code.

      BIO *bio = BIO_new_file(PUBKEYPATH, "rb");
          if (bio == nullptr)
          {
              std::cout << "The public key file read failed!!!\n";
          }
      
      EC_KEY *ec_key = PEM_read_bio_EC_PUBKEY(bio, NULL, NULL, NULL);
      
      1 Reply Last reply Reply Quote 0
      • kbarK
        kbar
        last edited by kbar

        Your dlls for OpenSSL will need to be compiled with the same version of visual studio using the same runtime. Then you will need to place these in the res\libs\win64 of your plugin for windows. OSX has a similar folder. Note that you will have to compile it for yourself on OSX as well now since I believe it has been removed from the default installation for OSX in Catalina. Alternatively you could look at using libcurl (depending on what you are doing), since for windows you can compile a static lib that uses WinSSL, and libcurl is still included with OSX.

        https://www.gamelogicdesign.com
        https://www.plugins4d.com

        S 1 Reply Last reply Reply Quote 0
        • ManuelM
          Manuel
          last edited by

          Hello,

          Is there anything on your console ? see this page on how to launch cinema4D with a debug console.

          thanks @kbar for the suggestions.

          Cheers,
          Manuel

          MAXON SDK Specialist

          MAXON Registered Developer

          1 Reply Last reply Reply Quote 0
          • S
            sean @kbar
            last edited by sean

            @kbar
            Thank you very much for your help!!!

            According to your prompt, I directly copy the OpenSSL compiled by vcpkg to../res/libs/win64, now C4D can load my plug-in.

            Cheers,
            Sean.

            1 Reply Last reply Reply Quote 0
            • S
              s_bach
              last edited by

              Just FYI: you find that information regarding ./res/libs/win64 in the documentation: Development for Microsoft Window

              MAXON SDK Specialist

              Development Blog, MAXON Registered Developer

              1 Reply Last reply Reply Quote 0
              • First post
                Last post