mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 17:12:40 +03:00
[crypto] Define ASN.1 OID-identified algorithms for all supported digests
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -30,6 +30,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#include <assert.h>
|
||||
#include <ipxe/rotate.h>
|
||||
#include <ipxe/crypto.h>
|
||||
#include <ipxe/asn1.h>
|
||||
#include <ipxe/sha1.h>
|
||||
|
||||
/** SHA-1 variables */
|
||||
@@ -258,3 +259,13 @@ struct digest_algorithm sha1_algorithm = {
|
||||
.update = sha1_update,
|
||||
.final = sha1_final,
|
||||
};
|
||||
|
||||
/** "sha1" object identifier */
|
||||
static uint8_t oid_sha1[] = { ASN1_OID_SHA1 };
|
||||
|
||||
/** "sha1" OID-identified algorithm */
|
||||
struct asn1_algorithm oid_sha1_algorithm __asn1_algorithm = {
|
||||
.name = "sha1",
|
||||
.digest = &sha1_algorithm,
|
||||
.oid = ASN1_OID_CURSOR ( oid_sha1 ),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user