Last active
June 13, 2019 19:56
-
-
Save romen/b95e99b3563a8ba4c27d88512c7932ff to your computer and use it in GitHub Desktop.
Minimal working example for Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1763870
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <openssl/crypto.h> | |
#include <openssl/evp.h> | |
#pragma message "Compile time OpenSSL: " OPENSSL_VERSION_TEXT | |
#if OPENSSL_VERSION_NUMBER < 0x010100000 | |
/* before 1.1.0 `OpenSSL_version` was `SSLeay_version` */ | |
# define OpenSSL_version SSLeay_version | |
# define OPENSSL_VERSION SSLEAY_VERSION | |
#endif | |
#include <stdio.h> | |
int main(void) | |
{ | |
EVP_PKEY_ASN1_METHOD *meth = NULL; | |
printf("runtime OpenSSL version: %s\n", OpenSSL_version(OPENSSL_VERSION)); | |
meth = EVP_PKEY_asn1_new(NID_undef, 0, "pem_str", "info"); | |
if (meth == NULL) { | |
fprintf(stderr, "EVP_PKEY_ans1_new() returned NULL\n"); | |
} | |
else { | |
EVP_PKEY_asn1_set_item(meth, NULL, NULL); | |
} | |
printf("%p\n", EVP_PKEY_asn1_set_item); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On a vanilla
ubuntu:xenial
Docker container (after installingbuild-essentials
andlibssl-dev
):Compilation succeeds but linking fails, because the
EVP_PKEY_asn1_set_item
symbol has been masked by package mantainers