From: Nikos Mavrogiannopoulos Date: Thu, 27 Feb 2014 07:35:16 +0000 (+0100) Subject: added doc on is_issuer() checks X-Git-Tag: gnutls_3_3_0pre0~110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ebbe3c3968edccde88ebab58ce7dfec1f2456856;p=thirdparty%2Fgnutls.git added doc on is_issuer() checks --- diff --git a/lib/x509/verify.c b/lib/x509/verify.c index 4624a93b71..4a21c72e67 100644 --- a/lib/x509/verify.c +++ b/lib/x509/verify.c @@ -249,6 +249,8 @@ static bool is_issuer(gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer) gnutls_x509_crt_get_authority_key_id(cert, id1, &id1_size, NULL); if (ret < 0) { + /* If there is no authority key identifier in the + * certificate, assume they match */ ret = 1; goto cleanup; } @@ -258,6 +260,8 @@ static bool is_issuer(gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer) gnutls_x509_crt_get_subject_key_id(issuer, id2, &id2_size, NULL); if (ret < 0) { + /* If there is no subject key identifier in the + * issuer certificate, assume they match */ ret = 1; gnutls_assert(); goto cleanup;