diff options
author | jsing <> | 2015-09-11 17:29:36 +0000 |
---|---|---|
committer | jsing <> | 2015-09-11 17:29:36 +0000 |
commit | 39d91decfbdd72585b3d631c7f9c2bf836016c16 (patch) | |
tree | f37851c0fad1e35cd2ec98a9028b80a213b1e435 | |
parent | 95aa7ecf4e326938e45730c004873ee74084bc3a (diff) | |
download | openbsd-39d91decfbdd72585b3d631c7f9c2bf836016c16.tar.gz openbsd-39d91decfbdd72585b3d631c7f9c2bf836016c16.tar.bz2 openbsd-39d91decfbdd72585b3d631c7f9c2bf836016c16.zip |
Nuke ssl_replace_hash().
ok "flensing knife"
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_lib.c | 22 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_locl.h | 3 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 22 | ||||
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 3 |
4 files changed, 4 insertions, 46 deletions
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index 7ace9fe688..4eb1d78f17 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.108 2015/09/10 17:57:50 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.109 2015/09/11 17:29:36 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 | * |
@@ -3075,26 +3075,6 @@ SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, | |||
3075 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_MSG_CALLBACK, (void (*)(void))cb); | 3075 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_MSG_CALLBACK, (void (*)(void))cb); |
3076 | } | 3076 | } |
3077 | 3077 | ||
3078 | /* | ||
3079 | * Allocates new EVP_MD_CTX and sets pointer to it into given pointer | ||
3080 | * variable, freeing EVP_MD_CTX previously stored in that variable, if | ||
3081 | * any. If EVP_MD pointer is passed, initializes ctx with this md | ||
3082 | * Returns newly allocated ctx; | ||
3083 | */ | ||
3084 | EVP_MD_CTX * | ||
3085 | ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md) | ||
3086 | { | ||
3087 | ssl_clear_hash_ctx(hash); | ||
3088 | *hash = EVP_MD_CTX_create(); | ||
3089 | if (*hash != NULL && md != NULL) { | ||
3090 | if (!EVP_DigestInit_ex(*hash, md, NULL)) { | ||
3091 | ssl_clear_hash_ctx(hash); | ||
3092 | return (NULL); | ||
3093 | } | ||
3094 | } | ||
3095 | return (*hash); | ||
3096 | } | ||
3097 | |||
3098 | void | 3078 | void |
3099 | ssl_clear_hash_ctx(EVP_MD_CTX **hash) | 3079 | ssl_clear_hash_ctx(EVP_MD_CTX **hash) |
3100 | { | 3080 | { |
diff --git a/src/lib/libssl/src/ssl/ssl_locl.h b/src/lib/libssl/src/ssl/ssl_locl.h index a1302104e6..56d2e98746 100644 --- a/src/lib/libssl/src/ssl/ssl_locl.h +++ b/src/lib/libssl/src/ssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.114 2015/09/11 17:17:44 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.115 2015/09/11 17:29:36 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 | * |
@@ -815,7 +815,6 @@ int tls12_get_sigandhash(unsigned char *p, const EVP_PKEY *pk, | |||
815 | int tls12_get_sigid(const EVP_PKEY *pk); | 815 | int tls12_get_sigid(const EVP_PKEY *pk); |
816 | const EVP_MD *tls12_get_hash(unsigned char hash_alg); | 816 | const EVP_MD *tls12_get_hash(unsigned char hash_alg); |
817 | 817 | ||
818 | EVP_MD_CTX* ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md); | ||
819 | void ssl_clear_hash_ctx(EVP_MD_CTX **hash); | 818 | void ssl_clear_hash_ctx(EVP_MD_CTX **hash); |
820 | int ssl_add_serverhello_renegotiate_ext(SSL *s, unsigned char *p, | 819 | int ssl_add_serverhello_renegotiate_ext(SSL *s, unsigned char *p, |
821 | int *len, int maxlen); | 820 | int *len, int maxlen); |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 7ace9fe688..4eb1d78f17 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.108 2015/09/10 17:57:50 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.109 2015/09/11 17:29:36 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 | * |
@@ -3075,26 +3075,6 @@ SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, | |||
3075 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_MSG_CALLBACK, (void (*)(void))cb); | 3075 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_MSG_CALLBACK, (void (*)(void))cb); |
3076 | } | 3076 | } |
3077 | 3077 | ||
3078 | /* | ||
3079 | * Allocates new EVP_MD_CTX and sets pointer to it into given pointer | ||
3080 | * variable, freeing EVP_MD_CTX previously stored in that variable, if | ||
3081 | * any. If EVP_MD pointer is passed, initializes ctx with this md | ||
3082 | * Returns newly allocated ctx; | ||
3083 | */ | ||
3084 | EVP_MD_CTX * | ||
3085 | ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md) | ||
3086 | { | ||
3087 | ssl_clear_hash_ctx(hash); | ||
3088 | *hash = EVP_MD_CTX_create(); | ||
3089 | if (*hash != NULL && md != NULL) { | ||
3090 | if (!EVP_DigestInit_ex(*hash, md, NULL)) { | ||
3091 | ssl_clear_hash_ctx(hash); | ||
3092 | return (NULL); | ||
3093 | } | ||
3094 | } | ||
3095 | return (*hash); | ||
3096 | } | ||
3097 | |||
3098 | void | 3078 | void |
3099 | ssl_clear_hash_ctx(EVP_MD_CTX **hash) | 3079 | ssl_clear_hash_ctx(EVP_MD_CTX **hash) |
3100 | { | 3080 | { |
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index a1302104e6..56d2e98746 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.114 2015/09/11 17:17:44 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.115 2015/09/11 17:29:36 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 | * |
@@ -815,7 +815,6 @@ int tls12_get_sigandhash(unsigned char *p, const EVP_PKEY *pk, | |||
815 | int tls12_get_sigid(const EVP_PKEY *pk); | 815 | int tls12_get_sigid(const EVP_PKEY *pk); |
816 | const EVP_MD *tls12_get_hash(unsigned char hash_alg); | 816 | const EVP_MD *tls12_get_hash(unsigned char hash_alg); |
817 | 817 | ||
818 | EVP_MD_CTX* ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md); | ||
819 | void ssl_clear_hash_ctx(EVP_MD_CTX **hash); | 818 | void ssl_clear_hash_ctx(EVP_MD_CTX **hash); |
820 | int ssl_add_serverhello_renegotiate_ext(SSL *s, unsigned char *p, | 819 | int ssl_add_serverhello_renegotiate_ext(SSL *s, unsigned char *p, |
821 | int *len, int maxlen); | 820 | int *len, int maxlen); |