From 71f437de629735e3f54eb0660e419ccc11f7cb7b Mon Sep 17 00:00:00 2001 From: kinichiro Date: Wed, 12 Jan 2022 20:04:53 +0900 Subject: Follow upstream file changes and fix build - Add asn1_lib.c - Consolidation of ASN.1 code Add asn1_item.c asn1_old.c Remove a_d2i_fp.c a_digest.c a_dup.c a_i2d_fp.c a_sign.c a_verify.c - Merge evp_asn1.c into a_type.c - Merge asn_pack.c into asn1_item.c - Rename tls13_key_share.c to tls_key_share.c - Add bio/bio_local.h dh/dh_local.h ocsp/ocsp_local.h - Add comp/comp_local.h - Add define LIBRESSL_CRYPTO_INTERNAL to regress build --- crypto/CMakeLists.txt | 15 +++++++-------- crypto/Makefile.am | 20 ++++++++++++-------- ssl/CMakeLists.txt | 2 +- ssl/Makefile.am | 2 +- tests/CMakeLists.txt | 5 ++++- tests/Makefile.am | 5 ++++- 6 files changed, 29 insertions(+), 20 deletions(-) diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 196ae4a..4e68731 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -245,11 +245,7 @@ set( aes/aes_ofb.c aes/aes_wrap.c asn1/a_bitstr.c - asn1/a_d2i_fp.c - asn1/a_digest.c - asn1/a_dup.c asn1/a_enum.c - asn1/a_i2d_fp.c asn1/a_int.c asn1/a_mbstr.c asn1/a_object.c @@ -257,7 +253,6 @@ set( asn1/a_pkey.c asn1/a_print.c asn1/a_pubkey.c - asn1/a_sign.c asn1/a_strex.c asn1/a_string.c asn1/a_strnid.c @@ -265,19 +260,19 @@ set( asn1/a_time_tm.c asn1/a_type.c asn1/a_utf8.c - asn1/a_verify.c asn1/ameth_lib.c asn1/asn1_err.c asn1/asn1_gen.c + asn1/asn1_item.c + asn1/asn1_lib.c + asn1/asn1_old.c asn1/asn1_old_lib.c asn1/asn1_par.c asn1/asn1_types.c asn1/asn_mime.c asn1/asn_moid.c - asn1/asn_pack.c asn1/bio_asn1.c asn1/bio_ndef.c - asn1/evp_asn1.c asn1/n_pkey.c asn1/nsseq.c asn1/p5_pbe.c @@ -993,8 +988,10 @@ target_include_directories(crypto_obj PRIVATE . asn1 + bio bn bytestring + dh dsa ec ecdh @@ -1002,6 +999,8 @@ target_include_directories(crypto_obj evp hmac modes + ocsp + rsa x509 ../include/compat PUBLIC diff --git a/crypto/Makefile.am b/crypto/Makefile.am index 42d0dd9..ced4ed8 100644 --- a/crypto/Makefile.am +++ b/crypto/Makefile.am @@ -3,14 +3,19 @@ include $(top_srcdir)/Makefile.am.common AM_CPPFLAGS += -DLIBRESSL_CRYPTO_INTERNAL AM_CPPFLAGS += -I$(top_srcdir)/crypto/asn1 +AM_CPPFLAGS += -I$(top_srcdir)/crypto/bio AM_CPPFLAGS += -I$(top_srcdir)/crypto/bn AM_CPPFLAGS += -I$(top_srcdir)/crypto/bytestring +AM_CPPFLAGS += -I$(top_srcdir)/crypto/dh +AM_CPPFLAGS += -I$(top_srcdir)/crypto/dsa AM_CPPFLAGS += -I$(top_srcdir)/crypto/ec AM_CPPFLAGS += -I$(top_srcdir)/crypto/ecdh AM_CPPFLAGS += -I$(top_srcdir)/crypto/ecdsa AM_CPPFLAGS += -I$(top_srcdir)/crypto/evp AM_CPPFLAGS += -I$(top_srcdir)/crypto/hmac AM_CPPFLAGS += -I$(top_srcdir)/crypto/modes +AM_CPPFLAGS += -I$(top_srcdir)/crypto/ocsp +AM_CPPFLAGS += -I$(top_srcdir)/crypto/rsa AM_CPPFLAGS += -I$(top_srcdir)/crypto/x509 AM_CPPFLAGS += -I$(top_srcdir)/crypto @@ -299,11 +304,7 @@ noinst_HEADERS += aes/aes_locl.h # asn1 libcrypto_la_SOURCES += asn1/a_bitstr.c -libcrypto_la_SOURCES += asn1/a_d2i_fp.c -libcrypto_la_SOURCES += asn1/a_digest.c -libcrypto_la_SOURCES += asn1/a_dup.c libcrypto_la_SOURCES += asn1/a_enum.c -libcrypto_la_SOURCES += asn1/a_i2d_fp.c libcrypto_la_SOURCES += asn1/a_int.c libcrypto_la_SOURCES += asn1/a_mbstr.c libcrypto_la_SOURCES += asn1/a_object.c @@ -311,7 +312,6 @@ libcrypto_la_SOURCES += asn1/a_octet.c libcrypto_la_SOURCES += asn1/a_pkey.c libcrypto_la_SOURCES += asn1/a_print.c libcrypto_la_SOURCES += asn1/a_pubkey.c -libcrypto_la_SOURCES += asn1/a_sign.c libcrypto_la_SOURCES += asn1/a_strex.c libcrypto_la_SOURCES += asn1/a_string.c libcrypto_la_SOURCES += asn1/a_strnid.c @@ -319,19 +319,19 @@ libcrypto_la_SOURCES += asn1/a_time.c libcrypto_la_SOURCES += asn1/a_time_tm.c libcrypto_la_SOURCES += asn1/a_type.c libcrypto_la_SOURCES += asn1/a_utf8.c -libcrypto_la_SOURCES += asn1/a_verify.c libcrypto_la_SOURCES += asn1/ameth_lib.c libcrypto_la_SOURCES += asn1/asn1_err.c libcrypto_la_SOURCES += asn1/asn1_gen.c +libcrypto_la_SOURCES += asn1/asn1_item.c +libcrypto_la_SOURCES += asn1/asn1_lib.c +libcrypto_la_SOURCES += asn1/asn1_old.c libcrypto_la_SOURCES += asn1/asn1_old_lib.c libcrypto_la_SOURCES += asn1/asn1_par.c libcrypto_la_SOURCES += asn1/asn1_types.c libcrypto_la_SOURCES += asn1/asn_mime.c libcrypto_la_SOURCES += asn1/asn_moid.c -libcrypto_la_SOURCES += asn1/asn_pack.c libcrypto_la_SOURCES += asn1/bio_asn1.c libcrypto_la_SOURCES += asn1/bio_ndef.c -libcrypto_la_SOURCES += asn1/evp_asn1.c libcrypto_la_SOURCES += asn1/n_pkey.c libcrypto_la_SOURCES += asn1/nsseq.c libcrypto_la_SOURCES += asn1/p5_pbe.c @@ -408,6 +408,7 @@ endif libcrypto_la_SOURCES += bio/bss_mem.c libcrypto_la_SOURCES += bio/bss_null.c libcrypto_la_SOURCES += bio/bss_sock.c +noinst_HEADERS += bio/bio_local.h # bn libcrypto_la_SOURCES += bn/bn_add.c @@ -501,6 +502,7 @@ libcrypto_la_SOURCES += comp/c_rle.c libcrypto_la_SOURCES += comp/c_zlib.c libcrypto_la_SOURCES += comp/comp_err.c libcrypto_la_SOURCES += comp/comp_lib.c +noinst_HEADERS += comp/comp_local.h # conf libcrypto_la_SOURCES += conf/conf_api.c @@ -569,6 +571,7 @@ libcrypto_la_SOURCES += dh/dh_key.c libcrypto_la_SOURCES += dh/dh_lib.c libcrypto_la_SOURCES += dh/dh_pmeth.c libcrypto_la_SOURCES += dh/dh_prn.c +noinst_HEADERS += dh/dh_local.h # dsa libcrypto_la_SOURCES += dsa/dsa_ameth.c @@ -806,6 +809,7 @@ libcrypto_la_SOURCES += ocsp/ocsp_lib.c libcrypto_la_SOURCES += ocsp/ocsp_prn.c libcrypto_la_SOURCES += ocsp/ocsp_srv.c libcrypto_la_SOURCES += ocsp/ocsp_vfy.c +noinst_HEADERS += ocsp/ocsp_local.h # pem libcrypto_la_SOURCES += pem/pem_all.c diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt index f346274..a20cb04 100644 --- a/ssl/CMakeLists.txt +++ b/ssl/CMakeLists.txt @@ -35,6 +35,7 @@ set( t1_lib.c tls_buffer.c tls_content.c + tls_key_share.c tls12_key_schedule.c tls12_lib.c tls12_record_layer.c @@ -43,7 +44,6 @@ set( tls13_handshake.c tls13_handshake_msg.c tls13_key_schedule.c - tls13_key_share.c tls13_legacy.c tls13_lib.c tls13_record.c diff --git a/ssl/Makefile.am b/ssl/Makefile.am index 6f44e48..227dfdf 100644 --- a/ssl/Makefile.am +++ b/ssl/Makefile.am @@ -72,6 +72,7 @@ libssl_la_SOURCES += t1_enc.c libssl_la_SOURCES += t1_lib.c libssl_la_SOURCES += tls_buffer.c libssl_la_SOURCES += tls_content.c +libssl_la_SOURCES += tls_key_share.c libssl_la_SOURCES += tls12_key_schedule.c libssl_la_SOURCES += tls12_lib.c libssl_la_SOURCES += tls12_record_layer.c @@ -80,7 +81,6 @@ libssl_la_SOURCES += tls13_error.c libssl_la_SOURCES += tls13_handshake.c libssl_la_SOURCES += tls13_handshake_msg.c libssl_la_SOURCES += tls13_key_schedule.c -libssl_la_SOURCES += tls13_key_share.c libssl_la_SOURCES += tls13_legacy.c libssl_la_SOURCES += tls13_lib.c libssl_la_SOURCES += tls13_record.c diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0ddbc74..d4c36cc 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,10 @@ +add_definitions(-DLIBRESSL_CRYPTO_INTERNAL) + include_directories( . - ../crypto/modes ../crypto/asn1 + ../crypto/bio + ../crypto/modes ../crypto/x509 ../ssl ../apps/openssl diff --git a/tests/Makefile.am b/tests/Makefile.am index eb10eec..2737ebb 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,10 @@ include $(top_srcdir)/Makefile.am.common -AM_CPPFLAGS += -I $(top_srcdir)/crypto/modes +AM_CPPFLAGS += -DLIBRESSL_CRYPTO_INTERNAL + AM_CPPFLAGS += -I $(top_srcdir)/crypto/asn1 +AM_CPPFLAGS += -I $(top_srcdir)/crypto/bio +AM_CPPFLAGS += -I $(top_srcdir)/crypto/modes AM_CPPFLAGS += -I $(top_srcdir)/crypto/x509 AM_CPPFLAGS += -I $(top_srcdir)/ssl AM_CPPFLAGS += -I $(top_srcdir)/apps/openssl -- cgit v1.2.3-55-g6feb