Skip to content

Commit

Permalink
Make the PACKET/WPACKET code available to both libcrypto and libssl
Browse files Browse the repository at this point in the history
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#9111)
  • Loading branch information
mattcaswell authored and paulidale committed Jul 11, 2019
1 parent 54846b7 commit 0d345f0
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion crypto/build.info
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ SOURCE[../libcrypto]=$UTIL_COMMON \
mem.c mem_sec.c mem_str.c mem_dbg.c \
cversion.c info.c cpt_err.c ebcdic.c uid.c o_time.c o_dir.c \
o_fopen.c getenv.c o_init.c o_fips.c init.c trace.c provider.c \
asn1_dsa.c $UPLINKSRC
asn1_dsa.c packet.c $UPLINKSRC
DEFINE[../libcrypto]=$UTIL_DEFINE $UPLINKDEF
SOURCE[../providers/fips]=$UTIL_COMMON
DEFINE[../providers/fips]=$UTIL_DEFINE
Expand Down
2 changes: 1 addition & 1 deletion ssl/packet.c → crypto/packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

#include "internal/cryptlib.h"
#include "packet_locl.h"
#include "internal/packet.h"
#include <openssl/sslerr.h>

#define DEFAULT_BUF_SIZE 256
Expand Down
File renamed without changes.
6 changes: 5 additions & 1 deletion ssl/build.info
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
LIBS=../libssl
#TODO: For now we just include the libcrypto packet.c in libssl as well. We
# could either continue to do it like this, or export all the WPACKET
# symbols so that libssl can use them like any other. Probably would do
# this privately so it does not become part of the public API.
SOURCE[../libssl]=\
pqueue.c packet.c \
pqueue.c ../crypto/packet.c \
statem/statem_srvr.c statem/statem_clnt.c s3_lib.c s3_enc.c record/rec_layer_s3.c \
statem/statem_lib.c statem/extensions.c statem/extensions_srvr.c \
statem/extensions_clnt.c statem/extensions_cust.c s3_cbc.c s3_msg.c \
Expand Down
2 changes: 1 addition & 1 deletion ssl/record/rec_layer_d1.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <openssl/evp.h>
#include <openssl/buffer.h>
#include "record_locl.h"
#include "../packet_locl.h"
#include "internal/packet.h"
#include "internal/cryptlib.h"

int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl)
Expand Down
2 changes: 1 addition & 1 deletion ssl/record/rec_layer_s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <openssl/buffer.h>
#include <openssl/rand.h>
#include "record_locl.h"
#include "../packet_locl.h"
#include "internal/packet.h"

#if defined(OPENSSL_SMALL_FOOTPRINT) || \
!( defined(AES_ASM) && ( \
Expand Down
2 changes: 1 addition & 1 deletion ssl/ssl_locl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# include <openssl/ct.h>
# include "record/record.h"
# include "statem/statem.h"
# include "packet_locl.h"
# include "internal/packet.h"
# include "internal/dane.h"
# include "internal/refcount.h"
# include "internal/tsan_assist.h"
Expand Down
2 changes: 1 addition & 1 deletion ssl/ssl_rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <stdio.h>
#include "ssl_locl.h"
#include "packet_locl.h"
#include "internal/packet.h"
#include <openssl/bio.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
Expand Down
2 changes: 1 addition & 1 deletion test/asynciotest.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <openssl/bio.h>
#include <openssl/err.h>

#include "../ssl/packet_locl.h"
#include "internal/packet.h"

#include "ssltestlib.h"
#include "testutil.h"
Expand Down
2 changes: 1 addition & 1 deletion test/bad_dtls_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/kdf.h>
#include "../ssl/packet_locl.h"
#include "internal/packet.h"
#include "internal/nelem.h"
#include "testutil.h"

Expand Down
2 changes: 1 addition & 1 deletion test/build.info
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ IF[{- !$disabled{tests} -}]
IF[{- !$disabled{shared} -}]
PROGRAMS{noinst}=tls13secretstest
SOURCE[tls13secretstest]=tls13secretstest.c
SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../ssl/packet.c
SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../crypto/packet.c
INCLUDE[tls13secretstest]=.. ../include ../apps/include
DEPEND[tls13secretstest]=../libcrypto ../libssl libtestutil.a
ENDIF
Expand Down
2 changes: 1 addition & 1 deletion test/clienthellotest.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <openssl/err.h>
#include <time.h>

#include "../ssl/packet_locl.h"
#include "internal/packet.h"

#include "testutil.h"

Expand Down
2 changes: 1 addition & 1 deletion test/packettest.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

#include "../ssl/packet_locl.h"
#include "internal/packet.h"
#include "testutil.h"

#define BUF_LEN 255
Expand Down
2 changes: 1 addition & 1 deletion test/servername_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <openssl/err.h>
#include <time.h>

#include "../ssl/packet_locl.h"
#include "internal/packet.h"

#include "testutil.h"
#include "internal/nelem.h"
Expand Down
2 changes: 1 addition & 1 deletion test/sslbuffertest.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <openssl/bio.h>
#include <openssl/err.h>

#include "../ssl/packet_locl.h"
#include "internal/packet.h"

#include "ssltestlib.h"
#include "testutil.h"
Expand Down
2 changes: 1 addition & 1 deletion test/tls13ccstest.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <string.h>
#include "ssltestlib.h"
#include "testutil.h"
#include "../ssl/packet_locl.h"
#include "internal/packet.h"

static char *cert = NULL;
static char *privkey = NULL;
Expand Down
2 changes: 1 addition & 1 deletion test/wpackettest.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <string.h>
#include <openssl/buffer.h>
#include "../ssl/packet_locl.h"
#include "internal/packet.h"
#include "testutil.h"

static const unsigned char simple1[] = { 0xff };
Expand Down

0 comments on commit 0d345f0

Please sign in to comment.