crypto: Introduce x509 utils

An utility function for getting fingerprint from X.509 certificate
has been introduced. Implementation only provided using gnutls.

Signed-off-by: Dorjoy Chowdhury <dorjoychy111@gmail.com>
[DB: fixed missing gnutls_x509_crt_deinit in success path]
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Dorjoy Chowdhury 2024-09-06 01:57:30 +06:00 committed by Daniel P. Berrangé
parent 9893da71b2
commit 10a1d34fc0
3 changed files with 102 additions and 0 deletions

View file

@ -24,6 +24,10 @@ crypto_ss.add(files(
'rsakey.c',
))
if gnutls.found()
crypto_ss.add(files('x509-utils.c'))
endif
if nettle.found()
crypto_ss.add(nettle, files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'))
if hogweed.found()