We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6ce443c + c63ed14 commit 86982dbCopy full SHA for 86982db
1 file changed
src/net/openssl/client.cpp
@@ -30,7 +30,7 @@ tls_load_from_memory(X509_STORE* store,
30
auto* cert = PEM_read_bio_X509(cbio, NULL, 0, NULL);
31
assert(cert != NULL && "Invalid certificate");
32
int res = X509_STORE_add_cert(store, cert);
33
- assert(res == 1);
+ assert(res == 1 && "The X509 store did not accept the certificate");
34
BIO_free(cbio);
35
}
36
@@ -44,7 +44,8 @@ tls_private_key_for_ctx(SSL_CTX* ctx, int bits = 2048)
44
int ret = RSA_generate_key_ex(rsa, bits, bne, NULL);
45
assert(ret == 1);
46
47
- SSL_CTX_use_RSAPrivateKey(ctx, rsa);
+ ret = SSL_CTX_use_RSAPrivateKey(ctx, rsa);
48
+ assert(ret == 1 && "OpenSSL context did not accept the private key");
49
50
51
static SSL_CTX*
0 commit comments