mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
Merge pull request #3608 from birarda/master
use OPENSSL_free to free DER public and private key buffers
This commit is contained in:
commit
5759b5b787
1 changed files with 4 additions and 4 deletions
|
@ -66,11 +66,11 @@ void RSAKeypairGenerator::generateKeypair() {
|
|||
|
||||
// cleanup the public and private key DER data, if required
|
||||
if (publicKeyLength > 0) {
|
||||
delete[] publicKeyDER;
|
||||
OPENSSL_free(publicKeyDER);
|
||||
}
|
||||
|
||||
if (privateKeyLength > 0) {
|
||||
delete[] privateKeyDER;
|
||||
OPENSSL_free(privateKeyDER);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -84,8 +84,8 @@ void RSAKeypairGenerator::generateKeypair() {
|
|||
QByteArray privateKeyArray(reinterpret_cast<char*>(privateKeyDER), privateKeyLength);
|
||||
|
||||
// cleanup the publicKeyDER and publicKeyDER data
|
||||
delete[] publicKeyDER;
|
||||
delete[] privateKeyDER;
|
||||
OPENSSL_free(publicKeyDER);
|
||||
OPENSSL_free(privateKeyDER);
|
||||
|
||||
emit generatedKeypair(publicKeyArray, privateKeyArray);
|
||||
}
|
Loading…
Reference in a new issue