summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/asn1.h7
-rw-r--r--src/include/ipxe/sha512.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/include/ipxe/asn1.h b/src/include/ipxe/asn1.h
index 21cf809fe..7550c4748 100644
--- a/src/include/ipxe/asn1.h
+++ b/src/include/ipxe/asn1.h
@@ -160,6 +160,13 @@ struct asn1_builder_header {
ASN1_OID_SINGLE ( 3 ), ASN1_OID_SINGLE ( 4 ), \
ASN1_OID_SINGLE ( 2 ), ASN1_OID_SINGLE ( 1 )
+/** ASN.1 OID for id-sha384 (2.16.840.1.101.3.4.2.2) */
+#define ASN1_OID_SHA384 \
+ ASN1_OID_INITIAL ( 2, 16 ), ASN1_OID_DOUBLE ( 840 ), \
+ ASN1_OID_SINGLE ( 1 ), ASN1_OID_SINGLE ( 101 ), \
+ ASN1_OID_SINGLE ( 3 ), ASN1_OID_SINGLE ( 4 ), \
+ ASN1_OID_SINGLE ( 2 ), ASN1_OID_SINGLE ( 2 )
+
/** ASN.1 OID for id-sha512 (2.16.840.1.101.3.4.2.3) */
#define ASN1_OID_SHA512 \
ASN1_OID_INITIAL ( 2, 16 ), ASN1_OID_DOUBLE ( 840 ), \
diff --git a/src/include/ipxe/sha512.h b/src/include/ipxe/sha512.h
index 0cfa35b9e..44a4c8309 100644
--- a/src/include/ipxe/sha512.h
+++ b/src/include/ipxe/sha512.h
@@ -75,6 +75,9 @@ struct sha512_context {
/** SHA-512 digest size */
#define SHA512_DIGEST_SIZE sizeof ( struct sha512_digest )
+/** SHA-384 digest size */
+#define SHA384_DIGEST_SIZE ( SHA512_DIGEST_SIZE * 384 / 512 )
+
extern void sha512_family_init ( struct sha512_context *context,
const struct sha512_digest *init,
size_t digestsize );
@@ -82,5 +85,6 @@ extern void sha512_update ( void *ctx, const void *data, size_t len );
extern void sha512_final ( void *ctx, void *out );
extern struct digest_algorithm sha512_algorithm;
+extern struct digest_algorithm sha384_algorithm;
#endif /* IPXE_SHA512_H */