summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2015-09-11 17:01:20 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2015-09-11 17:01:20 +0000
commit04a47f4044727c4df0a2958472ddff387d4dac04 (patch)
tree63e35a3bc2a80f97035084c7260f97374abe2e96 /lib
parent9d1e7fc54cac451b6621f7f4f6f518edddaa6de6 (diff)
Nuke ssl3_generate_master_secret().
ok "flensing knife"
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/src/ssl/s3_enc.c34
-rw-r--r--lib/libssl/src/ssl/ssl_locl.h4
2 files changed, 2 insertions, 36 deletions
diff --git a/lib/libssl/src/ssl/s3_enc.c b/lib/libssl/src/ssl/s3_enc.c
index 06ce4b0fbb2..ced10834974 100644
--- a/lib/libssl/src/ssl/s3_enc.c
+++ b/lib/libssl/src/ssl/s3_enc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_enc.c,v 1.65 2015/09/11 16:59:17 jsing Exp $ */
+/* $OpenBSD: s3_enc.c,v 1.66 2015/09/11 17:01:19 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -469,38 +469,6 @@ ssl3_record_sequence_increment(unsigned char *seq)
}
int
-ssl3_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p,
- int len)
-{
- static const unsigned char *salt[3] = { "A", "BB", "CCC", };
- unsigned char buf[EVP_MAX_MD_SIZE];
- EVP_MD_CTX ctx;
- int i, ret = 0;
- unsigned int n;
-
- EVP_MD_CTX_init(&ctx);
- for (i = 0; i < 3; i++) {
- if (!EVP_DigestInit_ex(&ctx, s->ctx->sha1, NULL))
- return 0;
- EVP_DigestUpdate(&ctx, salt[i], strlen((const char *)salt[i]));
- EVP_DigestUpdate(&ctx, p, len);
- EVP_DigestUpdate(&ctx, s->s3->client_random, SSL3_RANDOM_SIZE);
- EVP_DigestUpdate(&ctx, s->s3->server_random, SSL3_RANDOM_SIZE);
- EVP_DigestFinal_ex(&ctx, buf, &n);
-
- if (!EVP_DigestInit_ex(&ctx, s->ctx->md5, NULL))
- return 0;
- EVP_DigestUpdate(&ctx, p, len);
- EVP_DigestUpdate(&ctx, buf, n);
- EVP_DigestFinal_ex(&ctx, out, &n);
- out += n;
- ret += n;
- }
- EVP_MD_CTX_cleanup(&ctx);
- return (ret);
-}
-
-int
ssl3_alert_code(int code)
{
switch (code) {
diff --git a/lib/libssl/src/ssl/ssl_locl.h b/lib/libssl/src/ssl/ssl_locl.h
index 939808e3fb2..ec30c9cb6a1 100644
--- a/lib/libssl/src/ssl/ssl_locl.h
+++ b/lib/libssl/src/ssl/ssl_locl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_locl.h,v 1.108 2015/09/11 16:59:17 jsing Exp $ */
+/* $OpenBSD: ssl_locl.h,v 1.109 2015/09/11 17:01:19 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -607,8 +607,6 @@ int ssl3_change_cipher_state(SSL *s, int which);
void ssl3_cleanup_key_block(SSL *s);
int ssl3_do_write(SSL *s, int type);
int ssl3_send_alert(SSL *s, int level, int desc);
-int ssl3_generate_master_secret(SSL *s, unsigned char *out,
- unsigned char *p, int len);
int ssl3_get_req_cert_type(SSL *s, unsigned char *p);
long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok);
int ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen);