summaryrefslogtreecommitdiffstats
path: root/lib/libssl/s3_both.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-12-14 14:34:43 +0000
committerjsing <jsing@openbsd.org>2014-12-14 14:34:43 +0000
commit40eee476bc542a54d0b4254d1b38f5f6d772008a (patch)
treef02df65af446d9e21886555ef5b97d2e4db7f5e6 /lib/libssl/s3_both.c
parentunifdef NETSCAPE_HANG_BUG from the DTLS code. The code is not currently (diff)
downloadwireguard-openbsd-40eee476bc542a54d0b4254d1b38f5f6d772008a.tar.xz
wireguard-openbsd-40eee476bc542a54d0b4254d1b38f5f6d772008a.zip
unifdef OPENSSL_NO_NEXTPROTONEG, which is one of the last standing #ifndef
mazes in libssl. NPN is being replaced by ALPN, however it is still going to be around for a while yet. ok miod@
Diffstat (limited to 'lib/libssl/s3_both.c')
-rw-r--r--lib/libssl/s3_both.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/libssl/s3_both.c b/lib/libssl/s3_both.c
index ffc10774d83..297665430a0 100644
--- a/lib/libssl/s3_both.c
+++ b/lib/libssl/s3_both.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_both.c,v 1.34 2014/12/10 15:43:31 jsing Exp $ */
+/* $OpenBSD: s3_both.c,v 1.35 2014/12/14 14:34:43 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -194,7 +194,6 @@ ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen)
return (ssl3_do_write(s, SSL3_RT_HANDSHAKE));
}
-#ifndef OPENSSL_NO_NEXTPROTONEG
/* ssl3_take_mac calculates the Finished MAC for the handshakes messages seen to far. */
static void
ssl3_take_mac(SSL *s)
@@ -217,7 +216,6 @@ ssl3_take_mac(SSL *s)
s->s3->tmp.peer_finish_md_len = s->method->ssl3_enc->final_finish_mac(s,
sender, slen, s->s3->tmp.peer_finish_md);
}
-#endif
int
ssl3_get_finished(SSL *s, int a, int b)
@@ -226,11 +224,6 @@ ssl3_get_finished(SSL *s, int a, int b)
long n;
unsigned char *p;
-#ifdef OPENSSL_NO_NEXTPROTONEG
- /* the mac has already been generated when we received the
- * change cipher spec message and is in s->s3->tmp.peer_finish_md.
- */
-#endif
n = s->method->ssl_get_message(s, a, b, SSL3_MT_FINISHED,
64, /* should actually be 36+4 :-) */ &ok);
@@ -505,12 +498,10 @@ ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok)
n -= i;
}
-#ifndef OPENSSL_NO_NEXTPROTONEG
/* If receiving Finished, record MAC of prior handshake messages for
* Finished verification. */
if (*s->init_buf->data == SSL3_MT_FINISHED)
ssl3_take_mac(s);
-#endif
/* Feed this message into MAC computation. */
ssl3_finish_mac(s, (unsigned char *)s->init_buf->data, s->init_num + 4);