I have old code that was written to reference the old version of openssl. Part of this code loads the key from the PEM file and tries to figure out if this key is a private or public key using the following code:
if( (prv->p==0 || prv->q==0) ) {
throw error("No private key for decryption");
}
With the latest version of openssl, this (justifiably) does not compile:
crypto.cpp: In function ‘key* decrypt_header(file_t, RSA*)’:
crypto.cpp:158:13: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
if( (prv->p==0 || prv->q==0) ) {
^~
I understand that direct access to private members of the structure has been replaced by a function, but I find it difficult to determine which function is.
source
share