From 8ba708e5166b02ab61f2762d36b3e7b7455e9c06 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 11 Sep 2015 10:48:59 +0100 Subject: Reorganise state machine files Pull out the state machine into a separate sub directory. Also moved some functions which were nothing to do with the state machine but were in state machine files. Pulled all the SSL_METHOD definitions into one place...most of those files had very little left in them any more. Reviewed-by: Tim Hudson Reviewed-by: Richard Levitte --- ssl/Makefile | 477 ++++---- ssl/d1_both.c | 1517 ------------------------ ssl/d1_clnt.c | 191 --- ssl/d1_lib.c | 241 +++- ssl/d1_meth.c | 88 -- ssl/d1_srvr.c | 210 ---- ssl/methods.c | 347 ++++++ ssl/s3_both.c | 712 ----------- ssl/s3_clnt.c | 2819 -------------------------------------------- ssl/s3_srvr.c | 2878 --------------------------------------------- ssl/ssl_locl.h | 104 +- ssl/statem.c | 2251 ----------------------------------- ssl/statem/statem.c | 2241 +++++++++++++++++++++++++++++++++++ ssl/statem/statem.h | 174 +++ ssl/statem/statem_clnt.c | 2853 ++++++++++++++++++++++++++++++++++++++++++++ ssl/statem/statem_dtls.c | 1283 ++++++++++++++++++++ ssl/statem/statem_lib.c | 712 +++++++++++ ssl/statem/statem_srvr.c | 2929 ++++++++++++++++++++++++++++++++++++++++++++++ ssl/t1_clnt.c | 107 -- ssl/t1_meth.c | 100 -- ssl/t1_srvr.c | 109 -- 21 files changed, 10980 insertions(+), 11363 deletions(-) delete mode 100644 ssl/d1_both.c delete mode 100644 ssl/d1_clnt.c delete mode 100644 ssl/d1_meth.c delete mode 100644 ssl/d1_srvr.c create mode 100644 ssl/methods.c delete mode 100644 ssl/s3_both.c delete mode 100644 ssl/s3_clnt.c delete mode 100644 ssl/s3_srvr.c delete mode 100644 ssl/statem.c create mode 100644 ssl/statem/statem.c create mode 100644 ssl/statem/statem.h create mode 100644 ssl/statem/statem_clnt.c create mode 100644 ssl/statem/statem_dtls.c create mode 100644 ssl/statem/statem_lib.c create mode 100644 ssl/statem/statem_srvr.c delete mode 100644 ssl/t1_clnt.c delete mode 100644 ssl/t1_meth.c delete mode 100644 ssl/t1_srvr.c (limited to 'ssl') diff --git a/ssl/Makefile b/ssl/Makefile index 536ddcc200..9f1fe8d8c2 100644 --- a/ssl/Makefile +++ b/ssl/Makefile @@ -17,33 +17,33 @@ GENERAL=Makefile README ssl-lib.com install.com LIB=$(TOP)/libssl.a SHARED_LIB= libssl$(SHLIB_EXT) LIBSRC= \ - s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c record/rec_layer_s3.c \ - s3_both.c s3_cbc.c s3_msg.c \ - t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c t1_ext.c \ - d1_meth.c d1_srvr.c d1_clnt.c d1_lib.c record/rec_layer_d1.c d1_msg.c \ - d1_both.c d1_srtp.c \ + statem/statem_srvr.c statem/statem_clnt.c s3_lib.c s3_enc.c record/rec_layer_s3.c \ + statem/statem_lib.c s3_cbc.c s3_msg.c \ + methods.c t1_lib.c t1_enc.c t1_ext.c \ + d1_lib.c record/rec_layer_d1.c d1_msg.c \ + statem/statem_dtls.c d1_srtp.c \ ssl_lib.c ssl_err2.c ssl_cert.c ssl_sess.c \ ssl_ciph.c ssl_stat.c ssl_rsa.c \ ssl_asn1.c ssl_txt.c ssl_algs.c ssl_conf.c \ bio_ssl.c ssl_err.c t1_reneg.c tls_srp.c t1_trce.c ssl_utst.c \ record/ssl3_buffer.c record/ssl3_record.c record/dtls1_bitmap.c \ - statem.c + statem/statem.c LIBOBJ= \ - s3_srvr.o s3_clnt.o s3_lib.o s3_enc.o record/rec_layer_s3.o \ - s3_both.o s3_cbc.o s3_msg.o \ - t1_meth.o t1_srvr.o t1_clnt.o t1_lib.o t1_enc.o t1_ext.o \ - d1_meth.o d1_srvr.o d1_clnt.o d1_lib.o record/rec_layer_d1.o d1_msg.o \ - d1_both.o d1_srtp.o\ + statem/statem_srvr.o statem/statem_clnt.o s3_lib.o s3_enc.o record/rec_layer_s3.o \ + statem/statem_lib.o s3_cbc.o s3_msg.o \ + methods.o t1_lib.o t1_enc.o t1_ext.o \ + d1_lib.o record/rec_layer_d1.o d1_msg.o \ + statem/statem_dtls.o d1_srtp.o\ ssl_lib.o ssl_err2.o ssl_cert.o ssl_sess.o \ ssl_ciph.o ssl_stat.o ssl_rsa.o \ ssl_asn1.o ssl_txt.o ssl_algs.o ssl_conf.o \ bio_ssl.o ssl_err.o t1_reneg.o tls_srp.o t1_trce.o ssl_utst.o \ record/ssl3_buffer.o record/ssl3_record.o record/dtls1_bitmap.o \ - statem.o + statem/statem.o SRC= $(LIBSRC) -HEADER= ssl_locl.h record/record_locl.h record/record.h +HEADER= ssl_locl.h record/record_locl.h record/record.h statem/statem.h ALL= $(GENERAL) $(SRC) $(HEADER) @@ -93,7 +93,9 @@ clean: rm -f $(LIBOBJ) *.obj lib tags core .pure .nfs* *.old *.bak fluff rm -f record/*.obj record/lib record/retags record/core \ record/.pure record/.nfs* record/*.old record/*.bak record/fluff - + rm -f statem/*.obj statem/lib statem/retags statem/core \ + statem/.pure statem/.nfs* statem/*.old statem/*.bak statem/fluff + # DO NOT DELETE THIS LINE -- make depend depends on it. bio_ssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h @@ -115,48 +117,7 @@ bio_ssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h bio_ssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h bio_ssl.o: ../include/openssl/tls1.h ../include/openssl/x509.h bio_ssl.o: ../include/openssl/x509_vfy.h bio_ssl.c packet_locl.h -bio_ssl.o: record/record.h ssl_locl.h -d1_both.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h -d1_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h -d1_both.o: ../include/openssl/comp.h ../include/openssl/crypto.h -d1_both.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h -d1_both.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -d1_both.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -d1_both.o: ../include/openssl/err.h ../include/openssl/evp.h -d1_both.o: ../include/openssl/hmac.h ../include/openssl/lhash.h -d1_both.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -d1_both.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -d1_both.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -d1_both.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -d1_both.o: ../include/openssl/pqueue.h ../include/openssl/rand.h -d1_both.o: ../include/openssl/rsa.h ../include/openssl/safestack.h -d1_both.o: ../include/openssl/sha.h ../include/openssl/srtp.h -d1_both.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -d1_both.o: ../include/openssl/ssl3.h ../include/openssl/stack.h -d1_both.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h -d1_both.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_both.c -d1_both.o: packet_locl.h record/record.h ssl_locl.h -d1_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h -d1_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h -d1_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h -d1_clnt.o: ../include/openssl/dh.h ../include/openssl/dsa.h -d1_clnt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h -d1_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -d1_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h -d1_clnt.o: ../include/openssl/evp.h ../include/openssl/hmac.h -d1_clnt.o: ../include/openssl/lhash.h ../include/openssl/md5.h -d1_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -d1_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -d1_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -d1_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -d1_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h -d1_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h -d1_clnt.o: ../include/openssl/sha.h ../include/openssl/srtp.h -d1_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -d1_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h -d1_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h -d1_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_clnt.c -d1_clnt.o: packet_locl.h record/record.h ssl_locl.h +bio_ssl.o: record/record.h ssl_locl.h statem/statem.h d1_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h d1_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h d1_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -169,34 +130,14 @@ d1_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h d1_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h d1_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h d1_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -d1_lib.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h -d1_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h -d1_lib.o: ../include/openssl/srtp.h ../include/openssl/ssl.h -d1_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h -d1_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -d1_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h -d1_lib.o: ../include/openssl/x509_vfy.h d1_lib.c packet_locl.h record/record.h -d1_lib.o: ssl_locl.h -d1_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h -d1_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h -d1_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h -d1_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h -d1_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -d1_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -d1_meth.o: ../include/openssl/err.h ../include/openssl/evp.h -d1_meth.o: ../include/openssl/hmac.h ../include/openssl/lhash.h -d1_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -d1_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -d1_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -d1_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -d1_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h -d1_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h -d1_meth.o: ../include/openssl/srtp.h ../include/openssl/ssl.h -d1_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h -d1_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -d1_meth.o: ../include/openssl/tls1.h ../include/openssl/x509.h -d1_meth.o: ../include/openssl/x509_vfy.h d1_meth.c packet_locl.h -d1_meth.o: record/record.h ssl_locl.h +d1_lib.o: ../include/openssl/pqueue.h ../include/openssl/rand.h +d1_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +d1_lib.o: ../include/openssl/sha.h ../include/openssl/srtp.h +d1_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +d1_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +d1_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +d1_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_lib.c +d1_lib.o: packet_locl.h record/record.h ssl_locl.h statem/statem.h d1_msg.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h d1_msg.o: ../include/openssl/bn.h ../include/openssl/buffer.h d1_msg.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -216,7 +157,7 @@ d1_msg.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h d1_msg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h d1_msg.o: ../include/openssl/tls1.h ../include/openssl/x509.h d1_msg.o: ../include/openssl/x509_vfy.h d1_msg.c packet_locl.h record/record.h -d1_msg.o: ssl_locl.h +d1_msg.o: ssl_locl.h statem/statem.h d1_srtp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h d1_srtp.o: ../include/openssl/bn.h ../include/openssl/buffer.h d1_srtp.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -236,28 +177,27 @@ d1_srtp.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h d1_srtp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h d1_srtp.o: ../include/openssl/tls1.h ../include/openssl/x509.h d1_srtp.o: ../include/openssl/x509_vfy.h d1_srtp.c packet_locl.h -d1_srtp.o: record/record.h ssl_locl.h -d1_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h -d1_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h -d1_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h -d1_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h -d1_srvr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h -d1_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -d1_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h -d1_srvr.o: ../include/openssl/evp.h ../include/openssl/hmac.h -d1_srvr.o: ../include/openssl/lhash.h ../include/openssl/md5.h -d1_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -d1_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -d1_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -d1_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -d1_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h -d1_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h -d1_srvr.o: ../include/openssl/sha.h ../include/openssl/srtp.h -d1_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -d1_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h -d1_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h -d1_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_srvr.c -d1_srvr.o: packet_locl.h record/record.h ssl_locl.h +d1_srtp.o: record/record.h ssl_locl.h statem/statem.h +methods.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h +methods.o: ../include/openssl/bn.h ../include/openssl/buffer.h +methods.o: ../include/openssl/comp.h ../include/openssl/crypto.h +methods.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h +methods.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +methods.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h +methods.o: ../include/openssl/err.h ../include/openssl/evp.h +methods.o: ../include/openssl/hmac.h ../include/openssl/lhash.h +methods.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +methods.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +methods.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +methods.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +methods.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h +methods.o: ../include/openssl/safestack.h ../include/openssl/sha.h +methods.o: ../include/openssl/srtp.h ../include/openssl/ssl.h +methods.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h +methods.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +methods.o: ../include/openssl/tls1.h ../include/openssl/x509.h +methods.o: ../include/openssl/x509_vfy.h methods.c packet_locl.h +methods.o: record/record.h ssl_locl.h statem/statem.h record/dtls1_bitmap.o: ../e_os.h ../include/openssl/asn1.h record/dtls1_bitmap.o: ../include/openssl/bio.h ../include/openssl/bn.h record/dtls1_bitmap.o: ../include/openssl/buffer.h ../include/openssl/comp.h @@ -280,7 +220,8 @@ record/dtls1_bitmap.o: ../include/openssl/stack.h ../include/openssl/symhacks.h record/dtls1_bitmap.o: ../include/openssl/tls1.h ../include/openssl/x509.h record/dtls1_bitmap.o: ../include/openssl/x509_vfy.h record/../packet_locl.h record/dtls1_bitmap.o: record/../record/record.h record/../ssl_locl.h -record/dtls1_bitmap.o: record/dtls1_bitmap.c record/record_locl.h +record/dtls1_bitmap.o: record/../statem/statem.h record/dtls1_bitmap.c +record/dtls1_bitmap.o: record/record_locl.h record/rec_layer_d1.o: ../e_os.h ../include/openssl/asn1.h record/rec_layer_d1.o: ../include/openssl/bio.h ../include/openssl/bn.h record/rec_layer_d1.o: ../include/openssl/buffer.h ../include/openssl/comp.h @@ -303,8 +244,8 @@ record/rec_layer_d1.o: ../include/openssl/ssl3.h ../include/openssl/stack.h record/rec_layer_d1.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h record/rec_layer_d1.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h record/rec_layer_d1.o: record/../packet_locl.h record/../record/record.h -record/rec_layer_d1.o: record/../ssl_locl.h record/rec_layer_d1.c -record/rec_layer_d1.o: record/record_locl.h +record/rec_layer_d1.o: record/../ssl_locl.h record/../statem/statem.h +record/rec_layer_d1.o: record/rec_layer_d1.c record/record_locl.h record/rec_layer_s3.o: ../e_os.h ../include/openssl/asn1.h record/rec_layer_s3.o: ../include/openssl/bio.h ../include/openssl/bn.h record/rec_layer_s3.o: ../include/openssl/buffer.h ../include/openssl/comp.h @@ -327,8 +268,8 @@ record/rec_layer_s3.o: ../include/openssl/ssl3.h ../include/openssl/stack.h record/rec_layer_s3.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h record/rec_layer_s3.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h record/rec_layer_s3.o: record/../packet_locl.h record/../record/record.h -record/rec_layer_s3.o: record/../ssl_locl.h record/rec_layer_s3.c -record/rec_layer_s3.o: record/record_locl.h +record/rec_layer_s3.o: record/../ssl_locl.h record/../statem/statem.h +record/rec_layer_s3.o: record/rec_layer_s3.c record/record_locl.h record/ssl3_buffer.o: ../e_os.h ../include/openssl/asn1.h record/ssl3_buffer.o: ../include/openssl/bio.h ../include/openssl/bn.h record/ssl3_buffer.o: ../include/openssl/buffer.h ../include/openssl/comp.h @@ -351,7 +292,8 @@ record/ssl3_buffer.o: ../include/openssl/stack.h ../include/openssl/symhacks.h record/ssl3_buffer.o: ../include/openssl/tls1.h ../include/openssl/x509.h record/ssl3_buffer.o: ../include/openssl/x509_vfy.h record/../packet_locl.h record/ssl3_buffer.o: record/../record/record.h record/../ssl_locl.h -record/ssl3_buffer.o: record/record_locl.h record/ssl3_buffer.c +record/ssl3_buffer.o: record/../statem/statem.h record/record_locl.h +record/ssl3_buffer.o: record/ssl3_buffer.c record/ssl3_record.o: ../e_os.h ../include/internal/constant_time_locl.h record/ssl3_record.o: ../include/openssl/asn1.h ../include/openssl/bio.h record/ssl3_record.o: ../include/openssl/bn.h ../include/openssl/buffer.h @@ -374,28 +316,8 @@ record/ssl3_record.o: ../include/openssl/ssl3.h ../include/openssl/stack.h record/ssl3_record.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h record/ssl3_record.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h record/ssl3_record.o: record/../packet_locl.h record/../record/record.h -record/ssl3_record.o: record/../ssl_locl.h record/record_locl.h -record/ssl3_record.o: record/ssl3_record.c -s3_both.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h -s3_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h -s3_both.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s3_both.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h -s3_both.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -s3_both.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -s3_both.o: ../include/openssl/err.h ../include/openssl/evp.h -s3_both.o: ../include/openssl/hmac.h ../include/openssl/lhash.h -s3_both.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -s3_both.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -s3_both.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -s3_both.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -s3_both.o: ../include/openssl/pqueue.h ../include/openssl/rand.h -s3_both.o: ../include/openssl/rsa.h ../include/openssl/safestack.h -s3_both.o: ../include/openssl/sha.h ../include/openssl/srtp.h -s3_both.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -s3_both.o: ../include/openssl/ssl3.h ../include/openssl/stack.h -s3_both.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h -s3_both.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -s3_both.o: packet_locl.h record/record.h s3_both.c ssl_locl.h +record/ssl3_record.o: record/../ssl_locl.h record/../statem/statem.h +record/ssl3_record.o: record/record_locl.h record/ssl3_record.c s3_cbc.o: ../e_os.h ../include/internal/constant_time_locl.h s3_cbc.o: ../include/openssl/asn1.h ../include/openssl/bio.h s3_cbc.o: ../include/openssl/bn.h ../include/openssl/buffer.h @@ -416,29 +338,7 @@ s3_cbc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h s3_cbc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h s3_cbc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h s3_cbc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h packet_locl.h -s3_cbc.o: record/record.h s3_cbc.c ssl_locl.h -s3_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h -s3_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h -s3_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s3_clnt.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s3_clnt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h -s3_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -s3_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -s3_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h -s3_clnt.o: ../include/openssl/hmac.h ../include/openssl/lhash.h -s3_clnt.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h -s3_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h -s3_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -s3_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h -s3_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h -s3_clnt.o: ../include/openssl/rand.h ../include/openssl/rsa.h -s3_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h -s3_clnt.o: ../include/openssl/srtp.h ../include/openssl/ssl.h -s3_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h -s3_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -s3_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h -s3_clnt.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -s3_clnt.o: s3_clnt.c ssl_locl.h +s3_cbc.o: record/record.h s3_cbc.c ssl_locl.h statem/statem.h s3_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h s3_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h s3_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -458,7 +358,7 @@ s3_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h s3_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h s3_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h s3_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h packet_locl.h -s3_enc.o: record/record.h s3_enc.c ssl_locl.h +s3_enc.o: record/record.h s3_enc.c ssl_locl.h statem/statem.h s3_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h s3_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h s3_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -479,7 +379,7 @@ s3_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h s3_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h s3_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h s3_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h packet_locl.h -s3_lib.o: record/record.h s3_lib.c ssl_locl.h +s3_lib.o: record/record.h s3_lib.c ssl_locl.h statem/statem.h s3_msg.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h s3_msg.o: ../include/openssl/bn.h ../include/openssl/buffer.h s3_msg.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -499,29 +399,7 @@ s3_msg.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h s3_msg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h s3_msg.o: ../include/openssl/tls1.h ../include/openssl/x509.h s3_msg.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h s3_msg.c -s3_msg.o: ssl_locl.h -s3_srvr.o: ../e_os.h ../include/internal/constant_time_locl.h -s3_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h -s3_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h -s3_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s3_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s3_srvr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h -s3_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -s3_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h -s3_srvr.o: ../include/openssl/evp.h ../include/openssl/hmac.h -s3_srvr.o: ../include/openssl/lhash.h ../include/openssl/md5.h -s3_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -s3_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -s3_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -s3_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -s3_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h -s3_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h -s3_srvr.o: ../include/openssl/sha.h ../include/openssl/srtp.h -s3_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -s3_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h -s3_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h -s3_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -s3_srvr.o: packet_locl.h record/record.h s3_srvr.c ssl_locl.h +s3_msg.o: ssl_locl.h statem/statem.h ssl_algs.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ssl_algs.o: ../include/openssl/bn.h ../include/openssl/buffer.h ssl_algs.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -541,7 +419,7 @@ ssl_algs.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h ssl_algs.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ssl_algs.o: ../include/openssl/tls1.h ../include/openssl/x509.h ssl_algs.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -ssl_algs.o: ssl_algs.c ssl_locl.h +ssl_algs.o: ssl_algs.c ssl_locl.h statem/statem.h ssl_asn1.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h ssl_asn1.o: ../include/openssl/bio.h ../include/openssl/bn.h ssl_asn1.o: ../include/openssl/buffer.h ../include/openssl/comp.h @@ -561,7 +439,7 @@ ssl_asn1.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h ssl_asn1.o: ../include/openssl/ssl3.h ../include/openssl/stack.h ssl_asn1.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h ssl_asn1.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ssl_asn1.o: packet_locl.h record/record.h ssl_asn1.c ssl_locl.h +ssl_asn1.o: packet_locl.h record/record.h ssl_asn1.c ssl_locl.h statem/statem.h ssl_cert.o: ../e_os.h ../include/internal/o_dir.h ../include/openssl/asn1.h ssl_cert.o: ../include/openssl/bio.h ../include/openssl/bn.h ssl_cert.o: ../include/openssl/buffer.h ../include/openssl/comp.h @@ -583,7 +461,7 @@ ssl_cert.o: ../include/openssl/ssl3.h ../include/openssl/stack.h ssl_cert.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h ssl_cert.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_cert.o: ../include/openssl/x509v3.h packet_locl.h record/record.h -ssl_cert.o: ssl_cert.c ssl_locl.h +ssl_cert.o: ssl_cert.c ssl_locl.h statem/statem.h ssl_ciph.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ssl_ciph.o: ../include/openssl/bn.h ../include/openssl/buffer.h ssl_ciph.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -603,7 +481,7 @@ ssl_ciph.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h ssl_ciph.o: ../include/openssl/ssl3.h ../include/openssl/stack.h ssl_ciph.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h ssl_ciph.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ssl_ciph.o: packet_locl.h record/record.h ssl_ciph.c ssl_locl.h +ssl_ciph.o: packet_locl.h record/record.h ssl_ciph.c ssl_locl.h statem/statem.h ssl_conf.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ssl_conf.o: ../include/openssl/bn.h ../include/openssl/buffer.h ssl_conf.o: ../include/openssl/comp.h ../include/openssl/conf.h @@ -624,7 +502,7 @@ ssl_conf.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h ssl_conf.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ssl_conf.o: ../include/openssl/tls1.h ../include/openssl/x509.h ssl_conf.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -ssl_conf.o: ssl_conf.c ssl_locl.h +ssl_conf.o: ssl_conf.c ssl_locl.h statem/statem.h ssl_err.o: ../include/openssl/asn1.h ../include/openssl/bio.h ssl_err.o: ../include/openssl/buffer.h ../include/openssl/comp.h ssl_err.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h @@ -681,7 +559,7 @@ ssl_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h ssl_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h ssl_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_lib.o: ../include/openssl/x509v3.h packet_locl.h record/record.h ssl_lib.c -ssl_lib.o: ssl_locl.h +ssl_lib.o: ssl_locl.h statem/statem.h ssl_rsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ssl_rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h ssl_rsa.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -701,7 +579,7 @@ ssl_rsa.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h ssl_rsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ssl_rsa.o: ../include/openssl/tls1.h ../include/openssl/x509.h ssl_rsa.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -ssl_rsa.o: ssl_locl.h ssl_rsa.c +ssl_rsa.o: ssl_locl.h ssl_rsa.c statem/statem.h ssl_sess.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ssl_sess.o: ../include/openssl/bn.h ../include/openssl/buffer.h ssl_sess.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -722,7 +600,7 @@ ssl_sess.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h ssl_sess.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ssl_sess.o: ../include/openssl/tls1.h ../include/openssl/x509.h ssl_sess.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -ssl_sess.o: ssl_locl.h ssl_sess.c +ssl_sess.o: ssl_locl.h ssl_sess.c statem/statem.h ssl_stat.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ssl_stat.o: ../include/openssl/bn.h ../include/openssl/buffer.h ssl_stat.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -742,7 +620,7 @@ ssl_stat.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h ssl_stat.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ssl_stat.o: ../include/openssl/tls1.h ../include/openssl/x509.h ssl_stat.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -ssl_stat.o: ssl_locl.h ssl_stat.c +ssl_stat.o: ssl_locl.h ssl_stat.c statem/statem.h ssl_txt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ssl_txt.o: ../include/openssl/bn.h ../include/openssl/buffer.h ssl_txt.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -762,7 +640,7 @@ ssl_txt.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h ssl_txt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ssl_txt.o: ../include/openssl/tls1.h ../include/openssl/x509.h ssl_txt.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -ssl_txt.o: ssl_locl.h ssl_txt.c +ssl_txt.o: ssl_locl.h ssl_txt.c statem/statem.h ssl_utst.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ssl_utst.o: ../include/openssl/bn.h ../include/openssl/buffer.h ssl_utst.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -782,47 +660,126 @@ ssl_utst.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h ssl_utst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ssl_utst.o: ../include/openssl/tls1.h ../include/openssl/x509.h ssl_utst.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -ssl_utst.o: ssl_locl.h ssl_utst.c -statem.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h -statem.o: ../include/openssl/bn.h ../include/openssl/buffer.h -statem.o: ../include/openssl/comp.h ../include/openssl/crypto.h -statem.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h -statem.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -statem.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -statem.o: ../include/openssl/err.h ../include/openssl/evp.h -statem.o: ../include/openssl/hmac.h ../include/openssl/lhash.h -statem.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -statem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -statem.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -statem.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -statem.o: ../include/openssl/pqueue.h ../include/openssl/rand.h -statem.o: ../include/openssl/rsa.h ../include/openssl/safestack.h -statem.o: ../include/openssl/sha.h ../include/openssl/srtp.h -statem.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -statem.o: ../include/openssl/ssl3.h ../include/openssl/stack.h -statem.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h -statem.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h packet_locl.h -statem.o: record/record.h ssl_locl.h statem.c -t1_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h -t1_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h -t1_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h -t1_clnt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h -t1_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -t1_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -t1_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h -t1_clnt.o: ../include/openssl/hmac.h ../include/openssl/lhash.h -t1_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -t1_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -t1_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -t1_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -t1_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h -t1_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h -t1_clnt.o: ../include/openssl/sha.h ../include/openssl/srtp.h -t1_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -t1_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h -t1_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h -t1_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -t1_clnt.o: packet_locl.h record/record.h ssl_locl.h t1_clnt.c +ssl_utst.o: ssl_locl.h ssl_utst.c statem/statem.h +statem/statem.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h +statem/statem.o: ../include/openssl/bn.h ../include/openssl/buffer.h +statem/statem.o: ../include/openssl/comp.h ../include/openssl/crypto.h +statem/statem.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h +statem/statem.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +statem/statem.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h +statem/statem.o: ../include/openssl/err.h ../include/openssl/evp.h +statem/statem.o: ../include/openssl/hmac.h ../include/openssl/lhash.h +statem/statem.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +statem/statem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +statem/statem.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +statem/statem.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +statem/statem.o: ../include/openssl/pqueue.h ../include/openssl/rand.h +statem/statem.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +statem/statem.o: ../include/openssl/sha.h ../include/openssl/srtp.h +statem/statem.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +statem/statem.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +statem/statem.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +statem/statem.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +statem/statem.o: statem/../packet_locl.h statem/../record/record.h +statem/statem.o: statem/../ssl_locl.h statem/../statem/statem.h statem/statem.c +statem/statem_clnt.o: ../e_os.h ../include/openssl/asn1.h +statem/statem_clnt.o: ../include/openssl/bio.h ../include/openssl/bn.h +statem/statem_clnt.o: ../include/openssl/buffer.h ../include/openssl/comp.h +statem/statem_clnt.o: ../include/openssl/crypto.h ../include/openssl/dh.h +statem/statem_clnt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h +statem/statem_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +statem/statem_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h +statem/statem_clnt.o: ../include/openssl/engine.h ../include/openssl/err.h +statem/statem_clnt.o: ../include/openssl/evp.h ../include/openssl/hmac.h +statem/statem_clnt.o: ../include/openssl/lhash.h ../include/openssl/md5.h +statem/statem_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +statem/statem_clnt.o: ../include/openssl/opensslconf.h +statem/statem_clnt.o: ../include/openssl/opensslv.h +statem/statem_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +statem/statem_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +statem/statem_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h +statem/statem_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +statem/statem_clnt.o: ../include/openssl/sha.h ../include/openssl/srtp.h +statem/statem_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +statem/statem_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +statem/statem_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +statem/statem_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +statem/statem_clnt.o: statem/../packet_locl.h statem/../record/record.h +statem/statem_clnt.o: statem/../ssl_locl.h statem/../statem/statem.h +statem/statem_clnt.o: statem/statem_clnt.c +statem/statem_dtls.o: ../e_os.h ../include/openssl/asn1.h +statem/statem_dtls.o: ../include/openssl/bio.h ../include/openssl/bn.h +statem/statem_dtls.o: ../include/openssl/buffer.h ../include/openssl/comp.h +statem/statem_dtls.o: ../include/openssl/crypto.h ../include/openssl/dsa.h +statem/statem_dtls.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h +statem/statem_dtls.o: ../include/openssl/ec.h ../include/openssl/ecdh.h +statem/statem_dtls.o: ../include/openssl/ecdsa.h ../include/openssl/err.h +statem/statem_dtls.o: ../include/openssl/evp.h ../include/openssl/hmac.h +statem/statem_dtls.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +statem/statem_dtls.o: ../include/openssl/objects.h +statem/statem_dtls.o: ../include/openssl/opensslconf.h +statem/statem_dtls.o: ../include/openssl/opensslv.h +statem/statem_dtls.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +statem/statem_dtls.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +statem/statem_dtls.o: ../include/openssl/pqueue.h ../include/openssl/rand.h +statem/statem_dtls.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +statem/statem_dtls.o: ../include/openssl/sha.h ../include/openssl/srtp.h +statem/statem_dtls.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +statem/statem_dtls.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +statem/statem_dtls.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +statem/statem_dtls.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +statem/statem_dtls.o: statem/../packet_locl.h statem/../record/record.h +statem/statem_dtls.o: statem/../ssl_locl.h statem/../statem/statem.h +statem/statem_dtls.o: statem/statem_dtls.c +statem/statem_lib.o: ../e_os.h ../include/openssl/asn1.h +statem/statem_lib.o: ../include/openssl/bio.h ../include/openssl/bn.h +statem/statem_lib.o: ../include/openssl/buffer.h ../include/openssl/comp.h +statem/statem_lib.o: ../include/openssl/crypto.h ../include/openssl/dsa.h +statem/statem_lib.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h +statem/statem_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h +statem/statem_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h +statem/statem_lib.o: ../include/openssl/evp.h ../include/openssl/hmac.h +statem/statem_lib.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +statem/statem_lib.o: ../include/openssl/objects.h +statem/statem_lib.o: ../include/openssl/opensslconf.h +statem/statem_lib.o: ../include/openssl/opensslv.h +statem/statem_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +statem/statem_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +statem/statem_lib.o: ../include/openssl/pqueue.h ../include/openssl/rand.h +statem/statem_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +statem/statem_lib.o: ../include/openssl/sha.h ../include/openssl/srtp.h +statem/statem_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +statem/statem_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +statem/statem_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +statem/statem_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +statem/statem_lib.o: statem/../packet_locl.h statem/../record/record.h +statem/statem_lib.o: statem/../ssl_locl.h statem/../statem/statem.h +statem/statem_lib.o: statem/statem_lib.c +statem/statem_srvr.o: ../e_os.h ../include/internal/constant_time_locl.h +statem/statem_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h +statem/statem_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h +statem/statem_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h +statem/statem_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h +statem/statem_srvr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h +statem/statem_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h +statem/statem_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h +statem/statem_srvr.o: ../include/openssl/evp.h ../include/openssl/hmac.h +statem/statem_srvr.o: ../include/openssl/lhash.h ../include/openssl/md5.h +statem/statem_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +statem/statem_srvr.o: ../include/openssl/opensslconf.h +statem/statem_srvr.o: ../include/openssl/opensslv.h +statem/statem_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +statem/statem_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +statem/statem_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h +statem/statem_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +statem/statem_srvr.o: ../include/openssl/sha.h ../include/openssl/srtp.h +statem/statem_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +statem/statem_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +statem/statem_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +statem/statem_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +statem/statem_srvr.o: statem/../packet_locl.h statem/../record/record.h +statem/statem_srvr.o: statem/../ssl_locl.h statem/../statem/statem.h +statem/statem_srvr.o: statem/statem_srvr.c t1_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h t1_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h t1_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -843,7 +800,7 @@ t1_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h t1_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h t1_enc.o: ../include/openssl/tls1.h ../include/openssl/x509.h t1_enc.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -t1_enc.o: ssl_locl.h t1_enc.c +t1_enc.o: ssl_locl.h statem/statem.h t1_enc.c t1_ext.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h t1_ext.o: ../include/openssl/bn.h ../include/openssl/buffer.h t1_ext.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -863,7 +820,7 @@ t1_ext.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h t1_ext.o: ../include/openssl/stack.h ../include/openssl/symhacks.h t1_ext.o: ../include/openssl/tls1.h ../include/openssl/x509.h t1_ext.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -t1_ext.o: ssl_locl.h t1_ext.c +t1_ext.o: ssl_locl.h statem/statem.h t1_ext.c t1_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h t1_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h t1_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h @@ -885,27 +842,7 @@ t1_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h t1_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h t1_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h t1_lib.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h -t1_lib.o: packet_locl.h record/record.h ssl_locl.h t1_lib.c -t1_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h -t1_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h -t1_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h -t1_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h -t1_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -t1_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -t1_meth.o: ../include/openssl/err.h ../include/openssl/evp.h -t1_meth.o: ../include/openssl/hmac.h ../include/openssl/lhash.h -t1_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -t1_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -t1_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -t1_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -t1_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h -t1_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h -t1_meth.o: ../include/openssl/srtp.h ../include/openssl/ssl.h -t1_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h -t1_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -t1_meth.o: ../include/openssl/tls1.h ../include/openssl/x509.h -t1_meth.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -t1_meth.o: ssl_locl.h t1_meth.c +t1_lib.o: packet_locl.h record/record.h ssl_locl.h statem/statem.h t1_lib.c t1_reneg.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h t1_reneg.o: ../include/openssl/bn.h ../include/openssl/buffer.h t1_reneg.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -925,27 +862,7 @@ t1_reneg.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h t1_reneg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h t1_reneg.o: ../include/openssl/tls1.h ../include/openssl/x509.h t1_reneg.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -t1_reneg.o: ssl_locl.h t1_reneg.c -t1_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h -t1_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h -t1_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h -t1_srvr.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h -t1_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -t1_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -t1_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h -t1_srvr.o: ../include/openssl/hmac.h ../include/openssl/lhash.h -t1_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -t1_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -t1_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -t1_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -t1_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h -t1_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h -t1_srvr.o: ../include/openssl/sha.h ../include/openssl/srtp.h -t1_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -t1_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h -t1_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h -t1_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -t1_srvr.o: packet_locl.h record/record.h ssl_locl.h t1_srvr.c +t1_reneg.o: ssl_locl.h statem/statem.h t1_reneg.c t1_trce.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h t1_trce.o: ../include/openssl/bn.h ../include/openssl/buffer.h t1_trce.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -965,7 +882,7 @@ t1_trce.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h t1_trce.o: ../include/openssl/stack.h ../include/openssl/symhacks.h t1_trce.o: ../include/openssl/tls1.h ../include/openssl/x509.h t1_trce.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -t1_trce.o: ssl_locl.h t1_trce.c +t1_trce.o: ssl_locl.h statem/statem.h t1_trce.c tls_srp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h tls_srp.o: ../include/openssl/bn.h ../include/openssl/buffer.h tls_srp.o: ../include/openssl/comp.h ../include/openssl/crypto.h @@ -986,4 +903,4 @@ tls_srp.o: ../include/openssl/ssl2.h ../include/openssl/ssl3.h tls_srp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h tls_srp.o: ../include/openssl/tls1.h ../include/openssl/x509.h tls_srp.o: ../include/openssl/x509_vfy.h packet_locl.h record/record.h -tls_srp.o: ssl_locl.h tls_srp.c +tls_srp.o: ssl_locl.h statem/statem.h tls_srp.c diff --git a/ssl/d1_both.c b/ssl/d1_both.c deleted file mode 100644 index e20278b1ce..0000000000 --- a/ssl/d1_both.c +++ /dev/null @@ -1,1517 +0,0 @@ -/* ssl/d1_both.c */ -/* - * DTLS implementation written by Nagendra Modadugu - * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. - */ -/* ==================================================================== - * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#include -#include -#include -#include "ssl_locl.h" -#include -#include -#include -#include -#include - -#define RSMBLY_BITMASK_SIZE(msg_len) (((msg_len) + 7) / 8) - -#define RSMBLY_BITMASK_MARK(bitmask, start, end) { \ - if ((end) - (start) <= 8) { \ - long ii; \ - for (ii = (start); ii < (end); ii++) bitmask[((ii) >> 3)] |= (1 << ((ii) & 7)); \ - } else { \ - long ii; \ - bitmask[((start) >> 3)] |= bitmask_start_values[((start) & 7)]; \ - for (ii = (((start) >> 3) + 1); ii < ((((end) - 1)) >> 3); ii++) bitmask[ii] = 0xff; \ - bitmask[(((end) - 1) >> 3)] |= bitmask_end_values[((end) & 7)]; \ - } } - -#define RSMBLY_BITMASK_IS_COMPLETE(bitmask, msg_len, is_complete) { \ - long ii; \ - OPENSSL_assert((msg_len) > 0); \ - is_complete = 1; \ - if (bitmask[(((msg_len) - 1) >> 3)] != bitmask_end_values[((msg_len) & 7)]) is_complete = 0; \ - if (is_complete) for (ii = (((msg_len) - 1) >> 3) - 1; ii >= 0 ; ii--) \ - if (bitmask[ii] != 0xff) { is_complete = 0; break; } } - -static unsigned char bitmask_start_values[] = - { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80 }; -static unsigned char bitmask_end_values[] = - { 0xff, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f }; - -/* XDTLS: figure out the right values */ -static const unsigned int g_probable_mtu[] = { 1500, 512, 256 }; - -static void dtls1_fix_message_header(SSL *s, unsigned long frag_off, - unsigned long frag_len); -static unsigned char *dtls1_write_message_header(SSL *s, unsigned char *p); -static void dtls1_set_message_header_int(SSL *s, unsigned char mt, - unsigned long len, - unsigned short seq_num, - unsigned long frag_off, - unsigned long frag_len); -static int dtls_get_reassembled_message(SSL *s, long *len); - -static hm_fragment *dtls1_hm_fragment_new(unsigned long frag_len, - int reassembly) -{ - hm_fragment *frag = NULL; - unsigned char *buf = NULL; - unsigned char *bitmask = NULL; - - frag = OPENSSL_malloc(sizeof(*frag)); - if (frag == NULL) - return NULL; - - if (frag_len) { - buf = OPENSSL_malloc(frag_len); - if (buf == NULL) { - OPENSSL_free(frag); - return NULL; - } - } - - /* zero length fragment gets zero frag->fragment */ - frag->fragment = buf; - - /* Initialize reassembly bitmask if necessary */ - if (reassembly) { - bitmask = OPENSSL_zalloc(RSMBLY_BITMASK_SIZE(frag_len)); - if (bitmask == NULL) { - OPENSSL_free(buf); - OPENSSL_free(frag); - return NULL; - } - } - - frag->reassembly = bitmask; - - return frag; -} - -void dtls1_hm_fragment_free(hm_fragment *frag) -{ - if (!frag) - return; - if (frag->msg_header.is_ccs) { - EVP_CIPHER_CTX_free(frag->msg_header. - saved_retransmit_state.enc_write_ctx); - EVP_MD_CTX_destroy(frag->msg_header. - saved_retransmit_state.write_hash); - } - OPENSSL_free(frag->fragment); - OPENSSL_free(frag->reassembly); - OPENSSL_free(frag); -} - -static int dtls1_query_mtu(SSL *s) -{ - if (s->d1->link_mtu) { - s->d1->mtu = - s->d1->link_mtu - BIO_dgram_get_mtu_overhead(SSL_get_wbio(s)); - s->d1->link_mtu = 0; - } - - /* AHA! Figure out the MTU, and stick to the right size */ - if (s->d1->mtu < dtls1_min_mtu(s)) { - if (!(SSL_get_options(s) & SSL_OP_NO_QUERY_MTU)) { - s->d1->mtu = - BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_QUERY_MTU, 0, NULL); - - /* - * I've seen the kernel return bogus numbers when it doesn't know - * (initial write), so just make sure we have a reasonable number - */ - if (s->d1->mtu < dtls1_min_mtu(s)) { - /* Set to min mtu */ - s->d1->mtu = dtls1_min_mtu(s); - BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_SET_MTU, - s->d1->mtu, NULL); - } - } else - return 0; - } - return 1; -} - -/* - * send s->init_buf in records of type 'type' (SSL3_RT_HANDSHAKE or - * SSL3_RT_CHANGE_CIPHER_SPEC) - */ -int dtls1_do_write(SSL *s, int type) -{ - int ret; - unsigned int curr_mtu; - int retry = 1; - unsigned int len, frag_off, mac_size, blocksize, used_len; - - if (!dtls1_query_mtu(s)) - return -1; - - OPENSSL_assert(s->d1->mtu >= dtls1_min_mtu(s)); /* should have something - * reasonable now */ - - if (s->init_off == 0 && type == SSL3_RT_HANDSHAKE) - OPENSSL_assert(s->init_num == - (int)s->d1->w_msg_hdr.msg_len + - DTLS1_HM_HEADER_LENGTH); - - if (s->write_hash) { - if (s->enc_write_ctx - && ((EVP_CIPHER_CTX_mode(s->enc_write_ctx) == EVP_CIPH_GCM_MODE) || - (EVP_CIPHER_CTX_mode(s->enc_write_ctx) == EVP_CIPH_CCM_MODE))) - mac_size = 0; - else - mac_size = EVP_MD_CTX_size(s->write_hash); - } else - mac_size = 0; - - if (s->enc_write_ctx && - (EVP_CIPHER_CTX_mode(s->enc_write_ctx) == EVP_CIPH_CBC_MODE)) - blocksize = 2 * EVP_CIPHER_block_size(s->enc_write_ctx->cipher); - else - blocksize = 0; - - frag_off = 0; - /* s->init_num shouldn't ever be < 0...but just in case */ - while (s->init_num > 0) { - used_len = BIO_wpending(SSL_get_wbio(s)) + DTLS1_RT_HEADER_LENGTH - + mac_size + blocksize; - if (s->d1->mtu > used_len) - curr_mtu = s->d1->mtu - used_len; - else - curr_mtu = 0; - - if (curr_mtu <= DTLS1_HM_HEADER_LENGTH) { - /* - * grr.. we could get an error if MTU picked was wrong - */ - ret = BIO_flush(SSL_get_wbio(s)); - if (ret <= 0) - return ret; - used_len = DTLS1_RT_HEADER_LENGTH + mac_size + blocksize; - if (s->d1->mtu > used_len + DTLS1_HM_HEADER_LENGTH) { - curr_mtu = s->d1->mtu - used_len; - } else { - /* Shouldn't happen */ - return -1; - } - } - - /* - * We just checked that s->init_num > 0 so this cast should be safe - */ - if (((unsigned int)s->init_num) > curr_mtu) - len = curr_mtu; - else - len = s->init_num; - - /* Shouldn't ever happen */ - if (len > INT_MAX) - len = INT_MAX; - - /* - * XDTLS: this function is too long. split out the CCS part - */ - if (type == SSL3_RT_HANDSHAKE) { - if (s->init_off != 0) { - OPENSSL_assert(s->init_off > DTLS1_HM_HEADER_LENGTH); - s->init_off -= DTLS1_HM_HEADER_LENGTH; - s->init_num += DTLS1_HM_HEADER_LENGTH; - - /* - * We just checked that s->init_num > 0 so this cast should - * be safe - */ - if (((unsigned int)s->init_num) > curr_mtu) - len = curr_mtu; - else - len = s->init_num; - } - - /* Shouldn't ever happen */ - if (len > INT_MAX) - len = INT_MAX; - - if (len < DTLS1_HM_HEADER_LENGTH) { - /* - * len is so small that we really can't do anything sensible - * so fail - */ - return -1; - } - dtls1_fix_message_header(s, frag_off, - len - DTLS1_HM_HEADER_LENGTH); - - dtls1_write_message_header(s, - (unsigned char *)&s->init_buf-> - data[s->init_off]); - } - - ret = dtls1_write_bytes(s, type, &s->init_buf->data[s->init_off], - len); - if (ret < 0) { - /* - * might need to update MTU here, but we don't know which - * previous packet caused the failure -- so can't really - * retransmit anything. continue as if everything is fine and - * wait for an alert to handle the retransmit - */ - if (retry && BIO_ctrl(SSL_get_wbio(s), - BIO_CTRL_DGRAM_MTU_EXCEEDED, 0, NULL) > 0) { - if (!(SSL_get_options(s) & SSL_OP_NO_QUERY_MTU)) { - if (!dtls1_query_mtu(s)) - return -1; - /* Have one more go */ - retry = 0; - } else - return -1; - } else { - return (-1); - } - } else { - - /* - * bad if this assert fails, only part of the handshake message - * got sent. but why would this happen? - */ - OPENSSL_assert(len == (unsigned int)ret); - - if (type == SSL3_RT_HANDSHAKE && !s->d1->retransmitting) { - /* - * should not be done for 'Hello Request's, but in that case - * we'll ignore the result anyway - */ - unsigned char *p = - (unsigned char *)&s->init_buf->data[s->init_off]; - const struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr; - int xlen; - - if (frag_off == 0 && s->version != DTLS