summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2018-05-13 10:42:03 +0000
committertb <>2018-05-13 10:42:03 +0000
commite17362dedac5a806b1628b3d01f5704dca288376 (patch)
treebf4b0aac67c814a96ebb655762cc73f1acf41c5e /src/lib
parentfdf29f64a94d4bac959154f23ece0607d1b92351 (diff)
downloadopenbsd-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.h14
-rw-r--r--src/lib/libcrypto/ocsp/ocsp_ext.c6
-rw-r--r--src/lib/libcrypto/ocsp/ocsp_ht.c6
-rw-r--r--src/lib/libcrypto/ocsp/ocsp_lib.c5
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
384OCSP_CERTID *OCSP_CERTID_dup(OCSP_CERTID *id); 384OCSP_CERTID *OCSP_CERTID_dup(OCSP_CERTID *id);
385 385
386OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req); 386OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req);
387OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, 387OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req,
388 int maxline); 388 int maxline);
389int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx); 389int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx);
390void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx); 390void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx);
@@ -428,8 +428,8 @@ int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd,
428int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs, 428int 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
431int OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, 431int OCSP_parse_url(const char *url, char **phost, char **pport,
432 int *pssl); 432 char **ppath, int *pssl);
433 433
434int OCSP_id_issuer_cmp(OCSP_CERTID *a, OCSP_CERTID *b); 434int OCSP_id_issuer_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
435int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b); 435int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
@@ -449,13 +449,13 @@ int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert);
449int OCSP_basic_sign(OCSP_BASICRESP *brsp, X509 *signer, EVP_PKEY *key, 449int 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
452X509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim); 452X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim);
453 453
454X509_EXTENSION *OCSP_accept_responses_new(char **oids); 454X509_EXTENSION *OCSP_accept_responses_new(char **oids);
455 455
456X509_EXTENSION *OCSP_archive_cutoff_new(char* tim); 456X509_EXTENSION *OCSP_archive_cutoff_new(char* tim);
457 457
458X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME* issuer, char **urls); 458X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME* issuer, const char **urls);
459 459
460int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x); 460int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x);
461int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos); 461int 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
438X509_EXTENSION * 438X509_EXTENSION *
439OCSP_crlID_new(char *url, long *n, char *tim) 439OCSP_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 */
520X509_EXTENSION * 520X509_EXTENSION *
521OCSP_url_svcloc_new(X509_NAME* issuer, char **urls) 521OCSP_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
151OCSP_REQ_CTX * 151OCSP_REQ_CTX *
152OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, int maxline) 152OCSP_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 */
442OCSP_RESPONSE * 442OCSP_RESPONSE *
443OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req) 443OCSP_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 */
182int 182int
183OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, int *pssl) 183OCSP_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