[gnutls-help] Setting Subject Key Identifier and Authority Key Identifier

Nikos Mavrogiannopoulos n.mavrogiannopoulos at gmail.com
Wed Jul 18 07:51:25 CEST 2018


On Mon, 2018-07-16 at 20:08 +0200, Markus Karch wrote:
> Hello everyone,
> 
> sorry for the multiple mails but I think I found my issue. In the
> documentation I discovered this:
> 
> "Note that gnutls_pubkey_get_key_id calculates a SHA1 digest of the
> public key as a DER-formatted, subjectPublicKeyInfo object. Other
> implementations use different approaches, e.g., some use the “common
> method” described in section 4.2.1.2 of [RFC5280] which calculates a
> digest on a part of the subjectPublicKeyInfo object. "
> 
> Is it with gnutls possible to generate the key id with one of the
> "common methods" described in RFC5280?

The functions to calculate the digest are helper ones. You can
calculate that digest of the key any way you like including the rfc5280
methods. All you need is to access the public key (e.g., via
gnutls_pubkey_t abstraction, and then the raw DER data).

regards,
Nikos




More information about the Gnutls-help mailing list