提交 5951e840 编写于 作者: M Matt Caswell

Fix no-ocsp on Windows (and probably VMS)

The ocsp.h file did not have appropriate guards causing link failures on
Windows.

GH Issue 900
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 5d94e5b6
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
#include <ctype.h> #include <ctype.h>
#include <limits.h> #include <limits.h>
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/x509v3.h>
#define MAX_OPT_HELP_WIDTH 30 #define MAX_OPT_HELP_WIDTH 30
const char OPT_HELP_STR[] = "--"; const char OPT_HELP_STR[] = "--";
......
...@@ -66,6 +66,37 @@ ...@@ -66,6 +66,37 @@
#ifndef HEADER_OCSP_H #ifndef HEADER_OCSP_H
# define HEADER_OCSP_H # define HEADER_OCSP_H
#include <openssl/opensslconf.h>
/*
* These definitions are outside the OPENSSL_NO_OCSP guard because although for
* historical reasons they have OCSP_* names, they can actually be used
* independently of OCSP. E.g. see RFC5280
*/
/*-
* CRLReason ::= ENUMERATED {
* unspecified (0),
* keyCompromise (1),
* cACompromise (2),
* affiliationChanged (3),
* superseded (4),
* cessationOfOperation (5),
* certificateHold (6),
* removeFromCRL (8) }
*/
# define OCSP_REVOKED_STATUS_NOSTATUS -1
# define OCSP_REVOKED_STATUS_UNSPECIFIED 0
# define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1
# define OCSP_REVOKED_STATUS_CACOMPROMISE 2
# define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3
# define OCSP_REVOKED_STATUS_SUPERSEDED 4
# define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5
# define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6
# define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8
# ifndef OPENSSL_NO_OCSP
# include <openssl/ossl_typ.h> # include <openssl/ossl_typ.h>
# include <openssl/x509.h> # include <openssl/x509.h>
# include <openssl/x509v3.h> # include <openssl/x509v3.h>
...@@ -134,27 +165,6 @@ typedef struct ocsp_response_data_st OCSP_RESPDATA; ...@@ -134,27 +165,6 @@ typedef struct ocsp_response_data_st OCSP_RESPDATA;
typedef struct ocsp_basic_response_st OCSP_BASICRESP; typedef struct ocsp_basic_response_st OCSP_BASICRESP;
/*-
* CRLReason ::= ENUMERATED {
* unspecified (0),
* keyCompromise (1),
* cACompromise (2),
* affiliationChanged (3),
* superseded (4),
* cessationOfOperation (5),
* certificateHold (6),
* removeFromCRL (8) }
*/
# define OCSP_REVOKED_STATUS_NOSTATUS -1
# define OCSP_REVOKED_STATUS_UNSPECIFIED 0
# define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1
# define OCSP_REVOKED_STATUS_CACOMPROMISE 2
# define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3
# define OCSP_REVOKED_STATUS_SUPERSEDED 4
# define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5
# define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6
# define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8
typedef struct ocsp_crl_id_st OCSP_CRLID; typedef struct ocsp_crl_id_st OCSP_CRLID;
typedef struct ocsp_service_locator_st OCSP_SERVICELOC; typedef struct ocsp_service_locator_st OCSP_SERVICELOC;
...@@ -453,4 +463,5 @@ void ERR_load_OCSP_strings(void); ...@@ -453,4 +463,5 @@ void ERR_load_OCSP_strings(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
# endif
#endif #endif
...@@ -114,6 +114,8 @@ ...@@ -114,6 +114,8 @@
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/hmac.h> #include <openssl/hmac.h>
#include <openssl/ocsp.h> #include <openssl/ocsp.h>
#include <openssl/conf.h>
#include <openssl/x509v3.h>
#include <openssl/rand.h> #include <openssl/rand.h>
#include <openssl/dh.h> #include <openssl/dh.h>
#include <openssl/bn.h> #include <openssl/bn.h>
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册