Skip to content
This repository was archived by the owner on Jun 6, 2021. It is now read-only.

Commit 8dbcfae

Browse files
aaronmdjonesStephen Bennett
authored andcommitted
Generate fingerprints for chained certificates with an unknown root
1 parent f9e66b9 commit 8dbcfae

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

libratbox/src/openssl.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,12 @@ rb_get_ssl_certfp(rb_fde_t *F, uint8_t certfp[RB_SSL_CERTFP_LEN])
630630
if(cert != NULL)
631631
{
632632
res = SSL_get_verify_result((SSL *) F->ssl);
633-
if(res == X509_V_OK ||
634-
res == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN ||
635-
res == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE ||
636-
res == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT)
633+
if(
634+
res == X509_V_OK ||
635+
res == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN ||
636+
res == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE ||
637+
res == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT ||
638+
res == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY)
637639
{
638640
unsigned int certfp_length = RB_SSL_CERTFP_LEN;
639641
X509_digest(cert, EVP_sha1(), certfp, &certfp_length);

0 commit comments

Comments
 (0)