summaryrefslogtreecommitdiffstats
path: root/crypto/ocsp/v3_ocsp.c
diff options
context:
space:
mode:
authorDavid von Oheimb <David.von.Oheimb@siemens.com>2019-01-15 21:51:25 +0100
committerMatt Caswell <matt@openssl.org>2019-03-06 16:10:09 +0000
commit9fdcc21fdc9d148f78d9cd5be34030f38cc45812 (patch)
tree20cba464edf2befc97c1888631dd782cba830c89 /crypto/ocsp/v3_ocsp.c
parent27d5631236325c3fd8a3bd06af282ac496aac64b (diff)
constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8029)
Diffstat (limited to 'crypto/ocsp/v3_ocsp.c')
-rw-r--r--crypto/ocsp/v3_ocsp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/ocsp/v3_ocsp.c b/crypto/ocsp/v3_ocsp.c
index c43bfc3519..c58fa07b8a 100644
--- a/crypto/ocsp/v3_ocsp.c
+++ b/crypto/ocsp/v3_ocsp.c
@@ -28,7 +28,7 @@ static int i2r_object(const X509V3_EXT_METHOD *method, void *obj, BIO *out,
int indent);
static void *ocsp_nonce_new(void);
-static int i2d_ocsp_nonce(void *a, unsigned char **pp);
+static int i2d_ocsp_nonce(const void *a, unsigned char **pp);
static void *d2i_ocsp_nonce(void *a, const unsigned char **pp, long length);
static void ocsp_nonce_free(void *a);
static int i2r_ocsp_nonce(const X509V3_EXT_METHOD *method, void *nonce,
@@ -170,9 +170,9 @@ static void *ocsp_nonce_new(void)
return ASN1_OCTET_STRING_new();
}
-static int i2d_ocsp_nonce(void *a, unsigned char **pp)
+static int i2d_ocsp_nonce(const void *a, unsigned char **pp)
{
- ASN1_OCTET_STRING *os = a;
+ const ASN1_OCTET_STRING *os = a;
if (pp) {
memcpy(*pp, os->data, os->length);
*pp += os->length;