Fix PEM reading issues and assert to catch generating corrupt keypairs
This commit is contained in:
@@ -110,6 +110,10 @@ IdentityManager::IdentityManager(QDir directory)
|
||||
BIO_free(biokey);
|
||||
BIO_free(biocert);
|
||||
|
||||
// Ensure we can actually consume the keys we just wrote
|
||||
assert(!QSslCertificate(m_CachedPemCert).isNull());
|
||||
assert(!QSslKey(m_CachedPrivateKey, QSsl::Rsa).isNull());
|
||||
|
||||
qDebug() << "Wrote new identity credentials to disk";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user