diff options
author | jsing <> | 2017-05-06 20:37:25 +0000 |
---|---|---|
committer | jsing <> | 2017-05-06 20:37:25 +0000 |
commit | 792684dc457d44526f35586cb1671d67604bf5b1 (patch) | |
tree | 93525fc35ada38404416d83084837f1f94d46be3 /src/lib/libssl/ssl_lib.c | |
parent | 93ad7dce844283fb07b0d09b99999f2f71b47bd5 (diff) | |
download | openbsd-792684dc457d44526f35586cb1671d67604bf5b1.tar.gz openbsd-792684dc457d44526f35586cb1671d67604bf5b1.tar.bz2 openbsd-792684dc457d44526f35586cb1671d67604bf5b1.zip |
Provide SSL{,_CTX}_set_{min,max}_proto_version() functions.
Rides minor bump.
ok beck@
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 3f458d8b10..c49b79df0b 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.158 2017/02/28 14:08:49 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.159 2017/05/06 20:37:25 jsing 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 | * |
@@ -2969,6 +2969,33 @@ SSL_cache_hit(SSL *s) | |||
2969 | return (s->internal->hit); | 2969 | return (s->internal->hit); |
2970 | } | 2970 | } |
2971 | 2971 | ||
2972 | int | ||
2973 | SSL_CTX_set_min_proto_version(SSL_CTX *ctx, uint16_t version) | ||
2974 | { | ||
2975 | return ssl_version_set_min(ctx->method, version, | ||
2976 | ctx->internal->max_version, &ctx->internal->min_version); | ||
2977 | } | ||
2978 | |||
2979 | int | ||
2980 | SSL_CTX_set_max_proto_version(SSL_CTX *ctx, uint16_t version) | ||
2981 | { | ||
2982 | return ssl_version_set_max(ctx->method, version, | ||
2983 | ctx->internal->min_version, &ctx->internal->max_version); | ||
2984 | } | ||
2985 | |||
2986 | int | ||
2987 | SSL_set_min_proto_version(SSL *ssl, uint16_t version) | ||
2988 | { | ||
2989 | return ssl_version_set_min(ssl->method, version, | ||
2990 | ssl->internal->max_version, &ssl->internal->min_version); | ||
2991 | } | ||
2992 | |||
2993 | int | ||
2994 | SSL_set_max_proto_version(SSL *ssl, uint16_t version) | ||
2995 | { | ||
2996 | return ssl_version_set_max(ssl->method, version, | ||
2997 | ssl->internal->min_version, &ssl->internal->max_version); | ||
2998 | } | ||
2972 | 2999 | ||
2973 | static int | 3000 | static int |
2974 | ssl_cipher_id_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) | 3001 | ssl_cipher_id_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) |