ASN.1: More OID definitions
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
8006742fa3
commit
ce1f477397
2 changed files with 103 additions and 4 deletions
|
@ -11,16 +11,96 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "asn1.h"
|
#include "asn1.h"
|
||||||
|
|
||||||
struct asn1_oid asn1_sha1_oid = {
|
const struct asn1_oid asn1_sha1_oid = {
|
||||||
.oid = { 1, 3, 14, 3, 2, 26 },
|
.oid = { 1, 3, 14, 3, 2, 26 },
|
||||||
.len = 6
|
.len = 6
|
||||||
};
|
};
|
||||||
|
|
||||||
struct asn1_oid asn1_sha256_oid = {
|
const struct asn1_oid asn1_sha256_oid = {
|
||||||
.oid = { 2, 16, 840, 1, 101, 3, 4, 2, 1 },
|
.oid = { 2, 16, 840, 1, 101, 3, 4, 2, 1 },
|
||||||
.len = 9
|
.len = 9
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_ec_public_key_oid = {
|
||||||
|
.oid = { 1, 2, 840, 10045, 2, 1 },
|
||||||
|
.len = 6
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_prime256v1_oid = {
|
||||||
|
.oid = { 1, 2, 840, 10045, 3, 1, 7 },
|
||||||
|
.len = 7
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_secp384r1_oid = {
|
||||||
|
.oid = { 1, 3, 132, 0, 34 },
|
||||||
|
.len = 5
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_secp521r1_oid = {
|
||||||
|
.oid = { 1, 3, 132, 0, 35 },
|
||||||
|
.len = 5
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_brainpoolP256r1_oid = {
|
||||||
|
.oid = { 1, 3, 36, 3, 3, 2, 8, 1, 1, 7 },
|
||||||
|
.len = 10
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_brainpoolP384r1_oid = {
|
||||||
|
.oid = { 1, 3, 36, 3, 3, 2, 8, 1, 1, 11 },
|
||||||
|
.len = 10
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_brainpoolP512r1_oid = {
|
||||||
|
.oid = { 1, 3, 36, 3, 3, 2, 8, 1, 1, 13 },
|
||||||
|
.len = 10
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_aes_siv_cmac_aead_256_oid = {
|
||||||
|
.oid = { 1, 2, 840, 113549, 1, 9, 16, 3, 22 },
|
||||||
|
.len = 9
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_aes_siv_cmac_aead_384_oid = {
|
||||||
|
.oid = { 1, 2, 840, 113549, 1, 9, 16, 3, 23 },
|
||||||
|
.len = 9
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_aes_siv_cmac_aead_512_oid = {
|
||||||
|
.oid = { 1, 2, 840, 113549, 1, 9, 16, 3, 24 },
|
||||||
|
.len = 9
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_pbkdf2_oid = {
|
||||||
|
.oid = { 1, 2, 840, 113549, 1, 5, 12 },
|
||||||
|
.len = 7
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_pbkdf2_hmac_sha256_oid = {
|
||||||
|
.oid = { 1, 2, 840, 113549, 2, 9 },
|
||||||
|
.len = 6
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_pbkdf2_hmac_sha384_oid = {
|
||||||
|
.oid = { 1, 2, 840, 113549, 2, 10 },
|
||||||
|
.len = 6
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_pbkdf2_hmac_sha512_oid = {
|
||||||
|
.oid = { 1, 2, 840, 113549, 2, 11 },
|
||||||
|
.len = 6
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_dpp_config_params_oid = {
|
||||||
|
.oid = { 1, 3, 6, 1, 4, 1, 40808, 1, 2, 1 },
|
||||||
|
.len = 10
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct asn1_oid asn1_dpp_asymmetric_key_package_oid = {
|
||||||
|
.oid = { 1, 3, 6, 1, 4, 1, 40808, 1, 2, 2 },
|
||||||
|
.len = 10
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static int asn1_valid_der_boolean(struct asn1_hdr *hdr)
|
static int asn1_valid_der_boolean(struct asn1_hdr *hdr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,7 +71,26 @@ int asn1_get_sequence(const u8 *buf, size_t len, struct asn1_hdr *hdr,
|
||||||
int asn1_get_alg_id(const u8 *buf, size_t len, struct asn1_oid *oid,
|
int asn1_get_alg_id(const u8 *buf, size_t len, struct asn1_oid *oid,
|
||||||
const u8 **params, size_t *params_len, const u8 **next);
|
const u8 **params, size_t *params_len, const u8 **next);
|
||||||
|
|
||||||
extern struct asn1_oid asn1_sha1_oid;
|
extern const struct asn1_oid asn1_sha1_oid;
|
||||||
extern struct asn1_oid asn1_sha256_oid;
|
extern const struct asn1_oid asn1_sha256_oid;
|
||||||
|
extern const struct asn1_oid asn1_ec_public_key_oid;
|
||||||
|
extern const struct asn1_oid asn1_prime256v1_oid;
|
||||||
|
extern const struct asn1_oid asn1_secp384r1_oid;
|
||||||
|
extern const struct asn1_oid asn1_secp521r1_oid;
|
||||||
|
extern const struct asn1_oid asn1_brainpoolP256r1_oid;
|
||||||
|
extern const struct asn1_oid asn1_brainpoolP384r1_oid;
|
||||||
|
extern const struct asn1_oid asn1_brainpoolP512r1_oid;
|
||||||
|
extern const struct asn1_oid asn1_aes_siv_cmac_aead_256_oid;
|
||||||
|
extern const struct asn1_oid asn1_aes_siv_cmac_aead_384_oid;
|
||||||
|
extern const struct asn1_oid asn1_aes_siv_cmac_aead_512_oid;
|
||||||
|
extern const struct asn1_oid asn1_aes_siv_cmac_aead_256_oid;
|
||||||
|
extern const struct asn1_oid asn1_aes_siv_cmac_aead_384_oid;
|
||||||
|
extern const struct asn1_oid asn1_aes_siv_cmac_aead_512_oid;
|
||||||
|
extern const struct asn1_oid asn1_pbkdf2_oid;
|
||||||
|
extern const struct asn1_oid asn1_pbkdf2_hmac_sha256_oid;
|
||||||
|
extern const struct asn1_oid asn1_pbkdf2_hmac_sha384_oid;
|
||||||
|
extern const struct asn1_oid asn1_pbkdf2_hmac_sha512_oid;
|
||||||
|
extern const struct asn1_oid asn1_dpp_config_params_oid;
|
||||||
|
extern const struct asn1_oid asn1_dpp_asymmetric_key_package_oid;
|
||||||
|
|
||||||
#endif /* ASN1_H */
|
#endif /* ASN1_H */
|
||||||
|
|
Loading…
Reference in a new issue