On Mon, Mar 30, 2015 at 03:05:04AM +0000, K V wrote: > EVP_PKEY_t *pkey_m; > ... > DSA *keypair; // Also contains other stuff > ... > if (0 == X509_set_pubkey(x509, keypair.pkey_m)) > LOG_OpenSSL("Cannot set keypair"); That second argument can't be "keypair.pkey_m"? That won't even compile. The keypair variable is a pointer not a structure. What's the actual code? Make sure your source actually matches your binaries. -- Viktor.