Private key is self-sufficient.
authorCryptoManiac <balthazar@yandex.ru>
Tue, 29 Mar 2016 20:31:56 +0000 (23:31 +0300)
committerCryptoManiac <balthazar@yandex.ru>
Tue, 29 Mar 2016 20:31:56 +0000 (23:31 +0300)
src/key.cpp

index 05cfaf2..1c700d0 100644 (file)
@@ -336,13 +336,9 @@ bool CKey::WritePEM(BIO *streamObj, const SecureString &strPassKey) const // dum
     EVP_PKEY *evpKey = EVP_PKEY_new();
     if (!EVP_PKEY_assign_EC_KEY(evpKey, pkey))
         return error("CKey::WritePEM() : Error initializing EVP_PKEY instance.");
-
     if(!PEM_write_bio_PKCS8PrivateKey(streamObj, evpKey, EVP_aes_256_cbc(), (char *)&strPassKey[0], strPassKey.size(), NULL, NULL))
         return error("CKey::WritePEM() : Error writing private key data to stream object");
 
-    if(!PEM_write_bio_PUBKEY(streamObj, evpKey))
-        return error("CKey::WritePEM() : Error writing public key data to stream object");
-
     return true;
 }