diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-07-04 15:44:38 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-07-04 17:17:31 +0200 |
commit | 23a5083e2902dc6d202fc74c512e9f3340665722 (patch) | |
tree | 4f0aa58e05197fccee83b9c12d8c78c2a3327294 | |
parent | 4fe6302d8df924649305b92a7dabfd86ba5ff163 (diff) | |
download | gnutls-23a5083e2902dc6d202fc74c512e9f3340665722.tar.gz |
pkcs11: Removed length check of attribute as a sanity check for valid keys.
There can be keys where the id or label is empty and thus with zero length.
-rw-r--r-- | lib/pkcs11_privkey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pkcs11_privkey.c b/lib/pkcs11_privkey.c index 805946c897..c5877d5d7e 100644 --- a/lib/pkcs11_privkey.c +++ b/lib/pkcs11_privkey.c @@ -386,9 +386,9 @@ gnutls_pkcs11_privkey_import_url(gnutls_pkcs11_privkey_t pkey, } attr = p11_kit_uri_get_attribute(pkey->info, CKA_ID); - if (!attr || !attr->value_len) { + if (!attr) { attr = p11_kit_uri_get_attribute(pkey->info, CKA_LABEL); - if (!attr || !attr->value_len) { + if (!attr) { gnutls_assert(); return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE; } |