| OLD | NEW |
| (Empty) | |
| 1 Index: mozilla/security/nss/lib/certhigh/ocsp.c |
| 2 =================================================================== |
| 3 RCS file: /cvsroot/mozilla/security/nss/lib/certhigh/ocsp.c,v |
| 4 retrieving revision 1.71 |
| 5 diff -p -u -8 -r1.71 ocsp.c |
| 6 --- mozilla/security/nss/lib/certhigh/ocsp.c 31 May 2012 22:03:36 -0000
1.71 |
| 7 +++ mozilla/security/nss/lib/certhigh/ocsp.c 22 Sep 2012 13:37:58 -0000 |
| 8 @@ -100,17 +100,17 @@ static struct OCSPGlobalStruct { |
| 9 }; |
| 10 |
| 11 |
| 12 |
| 13 /* Forward declarations */ |
| 14 static SECItem * |
| 15 ocsp_GetEncodedOCSPResponseFromRequest(PRArenaPool *arena, |
| 16 CERTOCSPRequest *request, |
| 17 - char *location, int64 time, |
| 18 + const char *location, int64 time, |
| 19 PRBool addServiceLocator, |
| 20 void *pwArg, |
| 21 CERTOCSPRequest **pRequest); |
| 22 static SECStatus |
| 23 ocsp_GetOCSPStatusFromNetwork(CERTCertDBHandle *handle, |
| 24 CERTOCSPCertID *certID, |
| 25 CERTCertificate *cert, |
| 26 int64 time, |
| 27 @@ -2903,17 +2903,17 @@ loser: |
| 28 * Sends an encoded OCSP request to the server identified by "location", |
| 29 * and returns the socket on which it was sent (so can listen for the reply). |
| 30 * "location" is expected to be a valid URL -- an error parsing it produces |
| 31 * SEC_ERROR_CERT_BAD_ACCESS_LOCATION. Other errors are likely problems |
| 32 * connecting to it, or writing to it, or allocating memory, and the low-level |
| 33 * errors appropriate to the problem will be set. |
| 34 */ |
| 35 static PRFileDesc * |
| 36 -ocsp_SendEncodedRequest(char *location, SECItem *encodedRequest) |
| 37 +ocsp_SendEncodedRequest(const char *location, SECItem *encodedRequest) |
| 38 { |
| 39 char *hostname = NULL; |
| 40 char *path = NULL; |
| 41 PRUint16 port; |
| 42 SECStatus rv; |
| 43 PRFileDesc *sock = NULL; |
| 44 PRFileDesc *returnSock = NULL; |
| 45 char *header = NULL; |
| 46 @@ -3262,17 +3262,17 @@ CERT_ParseURL(const char *url, char **pH |
| 47 /* |
| 48 * Limit the size of http responses we are willing to accept. |
| 49 */ |
| 50 #define MAX_WANTED_OCSP_RESPONSE_LEN 64*1024 |
| 51 |
| 52 static SECItem * |
| 53 fetchOcspHttpClientV1(PRArenaPool *arena, |
| 54 const SEC_HttpClientFcnV1 *hcv1, |
| 55 - char *location, |
| 56 + const char *location, |
| 57 SECItem *encodedRequest) |
| 58 { |
| 59 char *hostname = NULL; |
| 60 char *path = NULL; |
| 61 PRUint16 port; |
| 62 SECItem *encodedResponse = NULL; |
| 63 SEC_HTTP_SERVER_SESSION pServerSession = NULL; |
| 64 SEC_HTTP_REQUEST_SESSION pRequestSession = NULL; |
| 65 @@ -3381,17 +3381,17 @@ loser: |
| 66 * CERTCertList *certList |
| 67 * A list of certs for which status will be requested. |
| 68 * Note that all of these certificates should have the same issuer, |
| 69 * or it's expected the response will be signed by a trusted responder. |
| 70 * If the certs need to be broken up into multiple requests, that |
| 71 * must be handled by the caller (and thus by having multiple calls |
| 72 * to this routine), who knows about where the request(s) are being |
| 73 * sent and whether there are any trusted responders in place. |
| 74 - * char *location |
| 75 + * const char *location |
| 76 * The location of the OCSP responder (a URL). |
| 77 * int64 time |
| 78 * Indicates the time for which the certificate status is to be |
| 79 * determined -- this may be used in the search for the cert's issuer |
| 80 * but has no other bearing on the operation. |
| 81 * PRBool addServiceLocator |
| 82 * If true, the Service Locator extension should be added to the |
| 83 * single request(s) for each cert. |
| 84 @@ -3430,17 +3430,17 @@ CERT_GetEncodedOCSPResponse(PRArenaPool |
| 85 return ocsp_GetEncodedOCSPResponseFromRequest(arena, request, location, |
| 86 time, addServiceLocator, |
| 87 pwArg, pRequest); |
| 88 } |
| 89 |
| 90 static SECItem * |
| 91 ocsp_GetEncodedOCSPResponseFromRequest(PRArenaPool *arena, |
| 92 CERTOCSPRequest *request, |
| 93 - char *location, int64 time, |
| 94 + const char *location, int64 time, |
| 95 PRBool addServiceLocator, |
| 96 void *pwArg, |
| 97 CERTOCSPRequest **pRequest) |
| 98 { |
| 99 SECItem *encodedRequest = NULL; |
| 100 SECItem *encodedResponse = NULL; |
| 101 PRFileDesc *sock = NULL; |
| 102 SECStatus rv; |
| 103 @@ -3491,17 +3491,17 @@ loser: |
| 104 |
| 105 return encodedResponse; |
| 106 } |
| 107 |
| 108 static SECItem * |
| 109 ocsp_GetEncodedOCSPResponseForSingleCert(PRArenaPool *arena, |
| 110 CERTOCSPCertID *certID, |
| 111 CERTCertificate *singleCert, |
| 112 - char *location, int64 time, |
| 113 + const char *location, int64 time, |
| 114 PRBool addServiceLocator, |
| 115 void *pwArg, |
| 116 CERTOCSPRequest **pRequest) |
| 117 { |
| 118 CERTOCSPRequest *request; |
| 119 request = cert_CreateSingleCertOCSPRequest(certID, singleCert, time, |
| 120 addServiceLocator, NULL); |
| 121 if (!request) |
| 122 Index: mozilla/security/nss/lib/certhigh/ocsp.h |
| 123 =================================================================== |
| 124 RCS file: /cvsroot/mozilla/security/nss/lib/certhigh/ocsp.h,v |
| 125 retrieving revision 1.21 |
| 126 diff -p -u -8 -r1.21 ocsp.h |
| 127 --- mozilla/security/nss/lib/certhigh/ocsp.h 31 May 2012 22:03:36 -0000
1.21 |
| 128 +++ mozilla/security/nss/lib/certhigh/ocsp.h 22 Sep 2012 13:37:58 -0000 |
| 129 @@ -116,21 +116,21 @@ CERT_DisableOCSPChecking(CERTCertDBHandl |
| 130 * If OCSP checking is already enabled *and* use of a default responder |
| 131 * is also already enabled, all OCSP checking from now on will go directly |
| 132 * to the specified responder. If OCSP checking is not enabled, or if |
| 133 * it is but use of a default responder is not enabled, the information |
| 134 * will be recorded and take effect whenever both are enabled. |
| 135 * INPUTS: |
| 136 * CERTCertDBHandle *handle |
| 137 * Cert database on which OCSP checking should use the default responder. |
| 138 - * char *url |
| 139 + * const char *url |
| 140 * The location of the default responder (e.g. "http://foo.com:80/ocsp") |
| 141 * Note that the location will not be tested until the first attempt |
| 142 * to send a request there. |
| 143 - * char *name |
| 144 + * const char *name |
| 145 * The nickname of the cert to trust (expected) to sign the OCSP responses. |
| 146 * If the corresponding cert cannot be found, SECFailure is returned. |
| 147 * RETURN: |
| 148 * Returns SECFailure if an error occurred; SECSuccess otherwise. |
| 149 * The most likely error is that the cert for "name" could not be found |
| 150 * (probably SEC_ERROR_UNKNOWN_CERT). Other errors are low-level (no memory, |
| 151 * bad database, etc.). |
| 152 */ |
| 153 @@ -326,17 +326,17 @@ CERT_DestroyOCSPResponse(CERTOCSPRespons |
| 154 * CERTCertList *certList |
| 155 * A list of certs for which status will be requested. |
| 156 * Note that all of these certificates should have the same issuer, |
| 157 * or it's expected the response will be signed by a trusted responder. |
| 158 * If the certs need to be broken up into multiple requests, that |
| 159 * must be handled by the caller (and thus by having multiple calls |
| 160 * to this routine), who knows about where the request(s) are being |
| 161 * sent and whether there are any trusted responders in place. |
| 162 - * char *location |
| 163 + * const char *location |
| 164 * The location of the OCSP responder (a URL). |
| 165 * PRTime time |
| 166 * Indicates the time for which the certificate status is to be |
| 167 * determined -- this may be used in the search for the cert's issuer |
| 168 * but has no other bearing on the operation. |
| 169 * PRBool addServiceLocator |
| 170 * If true, the Service Locator extension should be added to the |
| 171 * single request(s) for each cert. |
| 172 @@ -445,22 +445,22 @@ CERT_RegisterAlternateOCSPAIAInfoCallBac |
| 173 /* |
| 174 * FUNCTION: CERT_ParseURL |
| 175 * Parse a URI into hostname, port, and path. The scheme in the URI must |
| 176 * be "http". |
| 177 * INPUTS: |
| 178 * const char *url |
| 179 * The URI to be parsed |
| 180 * OUTPUTS: |
| 181 - * char *pHostname |
| 182 + * char **pHostname |
| 183 * Pointer to store the hostname obtained from the URI. |
| 184 * This result should be freed (via PORT_Free) when no longer in use. |
| 185 * PRUint16 *pPort |
| 186 * Pointer to store the port number obtained from the URI. |
| 187 - * char *pPath |
| 188 + * char **pPath |
| 189 * Pointer to store the path obtained from the URI. |
| 190 * This result should be freed (via PORT_Free) when no longer in use. |
| 191 * RETURN: |
| 192 * Returns SECSuccess when parsing was successful. Returns SECFailure when |
| 193 * problems were encountered. |
| 194 */ |
| 195 extern SECStatus |
| 196 CERT_ParseURL(const char *url, char **pHostname, PRUint16 *pPort, char **pPath)
; |
| OLD | NEW |