diff options
author | tb <> | 2018-05-18 17:46:17 +0000 |
---|---|---|
committer | tb <> | 2018-05-18 17:46:17 +0000 |
commit | c0ef04d3bfc547c923277c3f9e8f7806a13404eb (patch) | |
tree | c3cb2aaf6f2556fd77ca54d84e861469c471e8db | |
parent | 3964dcb80ce6ec60aee2ff5e6bbf2afbc35cd93d (diff) | |
download | openbsd-c0ef04d3bfc547c923277c3f9e8f7806a13404eb.tar.gz openbsd-c0ef04d3bfc547c923277c3f9e8f7806a13404eb.tar.bz2 openbsd-c0ef04d3bfc547c923277c3f9e8f7806a13404eb.zip |
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
-rw-r--r-- | src/lib/libcrypto/x509/x509_lu.c | 8 | ||||
-rw-r--r-- | 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 @@ | |||
1 | /* $OpenBSD: x509_lu.c,v 1.28 2018/03/17 15:43:32 tb Exp $ */ | 1 | /* $OpenBSD: x509_lu.c,v 1.29 2018/05/18 17:46:17 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 | * |
@@ -154,8 +154,8 @@ X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, | |||
154 | } | 154 | } |
155 | 155 | ||
156 | int | 156 | int |
157 | X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, unsigned char *bytes, | 157 | X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, |
158 | int len, X509_OBJECT *ret) | 158 | const unsigned char *bytes, int len, X509_OBJECT *ret) |
159 | { | 159 | { |
160 | if ((ctx->method == NULL) || (ctx->method->get_by_fingerprint == NULL)) | 160 | if ((ctx->method == NULL) || (ctx->method->get_by_fingerprint == NULL)) |
161 | return X509_LU_FAIL; | 161 | return X509_LU_FAIL; |
@@ -163,7 +163,7 @@ X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, unsigned char *bytes, | |||
163 | } | 163 | } |
164 | 164 | ||
165 | int | 165 | int |
166 | X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len, | 166 | X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, const char *str, int len, |
167 | X509_OBJECT *ret) | 167 | X509_OBJECT *ret) |
168 | { | 168 | { |
169 | if ((ctx->method == NULL) || (ctx->method->get_by_alias == NULL)) | 169 | 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 @@ | |||
1 | /* $OpenBSD: x509_vfy.h,v 1.27 2018/03/20 15:26:22 jsing Exp $ */ | 1 | /* $OpenBSD: x509_vfy.h,v 1.28 2018/05/18 17:46:17 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 | * |
@@ -141,9 +141,9 @@ typedef struct x509_lookup_method_st | |||
141 | int (*get_by_issuer_serial)(X509_LOOKUP *ctx,int type,X509_NAME *name, | 141 | int (*get_by_issuer_serial)(X509_LOOKUP *ctx,int type,X509_NAME *name, |
142 | ASN1_INTEGER *serial,X509_OBJECT *ret); | 142 | ASN1_INTEGER *serial,X509_OBJECT *ret); |
143 | int (*get_by_fingerprint)(X509_LOOKUP *ctx,int type, | 143 | int (*get_by_fingerprint)(X509_LOOKUP *ctx,int type, |
144 | unsigned char *bytes,int len, | 144 | const unsigned char *bytes,int len, |
145 | X509_OBJECT *ret); | 145 | X509_OBJECT *ret); |
146 | int (*get_by_alias)(X509_LOOKUP *ctx,int type,char *str,int len, | 146 | int (*get_by_alias)(X509_LOOKUP *ctx,int type, const char *str,int len, |
147 | X509_OBJECT *ret); | 147 | X509_OBJECT *ret); |
148 | } X509_LOOKUP_METHOD; | 148 | } X509_LOOKUP_METHOD; |
149 | 149 | ||
@@ -496,8 +496,8 @@ int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name, | |||
496 | int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, | 496 | int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, |
497 | ASN1_INTEGER *serial, X509_OBJECT *ret); | 497 | ASN1_INTEGER *serial, X509_OBJECT *ret); |
498 | int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, | 498 | int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, |
499 | unsigned char *bytes, int len, X509_OBJECT *ret); | 499 | const unsigned char *bytes, int len, X509_OBJECT *ret); |
500 | int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, | 500 | int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, const char *str, |
501 | int len, X509_OBJECT *ret); | 501 | int len, X509_OBJECT *ret); |
502 | int X509_LOOKUP_shutdown(X509_LOOKUP *ctx); | 502 | int X509_LOOKUP_shutdown(X509_LOOKUP *ctx); |
503 | 503 | ||