TLS/SSL and crypto library
Revision | 98c35dc48d36664c404fec2e12ce405ac0fbecc0 (tree) |
---|---|
Zeit | 2020-09-13 19:10:41 |
Autor | Matt Caswell <matt@open...> |
Commiter | Matt Caswell |
Fix safestack issues in crmf.h
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12781)
@@ -26,6 +26,7 @@ | ||
26 | 26 | /include/openssl/cmp.h |
27 | 27 | /include/openssl/cms.h |
28 | 28 | /include/openssl/configuration.h |
29 | +/include/openssl/crmf.h | |
29 | 30 | /include/openssl/fipskey.h |
30 | 31 | /include/openssl/ocsp.h |
31 | 32 | /include/openssl/opensslv.h |
@@ -17,6 +17,7 @@ DEPEND[]=include/openssl/asn1.h \ | ||
17 | 17 | include/openssl/cmp.h \ |
18 | 18 | include/openssl/cms.h \ |
19 | 19 | include/openssl/configuration.h \ |
20 | + include/openssl/crmf.h \ | |
20 | 21 | include/openssl/fipskey.h \ |
21 | 22 | include/openssl/opensslv.h \ |
22 | 23 | include/openssl/ocsp.h \ |
@@ -31,9 +32,10 @@ DEPEND[]=include/openssl/asn1.h \ | ||
31 | 32 | doc/man7/openssl_user_macros.pod |
32 | 33 | |
33 | 34 | GENERATE[include/openssl/asn1.h]=include/openssl/asn1.h.in |
34 | -GENERATE[include/openssl/configuration.h]=include/openssl/configuration.h.in | |
35 | 35 | GENERATE[include/openssl/cmp.h]=include/openssl/cmp.h.in |
36 | 36 | GENERATE[include/openssl/cms.h]=include/openssl/cms.h.in |
37 | +GENERATE[include/openssl/configuration.h]=include/openssl/configuration.h.in | |
38 | +GENERATE[include/openssl/crmf.h]=include/openssl/crmf.h.in | |
37 | 39 | GENERATE[include/openssl/fipskey.h]=include/openssl/fipskey.h.in |
38 | 40 | GENERATE[include/openssl/ocsp.h]=include/openssl/ocsp.h.in |
39 | 41 | GENERATE[include/openssl/opensslv.h]=include/openssl/opensslv.h.in |
@@ -21,8 +21,6 @@ | ||
21 | 21 | |
22 | 22 | #include "openssl/cmp_util.h" |
23 | 23 | |
24 | -DEFINE_STACK_OF(OSSL_CRMF_CERTID) | |
25 | - | |
26 | 24 | #define IS_CREP(t) ((t) == OSSL_CMP_PKIBODY_IP || (t) == OSSL_CMP_PKIBODY_CP \ |
27 | 25 | || (t) == OSSL_CMP_PKIBODY_KUP) |
28 | 26 |
@@ -21,9 +21,6 @@ | ||
21 | 21 | #include <openssl/x509.h> |
22 | 22 | #include "crypto/x509.h" /* for x509_set0_libctx() */ |
23 | 23 | |
24 | -DEFINE_STACK_OF(OSSL_CRMF_MSG) | |
25 | -DEFINE_STACK_OF(OSSL_CRMF_CERTID) | |
26 | - | |
27 | 24 | OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg) |
28 | 25 | { |
29 | 26 | if (msg == NULL) { |
@@ -19,8 +19,6 @@ | ||
19 | 19 | #include <openssl/cmp.h> |
20 | 20 | #include <openssl/err.h> |
21 | 21 | |
22 | -DEFINE_STACK_OF(OSSL_CRMF_MSG) | |
23 | - | |
24 | 22 | /* the context for the generic CMP server */ |
25 | 23 | struct ossl_cmp_srv_ctx_st |
26 | 24 | { |
@@ -36,8 +36,6 @@ | ||
36 | 36 | #include <openssl/err.h> |
37 | 37 | #include <openssl/evp.h> |
38 | 38 | |
39 | -DEFINE_STACK_OF(OSSL_CRMF_MSG) | |
40 | - | |
41 | 39 | /*- |
42 | 40 | * atyp = Attribute Type |
43 | 41 | * valt = Value Type |
@@ -389,5 +389,4 @@ struct ossl_crmf_msg_st { | ||
389 | 389 | /* 1 */ |
390 | 390 | STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *regInfo; |
391 | 391 | } /* OSSL_CRMF_MSG */; |
392 | -/* DEFINE_STACK_OF(OSSL_CRMF_MSG) */ | |
393 | 392 | #endif |
@@ -1,4 +1,6 @@ | ||
1 | 1 | /*- |
2 | + * {- join("\n * ", @autowarntext) -} | |
3 | + * | |
2 | 4 | * Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved. |
3 | 5 | * Copyright Nokia 2007-2019 |
4 | 6 | * Copyright Siemens AG 2015-2019 |
@@ -11,6 +13,10 @@ | ||
11 | 13 | * CRMF (RFC 4211) implementation by M. Peylo, M. Viljanen, and D. von Oheimb. |
12 | 14 | */ |
13 | 15 | |
16 | +{- | |
17 | +use OpenSSL::stackhash qw(generate_stack_macros); | |
18 | +-} | |
19 | + | |
14 | 20 | #ifndef OPENSSL_CRMF_H |
15 | 21 | # define OPENSSL_CRMF_H |
16 | 22 |
@@ -44,7 +50,9 @@ DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDVALUE) | ||
44 | 50 | typedef struct ossl_crmf_msg_st OSSL_CRMF_MSG; |
45 | 51 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSG) |
46 | 52 | DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_MSG) |
47 | -DEFINE_OR_DECLARE_STACK_OF(OSSL_CRMF_MSG) | |
53 | +{- | |
54 | + generate_stack_macros("OSSL_CRMF_MSG"); | |
55 | +-} | |
48 | 56 | typedef struct ossl_crmf_attributetypeandvalue_st OSSL_CRMF_ATTRIBUTETYPEANDVALUE; |
49 | 57 | typedef struct ossl_crmf_pbmparameter_st OSSL_CRMF_PBMPARAMETER; |
50 | 58 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PBMPARAMETER) |
@@ -53,7 +61,9 @@ typedef struct ossl_crmf_certrequest_st OSSL_CRMF_CERTREQUEST; | ||
53 | 61 | typedef struct ossl_crmf_certid_st OSSL_CRMF_CERTID; |
54 | 62 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTID) |
55 | 63 | DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_CERTID) |
56 | -DEFINE_OR_DECLARE_STACK_OF(OSSL_CRMF_CERTID) | |
64 | +{- | |
65 | + generate_stack_macros("OSSL_CRMF_CERTID"); | |
66 | +-} | |
57 | 67 | |
58 | 68 | typedef struct ossl_crmf_pkipublicationinfo_st OSSL_CRMF_PKIPUBLICATIONINFO; |
59 | 69 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PKIPUBLICATIONINFO) |
@@ -11,7 +11,6 @@ | ||
11 | 11 | |
12 | 12 | #include "cmp_testlib.h" |
13 | 13 | #include "../crypto/crmf/crmf_local.h" /* for manipulating POPO signature */ |
14 | -DEFINE_STACK_OF(OSSL_CRMF_MSG) | |
15 | 14 | |
16 | 15 | static const char *server_f; |
17 | 16 | static const char *client_f; |