summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_pkt.c
diff options
context:
space:
mode:
authorjsing <>2017-01-23 13:36:13 +0000
committerjsing <>2017-01-23 13:36:13 +0000
commit0eff443f2ac1ae9043870f2d40d9dc0d57f236d6 (patch)
tree84ee9c4c985fe1078df40f818b7697846dba1c18 /src/lib/libssl/d1_pkt.c
parent76088a8d37b68292f56046a6a4dea9544ad5ab89 (diff)
downloadopenbsd-0eff443f2ac1ae9043870f2d40d9dc0d57f236d6.tar.gz
openbsd-0eff443f2ac1ae9043870f2d40d9dc0d57f236d6.tar.bz2
openbsd-0eff443f2ac1ae9043870f2d40d9dc0d57f236d6.zip
Split most of SSL_METHOD out into an internal variant, which is opaque.
Discussed with beck@
Diffstat (limited to 'src/lib/libssl/d1_pkt.c')
-rw-r--r--src/lib/libssl/d1_pkt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c
index 1dba3d0c4d..c64aa8f106 100644
--- a/src/lib/libssl/d1_pkt.c
+++ b/src/lib/libssl/d1_pkt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_pkt.c,v 1.56 2017/01/23 08:48:44 beck Exp $ */ 1/* $OpenBSD: d1_pkt.c,v 1.57 2017/01/23 13:36:13 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -361,7 +361,7 @@ dtls1_process_record(SSL *s)
361 /* decrypt in place in 'rr->input' */ 361 /* decrypt in place in 'rr->input' */
362 rr->data = rr->input; 362 rr->data = rr->input;
363 363
364 enc_err = s->method->ssl3_enc->enc(s, 0); 364 enc_err = s->method->internal->ssl3_enc->enc(s, 0);
365 /* enc_err is: 365 /* enc_err is:
366 * 0: (in non-constant time) if the record is publically invalid. 366 * 0: (in non-constant time) if the record is publically invalid.
367 * 1: if the padding is valid 367 * 1: if the padding is valid
@@ -417,7 +417,7 @@ dtls1_process_record(SSL *s)
417 mac = &rr->data[rr->length]; 417 mac = &rr->data[rr->length];
418 } 418 }
419 419
420 i = s->method->ssl3_enc->mac(s, md, 0 /* not send */); 420 i = s->method->internal->ssl3_enc->mac(s, md, 0 /* not send */);
421 if (i < 0 || mac == NULL || timingsafe_memcmp(md, mac, (size_t)mac_size) != 0) 421 if (i < 0 || mac == NULL || timingsafe_memcmp(md, mac, (size_t)mac_size) != 0)
422 enc_err = -1; 422 enc_err = -1;
423 if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH + mac_size) 423 if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH + mac_size)
@@ -1279,7 +1279,7 @@ do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len)
1279 * wr->data still points in the wb->buf */ 1279 * wr->data still points in the wb->buf */
1280 1280
1281 if (mac_size != 0) { 1281 if (mac_size != 0) {
1282 if (s->method->ssl3_enc->mac(s, &(p[wr->length + bs]), 1) < 0) 1282 if (s->method->internal->ssl3_enc->mac(s, &(p[wr->length + bs]), 1) < 0)
1283 goto err; 1283 goto err;
1284 wr->length += mac_size; 1284 wr->length += mac_size;
1285 } 1285 }
@@ -1298,7 +1298,7 @@ do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len)
1298 wr->length += bs; 1298 wr->length += bs;
1299 } 1299 }
1300 1300
1301 s->method->ssl3_enc->enc(s, 1); 1301 s->method->internal->ssl3_enc->enc(s, 1);
1302 1302
1303 /* record length after mac and block padding */ 1303 /* record length after mac and block padding */
1304/* if (type == SSL3_RT_APPLICATION_DATA || 1304/* if (type == SSL3_RT_APPLICATION_DATA ||