New non-blocking OCSP functionality.
[openssl.git] / crypto / ocsp / ocsp.h
index 07b18c49d3280bbb56d831b806a055e17343bb0f..5ac4ac42031668d93a1f3c7f5011d4cc2e510e2d 100644 (file)
@@ -64,6 +64,7 @@
 #ifndef HEADER_OCSP_H
 #define HEADER_OCSP_H
 
+#include <openssl/ossl_typ.h>
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
 #include <openssl/safestack.h>
@@ -397,6 +398,10 @@ typedef struct ocsp_service_locator_st
                (char *(*)())d2i_OCSP_CERTSTATUS,(char *)(cs))
 
 OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req);
+OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req,
+                                                               int maxline);
+int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx);
+void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx);
 
 OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);
 
@@ -469,7 +474,7 @@ int OCSP_basic_sign(OCSP_BASICRESP *brsp,
 ASN1_STRING *ASN1_STRING_encode(ASN1_STRING *s, i2d_of_void *i2d,
                                void *data, STACK_OF(ASN1_OBJECT) *sk);
 #define ASN1_STRING_encode_of(type,s,i2d,data,sk) \
-((ASN1_STRING *(*)(ASN1_STRING *,I2D_OF(type),type *,STACK_OF(ASN1_OBJECT) *))ASN1_STRING_encode)(s,i2d,data,sk)
+((ASN1_STRING *(*)(ASN1_STRING *,I2D_OF(type),type *,STACK_OF(ASN1_OBJECT) *))openssl_fcast(ASN1_STRING_encode))(s,i2d,data,sk)
 
 X509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim);
 
@@ -559,11 +564,11 @@ void ERR_load_OCSP_strings(void);
 
 /* Function codes. */
 #define OCSP_F_ASN1_STRING_ENCODE                       100
-#define OCSP_F_CERT_ID_NEW                              101
 #define OCSP_F_D2I_OCSP_NONCE                           102
 #define OCSP_F_OCSP_BASIC_ADD1_STATUS                   103
 #define OCSP_F_OCSP_BASIC_SIGN                          104
 #define OCSP_F_OCSP_BASIC_VERIFY                        105
+#define OCSP_F_OCSP_CERT_ID_NEW                                 101
 #define OCSP_F_OCSP_CHECK_DELEGATED                     106
 #define OCSP_F_OCSP_CHECK_IDS                           107
 #define OCSP_F_OCSP_CHECK_ISSUER                        108
@@ -574,6 +579,7 @@ void ERR_load_OCSP_strings(void);
 #define OCSP_F_OCSP_REQUEST_VERIFY                      116
 #define OCSP_F_OCSP_RESPONSE_GET1_BASIC                         111
 #define OCSP_F_OCSP_SENDREQ_BIO                                 112
+#define OCSP_F_OCSP_SENDREQ_NBIO                        117
 #define OCSP_F_REQUEST_VERIFY                           113
 
 /* Reason codes. */