diff options
Diffstat (limited to 'providers/common/der/der_rsa.c.in')
-rw-r--r-- | providers/common/der/der_rsa.c.in | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/providers/common/der/der_rsa.c.in b/providers/common/der/der_rsa.c.in index d3bab85d1f..30e945cf58 100644 --- a/providers/common/der/der_rsa.c.in +++ b/providers/common/der/der_rsa.c.in @@ -50,13 +50,20 @@ * sha384Identifier AlgorithmIdentifier ::= { id-sha384, NULL } * sha512Identifier AlgorithmIdentifier ::= { id-sha512, NULL } */ +/* + * NOTE: Some of the arrays aren't used other than inside sizeof(), which + * clang complains about (-Wno-unneeded-internal-declaration). To get + * around that, we make them non-static, and declare them an extra time to + * avoid compilers complaining about definitions without declarations. + */ #if 0 /* Currently unused */ #define DER_AID_V_sha1Identifier \ DER_P_SEQUENCE|DER_F_CONSTRUCTED, \ DER_OID_SZ_id_sha1 + DER_SZ_NULL, \ DER_OID_V_id_sha1, \ DER_V_NULL -static const unsigned char der_aid_sha1Identifier[] = { +extern const unsigned char der_aid_sha1Identifier[]; +const unsigned char der_aid_sha1Identifier[] = { DER_AID_V_sha1Identifier }; #define DER_AID_SZ_sha1Identifier sizeof(der_aid_sha1Identifier) @@ -67,7 +74,8 @@ static const unsigned char der_aid_sha1Identifier[] = { DER_OID_SZ_id_sha224 + DER_SZ_NULL, \ DER_OID_V_id_sha224, \ DER_V_NULL -static const unsigned char der_aid_sha224Identifier[] = { +extern const unsigned char der_aid_sha224Identifier[]; +const unsigned char der_aid_sha224Identifier[] = { DER_AID_V_sha224Identifier }; #define DER_AID_SZ_sha224Identifier sizeof(der_aid_sha224Identifier) @@ -77,7 +85,8 @@ static const unsigned char der_aid_sha224Identifier[] = { DER_OID_SZ_id_sha256 + DER_SZ_NULL, \ DER_OID_V_id_sha256, \ DER_V_NULL -static const unsigned char der_aid_sha256Identifier[] = { +extern const unsigned char der_aid_sha256Identifier[]; +const unsigned char der_aid_sha256Identifier[] = { DER_AID_V_sha256Identifier }; #define DER_AID_SZ_sha256Identifier sizeof(der_aid_sha256Identifier) @@ -87,7 +96,8 @@ static const unsigned char der_aid_sha256Identifier[] = { DER_OID_SZ_id_sha384 + DER_SZ_NULL, \ DER_OID_V_id_sha384, \ DER_V_NULL -static const unsigned char der_aid_sha384Identifier[] = { +extern const unsigned char der_aid_sha384Identifier[]; +const unsigned char der_aid_sha384Identifier[] = { DER_AID_V_sha384Identifier }; #define DER_AID_SZ_sha384Identifier sizeof(der_aid_sha384Identifier) @@ -97,7 +107,8 @@ static const unsigned char der_aid_sha384Identifier[] = { DER_OID_SZ_id_sha512 + DER_SZ_NULL, \ DER_OID_V_id_sha512, \ DER_V_NULL -static const unsigned char der_aid_sha512Identifier[] = { +extern const unsigned char der_aid_sha512Identifier[]; +const unsigned char der_aid_sha512Identifier[] = { DER_AID_V_sha512Identifier }; #define DER_AID_SZ_sha512Identifier sizeof(der_aid_sha512Identifier) @@ -107,7 +118,8 @@ static const unsigned char der_aid_sha512Identifier[] = { DER_OID_SZ_id_sha512_224 + DER_SZ_NULL, \ DER_OID_V_id_sha512_224, \ DER_V_NULL -static const unsigned char der_aid_sha512_224Identifier[] = { +extern const unsigned char der_aid_sha512_224Identifier[]; +const unsigned char der_aid_sha512_224Identifier[] = { DER_AID_V_sha512_224Identifier }; #define DER_AID_SZ_sha512_224Identifier sizeof(der_aid_sha512_224Identifier) @@ -117,7 +129,8 @@ static const unsigned char der_aid_sha512_224Identifier[] = { DER_OID_SZ_id_sha512_256 + DER_SZ_NULL, \ DER_OID_V_id_sha512_256, \ DER_V_NULL -static const unsigned char der_aid_sha512_256Identifier[] = { +extern const unsigned char der_aid_sha512_256Identifier[]; +const unsigned char der_aid_sha512_256Identifier[] = { DER_AID_V_sha512_256Identifier }; #define DER_AID_SZ_sha512_256Identifier sizeof(der_aid_sha512_256Identifier) |