fixed openssl RSA private key encoding
This commit is contained in:
@@ -232,7 +232,7 @@ static bool get_encoding(private_openssl_rsa_private_key_t *this,
|
||||
bool success;
|
||||
u_char *p;
|
||||
|
||||
if (!this->engine)
|
||||
if (this->engine)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -240,7 +240,7 @@ static bool get_encoding(private_openssl_rsa_private_key_t *this,
|
||||
p = enc.ptr;
|
||||
i2d_RSAPrivateKey(this->rsa, &p);
|
||||
success = lib->encoding->encode(lib->encoding, type, NULL, encoding,
|
||||
KEY_PART_RSA_PUB_ASN1_DER, enc, KEY_PART_END);
|
||||
KEY_PART_RSA_PRIV_ASN1_DER, enc, KEY_PART_END);
|
||||
free(enc.ptr);
|
||||
return success;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user