aboutsummaryrefslogtreecommitdiffstats
path: root/test/ssltestlib.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-07-04 14:53:28 +0100
committerMatt Caswell <matt@openssl.org>2016-08-19 13:52:40 +0100
commitd82dec40ba87408697357b04ba0d71a2be69c5fb (patch)
tree3acb8ae39a6136f2386b1c683934399aa412c0c1 /test/ssltestlib.h
parentd9a2e90bcede62cce36a845a677f99a22c419a9c (diff)
downloadopenssl-d82dec40ba87408697357b04ba0d71a2be69c5fb.tar.gz
Add a DTLS packet mem BIO
This adds a BIO similar to a normal mem BIO but with datagram awareness. It also has the capability to inject additional packets at arbitrary locations into the BIO, for testing purposes. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/ssltestlib.h')
-rw-r--r--test/ssltestlib.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ssltestlib.h b/test/ssltestlib.h
index f0f32c8301..04952a6f29 100644
--- a/test/ssltestlib.h
+++ b/test/ssltestlib.h
@@ -22,4 +22,14 @@ int create_ssl_connection(SSL_CTX *serverctx, SSL_CTX *clientctx, SSL **sssl,
const BIO_METHOD *bio_f_tls_dump_filter(void);
void bio_f_tls_dump_filter_free(void);
+const BIO_METHOD *bio_s_mempacket_test(void);
+void bio_s_mempacket_test_free(void);
+
+/* Packet types - value 0 is reserved */
+#define INJECT_PACKET 1
+#define INJECT_PACKET_IGNORE_REC_SEQ 2
+
+int mempacket_test_inject(BIO *bio, const char *in, int inl, int pktnum,
+ int type);
+
#endif /* HEADER_SSLTESTLIB_H */