| OLD | NEW |
| 1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
| 2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 4 /* | 4 /* |
| 5 * ocspi.h - NSS internal interfaces to OCSP code | 5 * ocspi.h - NSS internal interfaces to OCSP code |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef _OCSPI_H_ | 8 #ifndef _OCSPI_H_ |
| 9 #define _OCSPI_H_ | 9 #define _OCSPI_H_ |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 SECItem *tbsResponseDataDER, | 34 SECItem *tbsResponseDataDER, |
| 35 void *pwArg); | 35 void *pwArg); |
| 36 | 36 |
| 37 CERTOCSPRequest * | 37 CERTOCSPRequest * |
| 38 cert_CreateSingleCertOCSPRequest(CERTOCSPCertID *certID, | 38 cert_CreateSingleCertOCSPRequest(CERTOCSPCertID *certID, |
| 39 CERTCertificate *singleCert, | 39 CERTCertificate *singleCert, |
| 40 PRTime time, | 40 PRTime time, |
| 41 PRBool addServiceLocator, | 41 PRBool addServiceLocator, |
| 42 CERTCertificate *signerCert); | 42 CERTCertificate *signerCert); |
| 43 | 43 |
| 44 typedef enum { ocspMissing, ocspFresh, ocspStale } OCSPFreshness; |
| 45 |
| 44 SECStatus | 46 SECStatus |
| 45 ocsp_GetCachedOCSPResponseStatusIfFresh(CERTOCSPCertID *certID, | 47 ocsp_GetCachedOCSPResponseStatus(CERTOCSPCertID *certID, |
| 46 PRTime time, | 48 PRTime time, |
| 47 PRBool ignoreOcspFailureMode, | 49 PRBool ignoreOcspFailureMode, |
| 48 SECStatus *rvOcsp, | 50 SECStatus *rvOcsp, |
| 49 SECErrorCodes *missingResponseError); | 51 SECErrorCodes *missingResponseError, |
| 52 OCSPFreshness *freshness); |
| 50 | 53 |
| 51 /* | 54 /* |
| 52 * FUNCTION: cert_ProcessOCSPResponse | 55 * FUNCTION: cert_ProcessOCSPResponse |
| 53 * Same behavior and basic parameters as CERT_GetOCSPStatusForCertID. | 56 * Same behavior and basic parameters as CERT_GetOCSPStatusForCertID. |
| 54 * In addition it can update the OCSP cache (using information | 57 * In addition it can update the OCSP cache (using information |
| 55 * available internally to this function). | 58 * available internally to this function). |
| 56 * INPUTS: | 59 * INPUTS: |
| 57 * CERTCertDBHandle *handle | 60 * CERTCertDBHandle *handle |
| 58 * certificate DB of the cert that is being checked | 61 * certificate DB of the cert that is being checked |
| 59 * CERTOCSPResponse *response | 62 * CERTOCSPResponse *response |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 /* FUNCTION: ocsp_FetchingFailureIsVerificationFailure | 135 /* FUNCTION: ocsp_FetchingFailureIsVerificationFailure |
| 133 * The function checks the global ocsp settings and | 136 * The function checks the global ocsp settings and |
| 134 * tells how to treat an ocsp response fetching failure. | 137 * tells how to treat an ocsp response fetching failure. |
| 135 * RETURNS: | 138 * RETURNS: |
| 136 * if PR_TRUE is returned, then treat fetching as a | 139 * if PR_TRUE is returned, then treat fetching as a |
| 137 * revoked cert status. | 140 * revoked cert status. |
| 138 */ | 141 */ |
| 139 PRBool | 142 PRBool |
| 140 ocsp_FetchingFailureIsVerificationFailure(void); | 143 ocsp_FetchingFailureIsVerificationFailure(void); |
| 141 | 144 |
| 145 size_t |
| 146 ocsp_UrlEncodeBase64Buf(const char *base64Buf, char *outputBuf); |
| 147 |
| 148 SECStatus |
| 149 ocsp_GetVerifiedSingleResponseForCertID(CERTCertDBHandle *handle, |
| 150 CERTOCSPResponse *response, |
| 151 CERTOCSPCertID *certID, |
| 152 CERTCertificate *signerCert, |
| 153 PRTime time, |
| 154 CERTOCSPSingleResponse **pSingleResponse
); |
| 155 |
| 156 SECStatus |
| 157 ocsp_CertHasGoodStatus(ocspCertStatus *status, PRTime time); |
| 158 |
| 159 void |
| 160 ocsp_CacheSingleResponse(CERTOCSPCertID *certID, |
| 161 CERTOCSPSingleResponse *single, |
| 162 PRBool *certIDWasConsumed); |
| 163 |
| 142 #endif /* _OCSPI_H_ */ | 164 #endif /* _OCSPI_H_ */ |
| OLD | NEW |