summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/x509.c
diff options
context:
space:
mode:
authortb <>2023-11-21 17:56:19 +0000
committertb <>2023-11-21 17:56:19 +0000
commit1740aa5a02c9685a344ca455a39790bd21680064 (patch)
treeff4645c5482bdc02143400e2f36d337adeb41a6d /src/usr.bin/openssl/x509.c
parent7c178f9af5dd84d292b8bda62f75d0c3ff7d5206 (diff)
downloadopenbsd-1740aa5a02c9685a344ca455a39790bd21680064.tar.gz
openbsd-1740aa5a02c9685a344ca455a39790bd21680064.tar.bz2
openbsd-1740aa5a02c9685a344ca455a39790bd21680064.zip
Make a few purpose things const
This should allow us to constify a sizable table in libcrypto in an upcoming bump.
Diffstat (limited to 'src/usr.bin/openssl/x509.c')
-rw-r--r--src/usr.bin/openssl/x509.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/usr.bin/openssl/x509.c b/src/usr.bin/openssl/x509.c
index 8e8a9f2dc3..7f60110c47 100644
--- a/src/usr.bin/openssl/x509.c
+++ b/src/usr.bin/openssl/x509.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509.c,v 1.34 2023/11/13 11:50:36 tb Exp $ */ 1/* $OpenBSD: x509.c,v 1.35 2023/11/21 17:56:19 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -86,7 +86,7 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
86 X509 *x, X509 *xca, EVP_PKEY *pkey, STACK_OF(OPENSSL_STRING) *sigopts, 86 X509 *x, X509 *xca, EVP_PKEY *pkey, STACK_OF(OPENSSL_STRING) *sigopts,
87 char *serial, int create, int days, int clrext, CONF *conf, char *section, 87 char *serial, int create, int days, int clrext, CONF *conf, char *section,
88 ASN1_INTEGER *sno); 88 ASN1_INTEGER *sno);
89static int purpose_print(BIO *bio, X509 *cert, X509_PURPOSE *pt); 89static int purpose_print(BIO *bio, X509 *cert, const X509_PURPOSE *pt);
90 90
91static struct { 91static struct {
92 char *alias; 92 char *alias;
@@ -1022,7 +1022,7 @@ x509_main(int argc, char **argv)
1022 } 1022 }
1023#endif 1023#endif
1024 else if (cfg.pprint == i) { 1024 else if (cfg.pprint == i) {
1025 X509_PURPOSE *ptmp; 1025 const X509_PURPOSE *ptmp;
1026 int j; 1026 int j;
1027 1027
1028 BIO_printf(STDout, "Certificate purposes:\n"); 1028 BIO_printf(STDout, "Certificate purposes:\n");
@@ -1534,10 +1534,10 @@ sign(X509 *x, EVP_PKEY *pkey, int days, int clrext, const EVP_MD *digest,
1534} 1534}
1535 1535
1536static int 1536static int
1537purpose_print(BIO *bio, X509 *cert, X509_PURPOSE *pt) 1537purpose_print(BIO *bio, X509 *cert, const X509_PURPOSE *pt)
1538{ 1538{
1539 int id, i, idret; 1539 int id, i, idret;
1540 char *pname; 1540 const char *pname;
1541 1541
1542 id = X509_PURPOSE_get_id(pt); 1542 id = X509_PURPOSE_get_id(pt);
1543 pname = X509_PURPOSE_get0_name(pt); 1543 pname = X509_PURPOSE_get0_name(pt);