From c0ef04d3bfc547c923277c3f9e8f7806a13404eb Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 18 May 2018 17:46:17 +0000 Subject: X509_LOOKUP_by_alias() now takes a 'const char str *' and X509_LOOKUP_by_fingerprint() 'const unsigned char *bytes'. tested in a bulk build by sthen ok jsing --- src/lib/libcrypto/x509/x509_lu.c | 8 ++++---- src/lib/libcrypto/x509/x509_vfy.h | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/libcrypto/x509/x509_lu.c b/src/lib/libcrypto/x509/x509_lu.c index 742eb4d2bf..5121ae31ec 100644 --- a/src/lib/libcrypto/x509/x509_lu.c +++ b/src/lib/libcrypto/x509/x509_lu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_lu.c,v 1.28 2018/03/17 15:43:32 tb Exp $ */ +/* $OpenBSD: x509_lu.c,v 1.29 2018/05/18 17:46:17 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -154,8 +154,8 @@ X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, } int -X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, unsigned char *bytes, - int len, X509_OBJECT *ret) +X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, + const unsigned char *bytes, int len, X509_OBJECT *ret) { if ((ctx->method == NULL) || (ctx->method->get_by_fingerprint == NULL)) return X509_LU_FAIL; @@ -163,7 +163,7 @@ X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, unsigned char *bytes, } int -X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len, +X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, const char *str, int len, X509_OBJECT *ret) { if ((ctx->method == NULL) || (ctx->method->get_by_alias == NULL)) diff --git a/src/lib/libcrypto/x509/x509_vfy.h b/src/lib/libcrypto/x509/x509_vfy.h index 9e0730b014..ee9290347b 100644 --- a/src/lib/libcrypto/x509/x509_vfy.h +++ b/src/lib/libcrypto/x509/x509_vfy.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vfy.h,v 1.27 2018/03/20 15:26:22 jsing Exp $ */ +/* $OpenBSD: x509_vfy.h,v 1.28 2018/05/18 17:46:17 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -141,9 +141,9 @@ typedef struct x509_lookup_method_st int (*get_by_issuer_serial)(X509_LOOKUP *ctx,int type,X509_NAME *name, ASN1_INTEGER *serial,X509_OBJECT *ret); int (*get_by_fingerprint)(X509_LOOKUP *ctx,int type, - unsigned char *bytes,int len, + const unsigned char *bytes,int len, X509_OBJECT *ret); - int (*get_by_alias)(X509_LOOKUP *ctx,int type,char *str,int len, + int (*get_by_alias)(X509_LOOKUP *ctx,int type, const char *str,int len, X509_OBJECT *ret); } X509_LOOKUP_METHOD; @@ -496,8 +496,8 @@ int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name, int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, ASN1_INTEGER *serial, X509_OBJECT *ret); int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, - unsigned char *bytes, int len, X509_OBJECT *ret); -int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, + const unsigned char *bytes, int len, X509_OBJECT *ret); +int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, const char *str, int len, X509_OBJECT *ret); int X509_LOOKUP_shutdown(X509_LOOKUP *ctx); -- cgit v1.2.3-55-g6feb