andre@0: /* This Source Code Form is subject to the terms of the Mozilla Public andre@0: * License, v. 2.0. If a copy of the MPL was not distributed with this andre@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ andre@0: /* andre@0: * pkix_pl_ocspresponse.h andre@0: * andre@0: * OcspResponse Object Definitions andre@0: * andre@0: */ andre@0: andre@0: #ifndef _PKIX_PL_OCSPRESPONSE_H andre@0: #define _PKIX_PL_OCSPRESPONSE_H andre@0: andre@0: #include "pkix_pl_common.h" andre@0: #include "pkix_pl_ocspcertid.h" andre@0: #include "hasht.h" andre@0: #include "cryptohi.h" andre@0: #include "ocspti.h" andre@0: #include "ocspi.h" andre@0: #include "plbase64.h" andre@0: andre@0: #ifdef __cplusplus andre@0: extern "C" { andre@0: #endif andre@0: andre@0: #define MAX_OCSP_RESPONSE_LEN (64*1024) andre@0: andre@0: struct PKIX_PL_OcspResponseStruct{ andre@0: PLArenaPool *arena; andre@0: const PKIX_PL_OcspRequest *request; andre@0: const SEC_HttpClientFcn *httpClient; andre@0: SEC_HTTP_SERVER_SESSION serverSession; andre@0: SEC_HTTP_REQUEST_SESSION sessionRequest; andre@0: PKIX_PL_VerifyCallback verifyFcn; andre@0: SECItem *encodedResponse; andre@0: CERTCertDBHandle *handle; andre@0: PRTime producedAt; andre@0: PKIX_PL_Date *producedAtDate; andre@0: PKIX_PL_Cert *pkixSignerCert; andre@0: CERTOCSPResponse *nssOCSPResponse; andre@0: CERTCertificate *signerCert; andre@0: }; andre@0: andre@0: /* see source file for function documentation */ andre@0: andre@0: PKIX_Error *pkix_pl_OcspResponse_RegisterSelf(void *plContext); andre@0: andre@0: PKIX_Error * andre@0: pkix_pl_OcspResponse_Create( andre@0: PKIX_PL_OcspRequest *request, andre@0: const char *httpMechanism, andre@0: void *responder, andre@0: PKIX_PL_VerifyCallback verifyFcn, andre@0: void **pNBIOContext, andre@0: PKIX_PL_OcspResponse **pResponse, andre@0: void *plContext); andre@0: andre@0: PKIX_Error * andre@0: pkix_pl_OcspResponse_Decode( andre@0: PKIX_PL_OcspResponse *response, andre@0: PKIX_Boolean *passed, andre@0: SECErrorCodes *pReturnCode, andre@0: void *plContext); andre@0: andre@0: PKIX_Error * andre@0: pkix_pl_OcspResponse_GetStatus( andre@0: PKIX_PL_OcspResponse *response, andre@0: PKIX_Boolean *passed, andre@0: SECErrorCodes *pReturnCode, andre@0: void *plContext); andre@0: andre@0: PKIX_Error * andre@0: pkix_pl_OcspResponse_VerifySignature( andre@0: PKIX_PL_OcspResponse *response, andre@0: PKIX_PL_Cert *cert, andre@0: PKIX_ProcessingParams *procParams, andre@0: PKIX_Boolean *pPassed, andre@0: void **pNBIOContext, andre@0: void *plContext); andre@0: andre@0: PKIX_Error * andre@0: pkix_pl_OcspResponse_GetStatusForCert( andre@0: PKIX_PL_OcspCertID *cid, andre@0: PKIX_PL_OcspResponse *response, andre@0: PKIX_Boolean allowCachingOfFailures, andre@0: PKIX_PL_Date *validity, andre@0: PKIX_Boolean *pPassed, andre@0: SECErrorCodes *pReturnCode, andre@0: void *plContext); andre@0: andre@0: PKIX_Error * andre@0: PKIX_PL_OcspResponse_UseBuildChain( andre@0: PKIX_PL_Cert *signerCert, andre@0: PKIX_PL_Date *producedAt, andre@0: PKIX_ProcessingParams *procParams, andre@0: void **pNBIOContext, andre@0: void **pState, andre@0: PKIX_BuildResult **pBuildResult, andre@0: PKIX_VerifyNode **pVerifyTree, andre@0: void *plContext); andre@0: andre@0: #ifdef __cplusplus andre@0: } andre@0: #endif andre@0: andre@0: #endif /* _PKIX_PL_OCSPRESPONSE_H */