aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto/sha256.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/sha256.c')
-rw-r--r--src/crypto/sha256.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/crypto/sha256.c b/src/crypto/sha256.c
index 6736a5773..e85d20067 100644
--- a/src/crypto/sha256.c
+++ b/src/crypto/sha256.c
@@ -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/sha256.h>
/** SHA-256 variables */
@@ -242,3 +243,13 @@ struct digest_algorithm sha256_algorithm = {
.update = sha256_update,
.final = sha256_final,
};
+
+/** "sha256" object identifier */
+static uint8_t oid_sha256[] = { ASN1_OID_SHA256 };
+
+/** "sha256" OID-identified algorithm */
+struct asn1_algorithm oid_sha256_algorithm __asn1_algorithm = {
+ .name = "sha256",
+ .digest = &sha256_algorithm,
+ .oid = ASN1_OID_CURSOR ( oid_sha256 ),
+};