aboutsummaryrefslogtreecommitdiffstats
path: root/test/ssltestlib.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-05-03 12:06:38 +0100
committerMatt Caswell <matt@openssl.org>2018-05-08 09:40:17 +0100
commit61e96557f9eae0258074c9cec7ad6aa1b9dde1df (patch)
treeefc9ee7be01868d111002b956a0d993d6552cf44 /test/ssltestlib.h
parentf7506416b1311e65d5c440defdbcfe176f633c50 (diff)
downloadopenssl-61e96557f9eae0258074c9cec7ad6aa1b9dde1df.tar.gz
Add a DTLS test for dropped records
Drop a record from a handshake and check that we can still complete the handshake. Repeat for all records in the handshake. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6170)
Diffstat (limited to 'test/ssltestlib.h')
-rw-r--r--test/ssltestlib.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ssltestlib.h b/test/ssltestlib.h
index 353699dec9..c96dff5216 100644
--- a/test/ssltestlib.h
+++ b/test/ssltestlib.h
@@ -32,6 +32,14 @@ void bio_s_mempacket_test_free(void);
#define INJECT_PACKET 1
#define INJECT_PACKET_IGNORE_REC_SEQ 2
+/*
+ * Mempacket BIO ctrls. We make them large enough to not clash with standard BIO
+ * ctrl codes.
+ */
+#define MEMPACKET_CTRL_SET_DROP_EPOCH (1 << 15)
+#define MEMPACKET_CTRL_SET_DROP_REC (2 << 15)
+#define MEMPACKET_CTRL_GET_DROP_REC (3 << 15)
+
int mempacket_test_inject(BIO *bio, const char *in, int inl, int pktnum,
int type);