Loading ssl/Makefile +6 −6 Original line number Diff line number Diff line Loading @@ -21,11 +21,11 @@ APPS= LIB=$(TOP)/libssl.a SHARED_LIB= libssl$(SHLIB_EXT) LIBSRC= \ s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c s3_cbc.c \ s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c record/s3_pkt.c s3_both.c s3_cbc.c \ s3_msg.c \ s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c s23_pkt.c \ s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c record/s23_pkt.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 d1_pkt.c d1_msg.c \ d1_meth.c d1_srvr.c d1_clnt.c d1_lib.c record/d1_pkt.c d1_msg.c \ d1_both.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 \ Loading @@ -33,11 +33,11 @@ LIBSRC= \ bio_ssl.c ssl_err.c kssl.c t1_reneg.c tls_srp.c t1_trce.c ssl_utst.c \ record/ssl3_buffer.c record/ssl3_record.c LIBOBJ= \ s3_meth.o s3_srvr.o s3_clnt.o s3_lib.o s3_enc.o s3_pkt.o s3_both.o s3_cbc.o \ s3_meth.o s3_srvr.o s3_clnt.o s3_lib.o s3_enc.o record/s3_pkt.o s3_both.o s3_cbc.o \ s3_msg.o \ s23_meth.o s23_srvr.o s23_clnt.o s23_lib.o s23_pkt.o \ s23_meth.o s23_srvr.o s23_clnt.o s23_lib.o record/s23_pkt.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 d1_pkt.o d1_msg.o \ d1_meth.o d1_srvr.o d1_clnt.o d1_lib.o record/d1_pkt.o d1_msg.o \ d1_both.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 \ Loading ssl/d1_pkt.c→ssl/record/d1_pkt.c +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ #include <stdio.h> #include <errno.h> #define USE_SOCKETS #include "ssl_locl.h" #include "../ssl_locl.h" #include <openssl/evp.h> #include <openssl/buffer.h> #include <openssl/pqueue.h> Loading ssl/record/rec_layer.h +37 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,19 @@ #include "../ssl_locl.h" typedef struct dtls1_bitmap_st { unsigned long map; /* track 32 packets on 32-bit systems and 64 * - on 64-bit systems */ unsigned char max_seq_num[8]; /* max record number seen so far, 64-bit * value in big-endian encoding */ } DTLS1_BITMAP; typedef struct record_pqueue_st { unsigned short epoch; pqueue q; } record_pqueue; typedef struct record_layer_st { /* The parent SSL structure */ SSL *s; Loading @@ -136,3 +149,27 @@ typedef struct record_layer_st { #define RECORD_LAYER_get_wbuf(rl) (&(rl)->wbuf) #define RECORD_LAYER_get_rrec(rl) (&(rl)->rrec) #define RECORD_LAYER_get_wrec(rl) (&(rl)->wrec) __owur int ssl23_read_bytes(SSL *s, int n); __owur int ssl23_write_bytes(SSL *s); __owur int ssl3_read_n(SSL *s, int n, int max, int extend); __owur int ssl3_write_bytes(SSL *s, int type, const void *buf, int len); __owur int do_ssl3_write(SSL *s, int type, const unsigned char *buf, unsigned int len, int create_empty_fragment); __owur int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, unsigned int len); __owur int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek); __owur int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek); int dtls1_write_bytes(SSL *s, int type, const void *buf, int len); __owur int do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len, int create_empty_fragement); int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap); void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap); DTLS1_BITMAP *dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr, unsigned int *is_next_epoch); int dtls1_process_buffered_records(SSL *s); int dtls1_retrieve_buffered_record(SSL *s, record_pqueue *queue); int dtls1_buffer_record(SSL *s, record_pqueue *q, unsigned char *priority); void dtls1_reset_seq_numbers(SSL *s, int rw); ssl/s23_pkt.c→ssl/record/s23_pkt.c +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ #include <stdio.h> #include <errno.h> #define USE_SOCKETS #include "ssl_locl.h" #include "../ssl_locl.h" #include <openssl/evp.h> #include <openssl/buffer.h> Loading ssl/s3_pkt.c→ssl/record/s3_pkt.c +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ #include <limits.h> #include <errno.h> #define USE_SOCKETS #include "ssl_locl.h" #include "../ssl_locl.h" #include <openssl/evp.h> #include <openssl/buffer.h> #include <openssl/rand.h> Loading Loading
ssl/Makefile +6 −6 Original line number Diff line number Diff line Loading @@ -21,11 +21,11 @@ APPS= LIB=$(TOP)/libssl.a SHARED_LIB= libssl$(SHLIB_EXT) LIBSRC= \ s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c s3_cbc.c \ s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c record/s3_pkt.c s3_both.c s3_cbc.c \ s3_msg.c \ s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c s23_pkt.c \ s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c record/s23_pkt.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 d1_pkt.c d1_msg.c \ d1_meth.c d1_srvr.c d1_clnt.c d1_lib.c record/d1_pkt.c d1_msg.c \ d1_both.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 \ Loading @@ -33,11 +33,11 @@ LIBSRC= \ bio_ssl.c ssl_err.c kssl.c t1_reneg.c tls_srp.c t1_trce.c ssl_utst.c \ record/ssl3_buffer.c record/ssl3_record.c LIBOBJ= \ s3_meth.o s3_srvr.o s3_clnt.o s3_lib.o s3_enc.o s3_pkt.o s3_both.o s3_cbc.o \ s3_meth.o s3_srvr.o s3_clnt.o s3_lib.o s3_enc.o record/s3_pkt.o s3_both.o s3_cbc.o \ s3_msg.o \ s23_meth.o s23_srvr.o s23_clnt.o s23_lib.o s23_pkt.o \ s23_meth.o s23_srvr.o s23_clnt.o s23_lib.o record/s23_pkt.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 d1_pkt.o d1_msg.o \ d1_meth.o d1_srvr.o d1_clnt.o d1_lib.o record/d1_pkt.o d1_msg.o \ d1_both.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 \ Loading
ssl/d1_pkt.c→ssl/record/d1_pkt.c +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ #include <stdio.h> #include <errno.h> #define USE_SOCKETS #include "ssl_locl.h" #include "../ssl_locl.h" #include <openssl/evp.h> #include <openssl/buffer.h> #include <openssl/pqueue.h> Loading
ssl/record/rec_layer.h +37 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,19 @@ #include "../ssl_locl.h" typedef struct dtls1_bitmap_st { unsigned long map; /* track 32 packets on 32-bit systems and 64 * - on 64-bit systems */ unsigned char max_seq_num[8]; /* max record number seen so far, 64-bit * value in big-endian encoding */ } DTLS1_BITMAP; typedef struct record_pqueue_st { unsigned short epoch; pqueue q; } record_pqueue; typedef struct record_layer_st { /* The parent SSL structure */ SSL *s; Loading @@ -136,3 +149,27 @@ typedef struct record_layer_st { #define RECORD_LAYER_get_wbuf(rl) (&(rl)->wbuf) #define RECORD_LAYER_get_rrec(rl) (&(rl)->rrec) #define RECORD_LAYER_get_wrec(rl) (&(rl)->wrec) __owur int ssl23_read_bytes(SSL *s, int n); __owur int ssl23_write_bytes(SSL *s); __owur int ssl3_read_n(SSL *s, int n, int max, int extend); __owur int ssl3_write_bytes(SSL *s, int type, const void *buf, int len); __owur int do_ssl3_write(SSL *s, int type, const unsigned char *buf, unsigned int len, int create_empty_fragment); __owur int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, unsigned int len); __owur int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek); __owur int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek); int dtls1_write_bytes(SSL *s, int type, const void *buf, int len); __owur int do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len, int create_empty_fragement); int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap); void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap); DTLS1_BITMAP *dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr, unsigned int *is_next_epoch); int dtls1_process_buffered_records(SSL *s); int dtls1_retrieve_buffered_record(SSL *s, record_pqueue *queue); int dtls1_buffer_record(SSL *s, record_pqueue *q, unsigned char *priority); void dtls1_reset_seq_numbers(SSL *s, int rw);
ssl/s23_pkt.c→ssl/record/s23_pkt.c +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ #include <stdio.h> #include <errno.h> #define USE_SOCKETS #include "ssl_locl.h" #include "../ssl_locl.h" #include <openssl/evp.h> #include <openssl/buffer.h> Loading
ssl/s3_pkt.c→ssl/record/s3_pkt.c +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ #include <limits.h> #include <errno.h> #define USE_SOCKETS #include "ssl_locl.h" #include "../ssl_locl.h" #include <openssl/evp.h> #include <openssl/buffer.h> #include <openssl/rand.h> Loading