diff options
author | tb <> | 2018-05-13 10:42:03 +0000 |
---|---|---|
committer | tb <> | 2018-05-13 10:42:03 +0000 |
commit | e17362dedac5a806b1628b3d01f5704dca288376 (patch) | |
tree | bf4b0aac67c814a96ebb655762cc73f1acf41c5e /src/lib | |
parent | fdf29f64a94d4bac959154f23ece0607d1b92351 (diff) | |
download | openbsd-e17362dedac5a806b1628b3d01f5704dca288376.tar.gz openbsd-e17362dedac5a806b1628b3d01f5704dca288376.tar.bz2 openbsd-e17362dedac5a806b1628b3d01f5704dca288376.zip |
Add const qualifier to the path and url{,s} parameters of
OCSP_crlID_new(3), OCSP_parse_url(3), OCSP_sendreq_bio(3),
OCSP_sendreq_new(3), and OCSP_url_svcloc_new(3).
tested in a bulk build by sthen
ok jsing (as part of a larger diff)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/ocsp/ocsp.h | 14 | ||||
-rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_ext.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_ht.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_lib.c | 5 |
4 files changed, 16 insertions, 15 deletions
diff --git a/src/lib/libcrypto/ocsp/ocsp.h b/src/lib/libcrypto/ocsp/ocsp.h index 80b108de85..fd3d45afb2 100644 --- a/src/lib/libcrypto/ocsp/ocsp.h +++ b/src/lib/libcrypto/ocsp/ocsp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ocsp.h,v 1.14 2018/05/13 10:30:52 tb Exp $ */ | 1 | /* $OpenBSD: ocsp.h,v 1.15 2018/05/13 10:42:03 tb 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 | ||
@@ -383,8 +383,8 @@ typedef struct ocsp_service_locator_st { | |||
383 | 383 | ||
384 | OCSP_CERTID *OCSP_CERTID_dup(OCSP_CERTID *id); | 384 | OCSP_CERTID *OCSP_CERTID_dup(OCSP_CERTID *id); |
385 | 385 | ||
386 | OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req); | 386 | OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req); |
387 | OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, | 387 | OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req, |
388 | int maxline); | 388 | int maxline); |
389 | int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx); | 389 | int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx); |
390 | void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx); | 390 | void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx); |
@@ -428,8 +428,8 @@ int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, | |||
428 | int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs, | 428 | int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs, |
429 | X509_STORE *store, unsigned long flags); | 429 | X509_STORE *store, unsigned long flags); |
430 | 430 | ||
431 | int OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, | 431 | int OCSP_parse_url(const char *url, char **phost, char **pport, |
432 | int *pssl); | 432 | char **ppath, int *pssl); |
433 | 433 | ||
434 | int OCSP_id_issuer_cmp(OCSP_CERTID *a, OCSP_CERTID *b); | 434 | int OCSP_id_issuer_cmp(OCSP_CERTID *a, OCSP_CERTID *b); |
435 | int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b); | 435 | int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b); |
@@ -449,13 +449,13 @@ int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert); | |||
449 | int OCSP_basic_sign(OCSP_BASICRESP *brsp, X509 *signer, EVP_PKEY *key, | 449 | int OCSP_basic_sign(OCSP_BASICRESP *brsp, X509 *signer, EVP_PKEY *key, |
450 | const EVP_MD *dgst, STACK_OF(X509) *certs, unsigned long flags); | 450 | const EVP_MD *dgst, STACK_OF(X509) *certs, unsigned long flags); |
451 | 451 | ||
452 | X509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim); | 452 | X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim); |
453 | 453 | ||
454 | X509_EXTENSION *OCSP_accept_responses_new(char **oids); | 454 | X509_EXTENSION *OCSP_accept_responses_new(char **oids); |
455 | 455 | ||
456 | X509_EXTENSION *OCSP_archive_cutoff_new(char* tim); | 456 | X509_EXTENSION *OCSP_archive_cutoff_new(char* tim); |
457 | 457 | ||
458 | X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME* issuer, char **urls); | 458 | X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME* issuer, const char **urls); |
459 | 459 | ||
460 | int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x); | 460 | int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x); |
461 | int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos); | 461 | int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos); |
diff --git a/src/lib/libcrypto/ocsp/ocsp_ext.c b/src/lib/libcrypto/ocsp/ocsp_ext.c index 16cd70cad6..8af4a422ae 100644 --- a/src/lib/libcrypto/ocsp/ocsp_ext.c +++ b/src/lib/libcrypto/ocsp/ocsp_ext.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ocsp_ext.c,v 1.16 2018/05/13 10:28:04 tb Exp $ */ | 1 | /* $OpenBSD: ocsp_ext.c,v 1.17 2018/05/13 10:42:03 tb 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 | ||
@@ -436,7 +436,7 @@ OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req) | |||
436 | } | 436 | } |
437 | 437 | ||
438 | X509_EXTENSION * | 438 | X509_EXTENSION * |
439 | OCSP_crlID_new(char *url, long *n, char *tim) | 439 | OCSP_crlID_new(const char *url, long *n, char *tim) |
440 | { | 440 | { |
441 | X509_EXTENSION *x = NULL; | 441 | X509_EXTENSION *x = NULL; |
442 | OCSP_CRLID *cid = NULL; | 442 | OCSP_CRLID *cid = NULL; |
@@ -518,7 +518,7 @@ err: | |||
518 | * method forces NID_ad_ocsp and uniformResourceLocator [6] IA5String. | 518 | * method forces NID_ad_ocsp and uniformResourceLocator [6] IA5String. |
519 | */ | 519 | */ |
520 | X509_EXTENSION * | 520 | X509_EXTENSION * |
521 | OCSP_url_svcloc_new(X509_NAME* issuer, char **urls) | 521 | OCSP_url_svcloc_new(X509_NAME* issuer, const char **urls) |
522 | { | 522 | { |
523 | X509_EXTENSION *x = NULL; | 523 | X509_EXTENSION *x = NULL; |
524 | ASN1_IA5STRING *ia5 = NULL; | 524 | ASN1_IA5STRING *ia5 = NULL; |
diff --git a/src/lib/libcrypto/ocsp/ocsp_ht.c b/src/lib/libcrypto/ocsp/ocsp_ht.c index b9c969928a..255f890397 100644 --- a/src/lib/libcrypto/ocsp/ocsp_ht.c +++ b/src/lib/libcrypto/ocsp/ocsp_ht.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ocsp_ht.c,v 1.24 2017/01/29 17:49:23 beck Exp $ */ | 1 | /* $OpenBSD: ocsp_ht.c,v 1.25 2018/05/13 10:42:03 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -149,7 +149,7 @@ OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx, const char *name, | |||
149 | } | 149 | } |
150 | 150 | ||
151 | OCSP_REQ_CTX * | 151 | OCSP_REQ_CTX * |
152 | OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, int maxline) | 152 | OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req, int maxline) |
153 | { | 153 | { |
154 | OCSP_REQ_CTX *rctx; | 154 | OCSP_REQ_CTX *rctx; |
155 | 155 | ||
@@ -440,7 +440,7 @@ next_line: | |||
440 | 440 | ||
441 | /* Blocking OCSP request handler: now a special case of non-blocking I/O */ | 441 | /* Blocking OCSP request handler: now a special case of non-blocking I/O */ |
442 | OCSP_RESPONSE * | 442 | OCSP_RESPONSE * |
443 | OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req) | 443 | OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req) |
444 | { | 444 | { |
445 | OCSP_RESPONSE *resp = NULL; | 445 | OCSP_RESPONSE *resp = NULL; |
446 | OCSP_REQ_CTX *ctx; | 446 | OCSP_REQ_CTX *ctx; |
diff --git a/src/lib/libcrypto/ocsp/ocsp_lib.c b/src/lib/libcrypto/ocsp/ocsp_lib.c index f9a8d60bc1..0d95a9d0ec 100644 --- a/src/lib/libcrypto/ocsp/ocsp_lib.c +++ b/src/lib/libcrypto/ocsp/ocsp_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ocsp_lib.c,v 1.21 2018/05/13 10:30:52 tb Exp $ */ | 1 | /* $OpenBSD: ocsp_lib.c,v 1.22 2018/05/13 10:42:03 tb 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 | ||
@@ -180,7 +180,8 @@ OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b) | |||
180 | * it is SSL. | 180 | * it is SSL. |
181 | */ | 181 | */ |
182 | int | 182 | int |
183 | OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, int *pssl) | 183 | OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath, |
184 | int *pssl) | ||
184 | { | 185 | { |
185 | char *host, *path, *port, *tmp; | 186 | char *host, *path, *port, *tmp; |
186 | 187 | ||