diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-01-06 02:54:18 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-01-07 18:00:51 +0000 |
commit | 4a1f3f274108e25b97bd9870170fe2970892e155 (patch) | |
tree | 45e10bfbd19cec70d44d079d677b9852f12a501e /crypto/x509 | |
parent | 858857157290dd35145b14044ae96be9cd8eb0df (diff) |
Only declare stacks in headers
Don't define stacks in C source files: it causes warnings
about unused functions in some compilers.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/by_dir.c | 12 | ||||
-rw-r--r-- | crypto/x509/x509_lcl.h | 7 | ||||
-rw-r--r-- | crypto/x509/x_name.c | 4 |
3 files changed, 13 insertions, 10 deletions
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c index 7e49daadfd..717d258c34 100644 --- a/crypto/x509/by_dir.c +++ b/crypto/x509/by_dir.c @@ -73,26 +73,24 @@ #include <openssl/lhash.h> #include <openssl/x509.h> #include "internal/x509_int.h" +#include "x509_lcl.h" -typedef struct lookup_dir_hashes_st { +struct lookup_dir_hashes_st { unsigned long hash; int suffix; -} BY_DIR_HASH; +}; -typedef struct lookup_dir_entry_st { +struct lookup_dir_entry_st { char *dir; int dir_type; STACK_OF(BY_DIR_HASH) *hashes; -} BY_DIR_ENTRY; +}; typedef struct lookup_dir_st { BUF_MEM *buffer; STACK_OF(BY_DIR_ENTRY) *dirs; } BY_DIR; -DEFINE_STACK_OF(BY_DIR_HASH) -DEFINE_STACK_OF(BY_DIR_ENTRY) - static int dir_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl, char **ret); static int new_dir(X509_LOOKUP *lu); diff --git a/crypto/x509/x509_lcl.h b/crypto/x509/x509_lcl.h index e5c05ed252..724c241e69 100644 --- a/crypto/x509/x509_lcl.h +++ b/crypto/x509/x509_lcl.h @@ -113,3 +113,10 @@ struct x509_crl_method_st { ASN1_INTEGER *ser, X509_NAME *issuer); int (*crl_verify) (X509_CRL *crl, EVP_PKEY *pk); }; + +typedef struct lookup_dir_hashes_st BY_DIR_HASH; +typedef struct lookup_dir_entry_st BY_DIR_ENTRY; +DEFINE_STACK_OF(BY_DIR_HASH) +DEFINE_STACK_OF(BY_DIR_ENTRY) +typedef STACK_OF(X509_NAME_ENTRY) STACK_OF_X509_NAME_ENTRY; +DEFINE_STACK_OF(STACK_OF_X509_NAME_ENTRY) diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c index c12b248f3a..f151da4b9a 100644 --- a/crypto/x509/x_name.c +++ b/crypto/x509/x_name.c @@ -63,9 +63,7 @@ #include <openssl/x509.h> #include "internal/x509_int.h" #include "internal/asn1_int.h" - -typedef STACK_OF(X509_NAME_ENTRY) STACK_OF_X509_NAME_ENTRY; -DEFINE_STACK_OF(STACK_OF_X509_NAME_ENTRY) +#include "x509_lcl.h" static int x509_name_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long len, |