xref: /openbmc/qemu/include/crypto/x509-utils.h (revision b8eada54b2ad8a7d98d93d5ab4d3e888c5880097)
110a1d34fSDorjoy Chowdhury /*
210a1d34fSDorjoy Chowdhury  * X.509 certificate related helpers
310a1d34fSDorjoy Chowdhury  *
410a1d34fSDorjoy Chowdhury  * Copyright (c) 2024 Dorjoy Chowdhury <dorjoychy111@gmail.com>
510a1d34fSDorjoy Chowdhury  *
610a1d34fSDorjoy Chowdhury  * This work is licensed under the terms of the GNU GPL, version 2 or
710a1d34fSDorjoy Chowdhury  * (at your option) any later version.  See the COPYING file in the
810a1d34fSDorjoy Chowdhury  * top-level directory.
910a1d34fSDorjoy Chowdhury  */
1010a1d34fSDorjoy Chowdhury 
1110a1d34fSDorjoy Chowdhury #ifndef QCRYPTO_X509_UTILS_H
1210a1d34fSDorjoy Chowdhury #define QCRYPTO_X509_UTILS_H
1310a1d34fSDorjoy Chowdhury 
1410a1d34fSDorjoy Chowdhury #include "crypto/hash.h"
1510a1d34fSDorjoy Chowdhury 
1610a1d34fSDorjoy Chowdhury int qcrypto_get_x509_cert_fingerprint(uint8_t *cert, size_t size,
17*ef834aa2SMarkus Armbruster                                       QCryptoHashAlgo hash,
1810a1d34fSDorjoy Chowdhury                                       uint8_t *result,
1910a1d34fSDorjoy Chowdhury                                       size_t *resultlen,
2010a1d34fSDorjoy Chowdhury                                       Error **errp);
2110a1d34fSDorjoy Chowdhury 
2210a1d34fSDorjoy Chowdhury #endif
23