diff options
Diffstat (limited to 'cipher/pubkey.c')
-rw-r--r-- | cipher/pubkey.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cipher/pubkey.c b/cipher/pubkey.c index ec9d2414..c11d2267 100644 --- a/cipher/pubkey.c +++ b/cipher/pubkey.c @@ -1520,7 +1520,6 @@ gcry_pk_get_nbits( GCRY_SEXP key ) /* Return the so called KEYGRIP which is the SHA-1 hash of the public key parameters expressed in a way depended on the algorithm. - This value is known in pkcs#15 as the subjectKeyHash. ARRAY must either be 20 bytes long or NULL; in the later case a newly allocated array of that size is return, other wiese the array @@ -1543,6 +1542,8 @@ gcry_pk_get_keygrip (GCRY_SEXP key, unsigned char *array) if (!list) list = gcry_sexp_find_token (key, "private-key", 0); if (!list) + list = gcry_sexp_find_token (key, "protected-private-key", 0); + if (!list) return NULL; /* no public- or private-key object */ l2 = gcry_sexp_cadr (list); |