aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-05-26 15:42:01 -0400
committerRich Salz <rsalz@openssl.org>2015-05-28 12:54:27 -0400
commitbca3f06b84de3c0b428724ac535995064c54aee3 (patch)
treecf52bd77074b0d4efa30e864d5dd9b2aae220040 /include
parentd9f1c639d5162617ab0aeec23865771dc4fbcbcd (diff)
downloadopenssl-bca3f06b84de3c0b428724ac535995064c54aee3.tar.gz
Use enum for X509_LOOKUP_TYPE
Using an enum with -Wswitch means all lookup routines handle all cases. Remove X509_LU_PKEY which was never used. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'include')
-rw-r--r--include/openssl/x509_vfy.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/openssl/x509_vfy.h b/include/openssl/x509_vfy.h
index 0be9b5a844..4ad20296f8 100644
--- a/include/openssl/x509_vfy.h
+++ b/include/openssl/x509_vfy.h
@@ -102,15 +102,14 @@ The X509_STORE then calls a function to actually verify the
certificate chain.
*/
-# define X509_LU_RETRY -1
-# define X509_LU_FAIL 0
-# define X509_LU_X509 1
-# define X509_LU_CRL 2
-# define X509_LU_PKEY 3
+typedef enum {
+ X509_LU_RETRY = -1,
+ X509_LU_FAIL, X509_LU_X509, X509_LU_CRL
+} X509_LOOKUP_TYPE;
typedef struct x509_object_st {
/* one of the above types */
- int type;
+ X509_LOOKUP_TYPE type;
union {
char *ptr;
X509 *x509;