SHARE
TWEET

Untitled

a guest Jun 25th, 2019 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <openssl/crypto.h>
  2. #include <openssl/evp.h>
  3.  
  4. #pragma message "Compile time OpenSSL: " OPENSSL_VERSION_TEXT
  5.  
  6. #if OPENSSL_VERSION_NUMBER < 0x010100000
  7.     /* before 1.1.0 `OpenSSL_version` was `SSLeay_version` */
  8. #   define OpenSSL_version SSLeay_version
  9. #   define OPENSSL_VERSION SSLEAY_VERSION
  10. #endif
  11.  
  12. #include <stdio.h>
  13.  
  14. int main(void)
  15. {
  16.         EVP_PKEY_ASN1_METHOD *meth = NULL;
  17.         printf("runtime OpenSSL version: %s\n", OpenSSL_version(OPENSSL_VERSION));
  18.  
  19.  
  20.         meth = EVP_PKEY_asn1_new(NID_undef, 0, "pem_str", "info");
  21.         if (meth == NULL) {
  22.                 fprintf(stderr, "EVP_PKEY_ans1_new() returned NULL\n");
  23.         }
  24.         else {
  25.                 EVP_PKEY_asn1_set_item(meth, NULL, NULL);
  26.         }
  27.  
  28.         printf("%p\n", EVP_PKEY_asn1_set_item);
  29.  
  30.         return 0;
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top