summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-12-23 00:47:28 +0000
committerDr. Stephen Henson <steve@openssl.org>2016-01-07 18:00:51 +0000
commit4a640fb6c395302d7aad22833d573c44211b0a2d (patch)
treedd8f1928f7ed2e3a9db1362934e6b37bfd8e9e12 /crypto
parent411abf2dd37974a5baa54859c1abcd287b3c1181 (diff)
Fix declarations and constification for inline stack.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asn1/ameth_lib.c2
-rw-r--r--crypto/cms/cms_env.c2
-rw-r--r--crypto/cms/cms_lcl.h2
-rw-r--r--crypto/cms/cms_lib.c3
-rw-r--r--crypto/evp/evp_pbe.c6
-rw-r--r--crypto/evp/pmeth_lib.c2
-rw-r--r--crypto/x509v3/pcy_int.h2
-rw-r--r--crypto/x509v3/pcy_node.c2
-rw-r--r--crypto/x509v3/pcy_tree.c2
9 files changed, 10 insertions, 13 deletions
diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c
index 85115bc5b7..cca4a79141 100644
--- a/crypto/asn1/ameth_lib.c
+++ b/crypto/asn1/ameth_lib.c
@@ -92,7 +92,7 @@ static const EVP_PKEY_ASN1_METHOD *standard_methods[] = {
};
typedef int sk_cmp_fn_type(const char *const *a, const char *const *b);
-DECLARE_STACK_OF(EVP_PKEY_ASN1_METHOD)
+DECLARE_CONST_STACK_OF(EVP_PKEY_ASN1_METHOD)
static STACK_OF(EVP_PKEY_ASN1_METHOD) *app_methods = NULL;
#ifdef TEST
diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c
index a9a9d84e60..0b765486b9 100644
--- a/crypto/cms/cms_env.c
+++ b/crypto/cms/cms_env.c
@@ -65,8 +65,6 @@
/* CMS EnvelopedData Utilities */
-DECLARE_STACK_OF(CMS_RecipientInfo)
-
CMS_EnvelopedData *cms_get0_enveloped(CMS_ContentInfo *cms)
{
if (OBJ_obj2nid(cms->contentType) != NID_pkcs7_enveloped) {
diff --git a/crypto/cms/cms_lcl.h b/crypto/cms/cms_lcl.h
index 3d41d4f634..abc2a2741c 100644
--- a/crypto/cms/cms_lcl.h
+++ b/crypto/cms/cms_lcl.h
@@ -109,6 +109,8 @@ struct CMS_ContentInfo_st {
} d;
};
+DECLARE_STACK_OF(CMS_CertificateChoices)
+
struct CMS_SignedData_st {
long version;
STACK_OF(X509_ALGOR) *digestAlgorithms;
diff --git a/crypto/cms/cms_lib.c b/crypto/cms/cms_lib.c
index fdc69f6f8f..f6de4efd3a 100644
--- a/crypto/cms/cms_lib.c
+++ b/crypto/cms/cms_lib.c
@@ -64,9 +64,6 @@
IMPLEMENT_ASN1_FUNCTIONS(CMS_ContentInfo)
IMPLEMENT_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
-DECLARE_STACK_OF(CMS_CertificateChoices)
-DECLARE_STACK_OF(CMS_RevocationInfoChoice)
-
const ASN1_OBJECT *CMS_get0_type(CMS_ContentInfo *cms)
{
return cms->contentType;
diff --git a/crypto/evp/evp_pbe.c b/crypto/evp/evp_pbe.c
index 563634ec53..dc908f804e 100644
--- a/crypto/evp/evp_pbe.c
+++ b/crypto/evp/evp_pbe.c
@@ -66,9 +66,6 @@
/* Password based encryption (PBE) functions */
-DECLARE_STACK_OF(EVP_PBE_CTL)
-static STACK_OF(EVP_PBE_CTL) *pbe_algs;
-
/* Setup a cipher context from a PBE algorithm */
typedef struct {
@@ -79,6 +76,9 @@ typedef struct {
EVP_PBE_KEYGEN *keygen;
} EVP_PBE_CTL;
+DECLARE_STACK_OF(EVP_PBE_CTL)
+static STACK_OF(EVP_PBE_CTL) *pbe_algs;
+
static const EVP_PBE_CTL builtin_pbe[] = {
{EVP_PBE_TYPE_OUTER, NID_pbeWithMD2AndDES_CBC,
NID_des_cbc, NID_md2, PKCS5_PBE_keyivgen},
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c
index a80fc33ccb..e880cfa37d 100644
--- a/crypto/evp/pmeth_lib.c
+++ b/crypto/evp/pmeth_lib.c
@@ -69,7 +69,7 @@
typedef int sk_cmp_fn_type(const char *const *a, const char *const *b);
-DECLARE_STACK_OF(EVP_PKEY_METHOD)
+DECLARE_CONST_STACK_OF(EVP_PKEY_METHOD)
static STACK_OF(EVP_PKEY_METHOD) *app_pkey_methods = NULL;
static const EVP_PKEY_METHOD *standard_methods[] = {
diff --git a/crypto/x509v3/pcy_int.h b/crypto/x509v3/pcy_int.h
index b5075f9edb..cbc94c0419 100644
--- a/crypto/x509v3/pcy_int.h
+++ b/crypto/x509v3/pcy_int.h
@@ -207,7 +207,7 @@ X509_POLICY_NODE *tree_find_sk(STACK_OF(X509_POLICY_NODE) *sk,
const ASN1_OBJECT *id);
X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
- const X509_POLICY_DATA *data,
+ X509_POLICY_DATA *data,
X509_POLICY_NODE *parent,
X509_POLICY_TREE *tree);
void policy_node_free(X509_POLICY_NODE *node);
diff --git a/crypto/x509v3/pcy_node.c b/crypto/x509v3/pcy_node.c
index 81b4c78bc2..a71f9b8eef 100644
--- a/crypto/x509v3/pcy_node.c
+++ b/crypto/x509v3/pcy_node.c
@@ -109,7 +109,7 @@ X509_POLICY_NODE *level_find_node(const X509_POLICY_LEVEL *level,
}
X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
- const X509_POLICY_DATA *data,
+ X509_POLICY_DATA *data,
X509_POLICY_NODE *parent,
X509_POLICY_TREE *tree)
{
diff --git a/crypto/x509v3/pcy_tree.c b/crypto/x509v3/pcy_tree.c
index 04d7bfc42a..a460333229 100644
--- a/crypto/x509v3/pcy_tree.c
+++ b/crypto/x509v3/pcy_tree.c
@@ -292,7 +292,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
}
static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
- const X509_POLICY_DATA *data)
+ X509_POLICY_DATA *data)
{
X509_POLICY_LEVEL *last = curr - 1;
X509_POLICY_NODE *node;