mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 00:08:53 +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
|
// cleanup the public and private key DER data, if required
|
||||||
if (publicKeyLength > 0) {
|
if (publicKeyLength > 0) {
|
||||||
delete[] publicKeyDER;
|
OPENSSL_free(publicKeyDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (privateKeyLength > 0) {
|
if (privateKeyLength > 0) {
|
||||||
delete[] privateKeyDER;
|
OPENSSL_free(privateKeyDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -84,8 +84,8 @@ void RSAKeypairGenerator::generateKeypair() {
|
||||||
QByteArray privateKeyArray(reinterpret_cast<char*>(privateKeyDER), privateKeyLength);
|
QByteArray privateKeyArray(reinterpret_cast<char*>(privateKeyDER), privateKeyLength);
|
||||||
|
|
||||||
// cleanup the publicKeyDER and publicKeyDER data
|
// cleanup the publicKeyDER and publicKeyDER data
|
||||||
delete[] publicKeyDER;
|
OPENSSL_free(publicKeyDER);
|
||||||
delete[] privateKeyDER;
|
OPENSSL_free(privateKeyDER);
|
||||||
|
|
||||||
emit generatedKeypair(publicKeyArray, privateKeyArray);
|
emit generatedKeypair(publicKeyArray, privateKeyArray);
|
||||||
}
|
}
|
Loading…
Reference in a new issue