diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-06-23 23:13:50 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-06-23 23:38:10 +0200 |
commit | a90b2e85142cc27c1b6fbf468bcb62252453c6fa (patch) | |
tree | eaf5235eee5641e3c3fd12f5e25f528a46f881d1 | |
parent | b25ee830d6e94291de58af14c988c6dbc4e1643d (diff) | |
download | gnutls-a90b2e85142cc27c1b6fbf468bcb62252453c6fa.tar.gz |
gnutls_pkcs11_crt_is_known: always assume GNUTLS_PKCS11_OBJ_FLAG_COMPARE unless GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_DISTRUSTED is given
-rw-r--r-- | lib/pkcs11.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pkcs11.c b/lib/pkcs11.c index ce0563e796..6b84f27b10 100644 --- a/lib/pkcs11.c +++ b/lib/pkcs11.c @@ -4017,10 +4017,10 @@ int gnutls_pkcs11_crt_is_known(const char *url, gnutls_x509_crt_t cert, priv.issuer_dn.data = cert->raw_issuer_dn.data; priv.issuer_dn.size = cert->raw_issuer_dn.size; - /* when looking for a trusted certificate, we always fully compare - * with the given */ - if (flags & GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_TRUSTED && !(flags & GNUTLS_PKCS11_OBJ_FLAG_COMPARE_KEY)) + /* assume PKCS11_OBJ_FLAG_COMPARE everywhere but DISTRUST info */ + if (!(flags & GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_DISTRUSTED) && !(flags & GNUTLS_PKCS11_OBJ_FLAG_COMPARE_KEY)) { flags |= GNUTLS_PKCS11_OBJ_FLAG_COMPARE; + } priv.flags = flags; |