Decrypt generic EVP private key

Why PKCS#8?
This commit is contained in:
Davide De Rosa 2019-04-27 10:45:55 +02:00
parent e0c06ece18
commit a48bcc7261
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ int TLSBoxVerifyPeer(int ok, X509_STORE_CTX *ctx) {
+ (NSString *)decryptedKeyFromPrivateKey:(EVP_PKEY *)evpKey error:(NSError * _Nullable __autoreleasing *)error
{
BIO *output = BIO_new(BIO_s_mem());
if (!PEM_write_bio_PKCS8PrivateKey(output, evpKey, NULL, NULL, 0, NULL, NULL)) {
if (!PEM_write_bio_PrivateKey(output, evpKey, NULL, NULL, 0, NULL, NULL)) {
BIO_free(output);
return NULL;
}