Lines Matching +full:fault +full:- +full:inject
1 QUIC Fault Injector
10 The QUIC Fault Injector is a component within the OpenSSL test framework that
14 Typically an individual test will inject one particular misbehaviour (i.e. a
15 fault) into an otherwise normal QUIC connection. Therefore the fault injector
22 The QUIC Fault Injector will be external to libssl (it will be in the test
24 libssl and will make use of 3 integration points to inject faults. 2 of these
29 -----------------------
33 Fault Injector based tests may need to inject faults directly into the TLS
38 "Finished" message exchange - so any modifications would be rejected and the
45 modified by a "man-in-the-middle".
50 and so only usable by the Fault Injector.
86 ### QUIC Pre-Encryption Packets
91 algorithm prior to it being sent. Fault Injector based tests may need to inject
136 packet in a single datagram. Fault Injector based tests may need to inject
142 In order to provide this functionality the QUIC Fault Injector will insert
143 itself as a man-in-the-middle between the client and server. A BIO_s_dgram_pair()
145 being associated with the Fault Injector. Similarly a second BIO_s_dgram_pair()
146 will be created with one used on the server and other used with the Fault
149 With this setup the Fault Injector will act as a proxy and simply pass
157 Fault Injector API
158 ------------------
160 The Fault Injector will utilise the callbacks described above in order to supply
167 - An EncryptedExtensions handshake message being sent
168 - An ACK frame being sent
169 - A Datagram being sent
178 This is because, in MVP, it will be the client side that is under test - so the
186 It is expected that the Fault Injector API will expand over time as new
196 /* Type to represent the Fault Injector */
201 * make changes to the contents of structure objects as required and the fault
212 * keyfile, create a server and client instances as well as a fault injector
218 OSSL_QUIC_FAULT **fault, BIO **tracebio);
221 * Free up a Fault Injector instance
223 void ossl_quic_fault_free(OSSL_QUIC_FAULT *fault);
250 * Enable tests to listen for pre-encryption QUIC packets being sent
252 typedef int (*ossl_quic_fault_on_packet_plain_cb)(OSSL_QUIC_FAULT *fault,
258 int ossl_quic_fault_set_packet_plain_listener(OSSL_QUIC_FAULT *fault,
271 int ossl_quic_fault_resize_plain_packet(OSSL_QUIC_FAULT *fault, size_t newlen);
277 int ossl_quic_fault_prepend_frame(OSSL_QUIC_FAULT *fault, unsigned char *frame,
284 typedef int (*ossl_quic_fault_on_handshake_cb)(OSSL_QUIC_FAULT *fault,
289 int ossl_quic_fault_set_handshake_listener(OSSL_QUIC_FAULT *fault,
302 int ossl_quic_fault_resize_handshake(OSSL_QUIC_FAULT *fault, size_t newlen);
307 * pre-parsed ack data that can be modified as required.
312 * listener these messages are pre-parsed and supplied with message specific
315 typedef int (*ossl_quic_fault_on_enc_ext_cb)(OSSL_QUIC_FAULT *fault,
320 int ossl_quic_fault_set_hand_enc_ext_listener(OSSL_QUIC_FAULT *fault,
335 int ossl_quic_fault_resize_message(OSSL_QUIC_FAULT *fault, size_t newlen);
343 int ossl_quic_fault_delete_extension(OSSL_QUIC_FAULT *fault,
354 * Enable tests to listen for post-encryption QUIC packets being sent
356 typedef int (*ossl_quic_fault_on_packet_cipher_cb)(OSSL_QUIC_FAULT *fault,
365 int ossl_quic_fault_set_packet_cipher_listener(OSSL_QUIC_FAULT *fault,
372 typedef int (*ossl_quic_fault_on_datagram_cb)(OSSL_QUIC_FAULT *fault,
377 int ossl_quic_fault_set_datagram_listener(OSSL_QUIC_FAULT *fault,
387 int ossl_quic_fault_resize_datagram(OSSL_QUIC_FAULT *fault, size_t newlen);
392 -------------
394 This section provides some example tests to illustrate how the Fault Injector
406 static int add_unknown_frame_cb(OSSL_QUIC_FAULT *fault, QUIC_PKT_HDR *hdr,
412 * to use for testing purposes - but we just use the highest possible
423 return ossl_quic_fault_prepend_frame(fault, unknown_frame,
437 OSSL_QUIC_FAULT *fault = NULL;
443 &qtserv, &cssl, &fault, NULL)))
453 if (!TEST_true(ossl_quic_fault_set_packet_plain_listener(fault,
484 ossl_quic_fault_free(fault);
502 static int drop_transport_params_cb(OSSL_QUIC_FAULT *fault,
506 if (!ossl_quic_fault_delete_extension(fault,
508 ee->extensions, &ee->extensionslen))
520 OSSL_QUIC_FAULT *fault = NULL;
526 &qtserv, &cssl, &fault, NULL)))
529 if (!TEST_true(ossl_quic_fault_set_hand_enc_ext_listener(fault,
546 ossl_quic_fault_free(fault);