diff options
author | jsing <> | 2022-02-21 18:22:20 +0000 |
---|---|---|
committer | jsing <> | 2022-02-21 18:22:20 +0000 |
commit | a59b14b2d3f8047fe5b687d37304433773603a3f (patch) | |
tree | b58aa2f628b6d8b36920b544c96c0647c2281969 /src/lib/libssl/ssl_locl.h | |
parent | 194ce8d94cd74f12663cf8ca258294804ca1aabf (diff) | |
download | openbsd-a59b14b2d3f8047fe5b687d37304433773603a3f.tar.gz openbsd-a59b14b2d3f8047fe5b687d37304433773603a3f.tar.bz2 openbsd-a59b14b2d3f8047fe5b687d37304433773603a3f.zip |
Factor out alert handing code in the legacy stack.libressl-v3.5.0
Pull out the code that processes incoming alerts - a chunk of the
complexity is due to the fact that in TLSv1.2 and earlier, alerts can be
fragmented across multiple records or multiple alerts can be delivered
in a single record.
In DTLS there is no way that we can reassemble fragmented alerts (although
the RFC is silent on this), however we could have multiple alerts in the
same record. This change means that we will handle this situation more
appropriately and if we encounter a fragmented alert we will now treat this
as a decode error (instead of silently ignoring it).
ok beck@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 69e52dcc8c..ada99494db 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.385 2022/02/05 14:54:10 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.386 2022/02/21 18:22:20 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 | * |
@@ -1333,6 +1333,7 @@ int ssl3_renegotiate_check(SSL *ssl); | |||
1333 | void ssl_force_want_read(SSL *s); | 1333 | void ssl_force_want_read(SSL *s); |
1334 | 1334 | ||
1335 | int ssl3_dispatch_alert(SSL *s); | 1335 | int ssl3_dispatch_alert(SSL *s); |
1336 | int ssl3_read_alert(SSL *s); | ||
1336 | int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek); | 1337 | int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek); |
1337 | int ssl3_write_bytes(SSL *s, int type, const void *buf, int len); | 1338 | int ssl3_write_bytes(SSL *s, int type, const void *buf, int len); |
1338 | int ssl3_output_cert_chain(SSL *s, CBB *cbb, SSL_CERT_PKEY *cpk); | 1339 | int ssl3_output_cert_chain(SSL *s, CBB *cbb, SSL_CERT_PKEY *cpk); |