Verbose RSA-keypair logging

This commit is contained in:
Simon Walton 2019-07-10 15:08:51 -07:00
parent 31582cf857
commit 7a64ed10f6

View file

@ -28,6 +28,7 @@ RSAKeypairGenerator::RSAKeypairGenerator(QObject* parent) :
} }
void RSAKeypairGenerator::run() { void RSAKeypairGenerator::run() {
qCDebug(networking) << "KEYPAIR: thread started";
generateKeypair(); generateKeypair();
} }
@ -53,6 +54,7 @@ void RSAKeypairGenerator::generateKeypair() {
BN_free(exponent); BN_free(exponent);
return; return;
} }
qCDebug(networking) << "KEYPAIR: OpenSSL generated a" << RSA_KEY_BITS << "bit RSA key-pair";
// we don't need the BIGNUM anymore so clean that up // we don't need the BIGNUM anymore so clean that up
BN_free(exponent); BN_free(exponent);
@ -95,5 +97,6 @@ void RSAKeypairGenerator::generateKeypair() {
OPENSSL_free(publicKeyDER); OPENSSL_free(publicKeyDER);
OPENSSL_free(privateKeyDER); OPENSSL_free(privateKeyDER);
qCDebug(networking) << "KEYPAIR: emitting generated signal and finishing";
emit generatedKeypair(_publicKey, _privateKey); emit generatedKeypair(_publicKey, _privateKey);
} }