/** "pkcs7-signedData" object identifier cursor */
static struct asn1_cursor oid_signeddata_cursor =
- ASN1_OID_CURSOR ( oid_signeddata );
+ ASN1_CURSOR ( oid_signeddata );
/**
* Parse CMS signature content type
struct asn1_algorithm oid_md4_algorithm __asn1_algorithm = {
.name = "md4",
.digest = &md4_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_md4 ),
+ .oid = ASN1_CURSOR ( oid_md4 ),
};
struct asn1_algorithm oid_md5_algorithm __asn1_algorithm = {
.name = "md5",
.digest = &md5_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_md5 ),
+ .oid = ASN1_CURSOR ( oid_md5 ),
};
.name = "rsaEncryption",
.pubkey = &rsa_algorithm,
.digest = NULL,
- .oid = ASN1_OID_CURSOR ( oid_rsa_encryption ),
+ .oid = ASN1_CURSOR ( oid_rsa_encryption ),
};
struct asn1_algorithm oid_sha1_algorithm __asn1_algorithm = {
.name = "sha1",
.digest = &sha1_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha1 ),
+ .oid = ASN1_CURSOR ( oid_sha1 ),
};
struct asn1_algorithm oid_sha224_algorithm __asn1_algorithm = {
.name = "sha224",
.digest = &sha224_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha224 ),
+ .oid = ASN1_CURSOR ( oid_sha224 ),
};
struct asn1_algorithm oid_sha256_algorithm __asn1_algorithm = {
.name = "sha256",
.digest = &sha256_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha256 ),
+ .oid = ASN1_CURSOR ( oid_sha256 ),
};
struct asn1_algorithm oid_sha384_algorithm __asn1_algorithm = {
.name = "sha384",
.digest = &sha384_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha384 ),
+ .oid = ASN1_CURSOR ( oid_sha384 ),
};
struct asn1_algorithm oid_sha512_algorithm __asn1_algorithm = {
.name = "sha512",
.digest = &sha512_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha512 ),
+ .oid = ASN1_CURSOR ( oid_sha512 ),
};
struct asn1_algorithm oid_sha512_224_algorithm __asn1_algorithm = {
.name = "sha512/224",
.digest = &sha512_224_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha512_224 ),
+ .oid = ASN1_CURSOR ( oid_sha512_224 ),
};
struct asn1_algorithm oid_sha512_256_algorithm __asn1_algorithm = {
.name = "sha512/256",
.digest = &sha512_256_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha512_256 ),
+ .oid = ASN1_CURSOR ( oid_sha512_256 ),
};
.name = "md5WithRSAEncryption",
.pubkey = &rsa_algorithm,
.digest = &md5_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_md5_with_rsa_encryption ),
+ .oid = ASN1_CURSOR ( oid_md5_with_rsa_encryption ),
};
/** MD5 digestInfo prefix */
.name = "sha1WithRSAEncryption",
.pubkey = &rsa_algorithm,
.digest = &sha1_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha1_with_rsa_encryption ),
+ .oid = ASN1_CURSOR ( oid_sha1_with_rsa_encryption ),
};
/** SHA-1 digestInfo prefix */
.name = "sha224WithRSAEncryption",
.pubkey = &rsa_algorithm,
.digest = &sha224_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha224_with_rsa_encryption ),
+ .oid = ASN1_CURSOR ( oid_sha224_with_rsa_encryption ),
};
/** SHA-224 digestInfo prefix */
.name = "sha256WithRSAEncryption",
.pubkey = &rsa_algorithm,
.digest = &sha256_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha256_with_rsa_encryption ),
+ .oid = ASN1_CURSOR ( oid_sha256_with_rsa_encryption ),
};
/** SHA-256 digestInfo prefix */
.name = "sha384WithRSAEncryption",
.pubkey = &rsa_algorithm,
.digest = &sha384_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha384_with_rsa_encryption ),
+ .oid = ASN1_CURSOR ( oid_sha384_with_rsa_encryption ),
};
/** SHA-384 digestInfo prefix */
.name = "sha512WithRSAEncryption",
.pubkey = &rsa_algorithm,
.digest = &sha512_algorithm,
- .oid = ASN1_OID_CURSOR ( oid_sha512_with_rsa_encryption ),
+ .oid = ASN1_CURSOR ( oid_sha512_with_rsa_encryption ),
};
/** SHA-512 digestInfo prefix */
/** OCSP basic response type cursor */
static struct asn1_cursor oid_basic_response_type_cursor =
- ASN1_OID_CURSOR ( oid_basic_response_type );
+ ASN1_CURSOR ( oid_basic_response_type );
/**
* Free OCSP check
/** "commonName" object identifier cursor */
static struct asn1_cursor oid_common_name_cursor =
- ASN1_OID_CURSOR ( oid_common_name );
+ ASN1_CURSOR ( oid_common_name );
/**
* Parse X.509 certificate version
{
.name = "codeSigning",
.bits = X509_CODE_SIGNING,
- .oid = ASN1_OID_CURSOR ( oid_code_signing ),
+ .oid = ASN1_CURSOR ( oid_code_signing ),
},
{
.name = "ocspSigning",
.bits = X509_OCSP_SIGNING,
- .oid = ASN1_OID_CURSOR ( oid_ocsp_signing ),
+ .oid = ASN1_CURSOR ( oid_ocsp_signing ),
},
};
static struct x509_access_method x509_access_methods[] = {
{
.name = "OCSP",
- .oid = ASN1_OID_CURSOR ( oid_ad_ocsp ),
+ .oid = ASN1_CURSOR ( oid_ad_ocsp ),
.parse = x509_parse_ocsp,
},
};
static struct x509_extension x509_extensions[] = {
{
.name = "basicConstraints",
- .oid = ASN1_OID_CURSOR ( oid_ce_basic_constraints ),
+ .oid = ASN1_CURSOR ( oid_ce_basic_constraints ),
.parse = x509_parse_basic_constraints,
},
{
.name = "keyUsage",
- .oid = ASN1_OID_CURSOR ( oid_ce_key_usage ),
+ .oid = ASN1_CURSOR ( oid_ce_key_usage ),
.parse = x509_parse_key_usage,
},
{
.name = "extKeyUsage",
- .oid = ASN1_OID_CURSOR ( oid_ce_ext_key_usage ),
+ .oid = ASN1_CURSOR ( oid_ce_ext_key_usage ),
.parse = x509_parse_extended_key_usage,
},
{
.name = "authorityInfoAccess",
- .oid = ASN1_OID_CURSOR ( oid_pe_authority_info_access ),
+ .oid = ASN1_CURSOR ( oid_pe_authority_info_access ),
.parse = x509_parse_authority_info_access,
},
{
.name = "subjectAltName",
- .oid = ASN1_OID_CURSOR ( oid_ce_subject_alt_name ),
+ .oid = ASN1_CURSOR ( oid_ce_subject_alt_name ),
.parse = x509_parse_subject_alt_name,
},
};
ASN1_OID_INITIAL ( 2, 5 ), ASN1_OID_SINGLE ( 29 ), \
ASN1_OID_SINGLE ( 17 )
-/** Define an ASN.1 cursor containing an OID */
-#define ASN1_OID_CURSOR( oid_value ) { \
- .data = oid_value, \
- .len = sizeof ( oid_value ), \
+/** Define an ASN.1 cursor for a static value */
+#define ASN1_CURSOR( value ) { \
+ .data = value, \
+ .len = sizeof ( value ), \
}
/** An ASN.1 OID-identified algorithm */