Signed-off-by: Michael Brown <mcb30@ipxe.org>
#include <assert.h>
#include <ipxe/rotate.h>
#include <ipxe/crypto.h>
+#include <ipxe/asn1.h>
#include <ipxe/md5.h>
/** MD5 variables */
.update = md5_update,
.final = md5_final,
};
+
+/** "md5" object identifier */
+static uint8_t oid_md5[] = { ASN1_OID_MD5 };
+
+/** "md5" OID-identified algorithm */
+struct asn1_algorithm oid_md5_algorithm __asn1_algorithm = {
+ .name = "md5",
+ .digest = &md5_algorithm,
+ .oid = ASN1_OID_CURSOR ( oid_md5 ),
+};
#include <assert.h>
#include <ipxe/rotate.h>
#include <ipxe/crypto.h>
+#include <ipxe/asn1.h>
#include <ipxe/sha1.h>
/** SHA-1 variables */
.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 ),
+};
#include <assert.h>
#include <ipxe/rotate.h>
#include <ipxe/crypto.h>
+#include <ipxe/asn1.h>
#include <ipxe/sha256.h>
/** SHA-256 variables */
.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 ),
+};