diff options
| author | beck <> | 2023-07-08 10:44:00 +0000 |
|---|---|---|
| committer | beck <> | 2023-07-08 10:44:00 +0000 |
| commit | 74c07cfc5fdb0509df57f93456ab3a89a9252697 (patch) | |
| tree | ddfc350f4441a2d4dfaa8b6f20f83e6cabdf712e /src/lib/libcrypto/ocsp/ocsp_cl.c | |
| parent | 842e06ad9bdf75858b4eca096b3f27979b2101fd (diff) | |
| download | openbsd-74c07cfc5fdb0509df57f93456ab3a89a9252697.tar.gz openbsd-74c07cfc5fdb0509df57f93456ab3a89a9252697.tar.bz2 openbsd-74c07cfc5fdb0509df57f93456ab3a89a9252697.zip | |
Hide symbols in cast, idea, and ocsp
ok tb@
Diffstat (limited to 'src/lib/libcrypto/ocsp/ocsp_cl.c')
| -rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_cl.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ocsp/ocsp_cl.c b/src/lib/libcrypto/ocsp/ocsp_cl.c index 7747020221..89113f78b8 100644 --- a/src/lib/libcrypto/ocsp/ocsp_cl.c +++ b/src/lib/libcrypto/ocsp/ocsp_cl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ocsp_cl.c,v 1.22 2022/12/26 07:18:52 jmc Exp $ */ | 1 | /* $OpenBSD: ocsp_cl.c,v 1.23 2023/07/08 10:44:00 beck Exp $ */ |
| 2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL | 2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL |
| 3 | * project. */ | 3 | * project. */ |
| 4 | 4 | ||
| @@ -99,6 +99,7 @@ OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid) | |||
| 99 | OCSP_ONEREQ_free(one); | 99 | OCSP_ONEREQ_free(one); |
| 100 | return NULL; | 100 | return NULL; |
| 101 | } | 101 | } |
| 102 | LCRYPTO_ALIAS(OCSP_request_add0_id); | ||
| 102 | 103 | ||
| 103 | /* Set requestorName from an X509_NAME structure */ | 104 | /* Set requestorName from an X509_NAME structure */ |
| 104 | int | 105 | int |
| @@ -119,6 +120,7 @@ OCSP_request_set1_name(OCSP_REQUEST *req, X509_NAME *nm) | |||
| 119 | req->tbsRequest->requestorName = gen; | 120 | req->tbsRequest->requestorName = gen; |
| 120 | return 1; | 121 | return 1; |
| 121 | } | 122 | } |
| 123 | LCRYPTO_ALIAS(OCSP_request_set1_name); | ||
| 122 | 124 | ||
| 123 | /* Add a certificate to an OCSP request */ | 125 | /* Add a certificate to an OCSP request */ |
| 124 | int | 126 | int |
| @@ -141,6 +143,7 @@ OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert) | |||
| 141 | X509_up_ref(cert); | 143 | X509_up_ref(cert); |
| 142 | return 1; | 144 | return 1; |
| 143 | } | 145 | } |
| 146 | LCRYPTO_ALIAS(OCSP_request_add1_cert); | ||
| 144 | 147 | ||
| 145 | /* Sign an OCSP request set the requestorName to the subject | 148 | /* Sign an OCSP request set the requestorName to the subject |
| 146 | * name of an optional signers certificate and include one | 149 | * name of an optional signers certificate and include one |
| @@ -186,6 +189,7 @@ err: | |||
| 186 | req->optionalSignature = NULL; | 189 | req->optionalSignature = NULL; |
| 187 | return 0; | 190 | return 0; |
| 188 | } | 191 | } |
| 192 | LCRYPTO_ALIAS(OCSP_request_sign); | ||
| 189 | 193 | ||
| 190 | /* Get response status */ | 194 | /* Get response status */ |
| 191 | int | 195 | int |
| @@ -193,6 +197,7 @@ OCSP_response_status(OCSP_RESPONSE *resp) | |||
| 193 | { | 197 | { |
| 194 | return ASN1_ENUMERATED_get(resp->responseStatus); | 198 | return ASN1_ENUMERATED_get(resp->responseStatus); |
| 195 | } | 199 | } |
| 200 | LCRYPTO_ALIAS(OCSP_response_status); | ||
| 196 | 201 | ||
| 197 | /* Extract basic response from OCSP_RESPONSE or NULL if | 202 | /* Extract basic response from OCSP_RESPONSE or NULL if |
| 198 | * no basic response present. | 203 | * no basic response present. |
| @@ -214,6 +219,7 @@ OCSP_response_get1_basic(OCSP_RESPONSE *resp) | |||
| 214 | 219 | ||
| 215 | return ASN1_item_unpack(rb->response, &OCSP_BASICRESP_it); | 220 | return ASN1_item_unpack(rb->response, &OCSP_BASICRESP_it); |
| 216 | } | 221 | } |
| 222 | LCRYPTO_ALIAS(OCSP_response_get1_basic); | ||
| 217 | 223 | ||
| 218 | /* Return number of OCSP_SINGLERESP responses present in | 224 | /* Return number of OCSP_SINGLERESP responses present in |
| 219 | * a basic response. | 225 | * a basic response. |
| @@ -225,6 +231,7 @@ OCSP_resp_count(OCSP_BASICRESP *bs) | |||
| 225 | return -1; | 231 | return -1; |
| 226 | return sk_OCSP_SINGLERESP_num(bs->tbsResponseData->responses); | 232 | return sk_OCSP_SINGLERESP_num(bs->tbsResponseData->responses); |
| 227 | } | 233 | } |
| 234 | LCRYPTO_ALIAS(OCSP_resp_count); | ||
| 228 | 235 | ||
| 229 | /* Extract an OCSP_SINGLERESP response with a given index */ | 236 | /* Extract an OCSP_SINGLERESP response with a given index */ |
| 230 | OCSP_SINGLERESP * | 237 | OCSP_SINGLERESP * |
| @@ -234,18 +241,21 @@ OCSP_resp_get0(OCSP_BASICRESP *bs, int idx) | |||
| 234 | return NULL; | 241 | return NULL; |
| 235 | return sk_OCSP_SINGLERESP_value(bs->tbsResponseData->responses, idx); | 242 | return sk_OCSP_SINGLERESP_value(bs->tbsResponseData->responses, idx); |
| 236 | } | 243 | } |
| 244 | LCRYPTO_ALIAS(OCSP_resp_get0); | ||
| 237 | 245 | ||
| 238 | const ASN1_GENERALIZEDTIME * | 246 | const ASN1_GENERALIZEDTIME * |
| 239 | OCSP_resp_get0_produced_at(const OCSP_BASICRESP *bs) | 247 | OCSP_resp_get0_produced_at(const OCSP_BASICRESP *bs) |
| 240 | { | 248 | { |
| 241 | return bs->tbsResponseData->producedAt; | 249 | return bs->tbsResponseData->producedAt; |
| 242 | } | 250 | } |
| 251 | LCRYPTO_ALIAS(OCSP_resp_get0_produced_at); | ||
| 243 | 252 | ||
| 244 | const STACK_OF(X509) * | 253 | const STACK_OF(X509) * |
| 245 | OCSP_resp_get0_certs(const OCSP_BASICRESP *bs) | 254 | OCSP_resp_get0_certs(const OCSP_BASICRESP *bs) |
| 246 | { | 255 | { |
| 247 | return bs->certs; | 256 | return bs->certs; |
| 248 | } | 257 | } |
| 258 | LCRYPTO_ALIAS(OCSP_resp_get0_certs); | ||
| 249 | 259 | ||
| 250 | int | 260 | int |
| 251 | OCSP_resp_get0_id(const OCSP_BASICRESP *bs, const ASN1_OCTET_STRING **pid, | 261 | OCSP_resp_get0_id(const OCSP_BASICRESP *bs, const ASN1_OCTET_STRING **pid, |
| @@ -265,24 +275,28 @@ OCSP_resp_get0_id(const OCSP_BASICRESP *bs, const ASN1_OCTET_STRING **pid, | |||
| 265 | 275 | ||
| 266 | return 1; | 276 | return 1; |
| 267 | } | 277 | } |
| 278 | LCRYPTO_ALIAS(OCSP_resp_get0_id); | ||
| 268 | 279 | ||
| 269 | const ASN1_OCTET_STRING * | 280 | const ASN1_OCTET_STRING * |
| 270 | OCSP_resp_get0_signature(const OCSP_BASICRESP *bs) | 281 | OCSP_resp_get0_signature(const OCSP_BASICRESP *bs) |
| 271 | { | 282 | { |
| 272 | return bs->signature; | 283 | return bs->signature; |
| 273 | } | 284 | } |
| 285 | LCRYPTO_ALIAS(OCSP_resp_get0_signature); | ||
| 274 | 286 | ||
| 275 | const X509_ALGOR * | 287 | const X509_ALGOR * |
| 276 | OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs) | 288 | OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs) |
| 277 | { | 289 | { |
| 278 | return bs->signatureAlgorithm; | 290 | return bs->signatureAlgorithm; |
| 279 | } | 291 | } |
| 292 | LCRYPTO_ALIAS(OCSP_resp_get0_tbs_sigalg); | ||
| 280 | 293 | ||
| 281 | const OCSP_RESPDATA * | 294 | const OCSP_RESPDATA * |
| 282 | OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs) | 295 | OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs) |
| 283 | { | 296 | { |
| 284 | return bs->tbsResponseData; | 297 | return bs->tbsResponseData; |
| 285 | } | 298 | } |
| 299 | LCRYPTO_ALIAS(OCSP_resp_get0_respdata); | ||
| 286 | 300 | ||
| 287 | /* Look single response matching a given certificate ID */ | 301 | /* Look single response matching a given certificate ID */ |
| 288 | int | 302 | int |
| @@ -306,6 +320,7 @@ OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last) | |||
| 306 | } | 320 | } |
| 307 | return -1; | 321 | return -1; |
| 308 | } | 322 | } |
| 323 | LCRYPTO_ALIAS(OCSP_resp_find); | ||
| 309 | 324 | ||
| 310 | /* Extract status information from an OCSP_SINGLERESP structure. | 325 | /* Extract status information from an OCSP_SINGLERESP structure. |
| 311 | * Note: the revtime and reason values are only set if the | 326 | * Note: the revtime and reason values are only set if the |
| @@ -343,6 +358,7 @@ OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason, | |||
| 343 | *nextupd = single->nextUpdate; | 358 | *nextupd = single->nextUpdate; |
| 344 | return ret; | 359 | return ret; |
| 345 | } | 360 | } |
| 361 | LCRYPTO_ALIAS(OCSP_single_get0_status); | ||
| 346 | 362 | ||
| 347 | /* This function combines the previous ones: look up a certificate ID and | 363 | /* This function combines the previous ones: look up a certificate ID and |
| 348 | * if found extract status information. Return 0 is successful. | 364 | * if found extract status information. Return 0 is successful. |
| @@ -365,6 +381,7 @@ OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status, | |||
| 365 | *status = i; | 381 | *status = i; |
| 366 | return 1; | 382 | return 1; |
| 367 | } | 383 | } |
| 384 | LCRYPTO_ALIAS(OCSP_resp_find_status); | ||
| 368 | 385 | ||
| 369 | /* Check validity of thisUpdate and nextUpdate fields. It is possible that the request will | 386 | /* Check validity of thisUpdate and nextUpdate fields. It is possible that the request will |
| 370 | * take a few seconds to process and/or the time wont be totally accurate. Therefore to avoid | 387 | * take a few seconds to process and/or the time wont be totally accurate. Therefore to avoid |
| @@ -442,9 +459,11 @@ OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, | |||
| 442 | 459 | ||
| 443 | return 1; | 460 | return 1; |
| 444 | } | 461 | } |
| 462 | LCRYPTO_ALIAS(OCSP_check_validity); | ||
| 445 | 463 | ||
| 446 | const OCSP_CERTID * | 464 | const OCSP_CERTID * |
| 447 | OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *single) | 465 | OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *single) |
| 448 | { | 466 | { |
| 449 | return single->certId; | 467 | return single->certId; |
| 450 | } | 468 | } |
| 469 | LCRYPTO_ALIAS(OCSP_SINGLERESP_get0_id); | ||
