Skip to content

Commit

Permalink
Lay groundwork for support for mbedtls 2 and 3
Browse files Browse the repository at this point in the history
  • Loading branch information
teusbenschop committed Jul 20, 2024
1 parent 2715378 commit 0d191e9
Show file tree
Hide file tree
Showing 407 changed files with 210 additions and 6,797 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ server
*.tar.gz
configure~
libbibledit.a.*

pkgdata/.*
196 changes: 196 additions & 0 deletions 0readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
Building Bibledit
=================

MbedTLS
=======

The source tree contains two versions of MbedTLS.
* MbedTLS 2.x in folder mbedtls2.
* MbedTLS 3.x in folder mbedtls3.

Switching between the two versions can be done as follows.
1. Define MBEDTLS2 or MBEDTLS3.
2. Put the relevant source code in Makefile.am.
The source code is listed below for both versions.

Version 2 source code:

mbedtls/aes.c \
mbedtls/arc4.c \
mbedtls/asn1parse.c \
mbedtls/asn1write.c \
mbedtls/base64.c \
mbedtls/bignum.c \
mbedtls/blowfish.c \
mbedtls/camellia.c \
mbedtls/ccm.c \
mbedtls/certs.c \
mbedtls/chacha20.c \
mbedtls/chachapoly.c \
mbedtls/cipher.c \
mbedtls/cipher_wrap.c \
mbedtls/ctr_drbg.c \
mbedtls/debug.c \
mbedtls/des.c \
mbedtls/dhm.c \
mbedtls/ecdh.c \
mbedtls/ecdsa.c \
mbedtls/ecp.c \
mbedtls/ecp_curves.c \
mbedtls/entropy.c \
mbedtls/entropy_poll.c \
mbedtls/error.c \
mbedtls/gcm.c \
mbedtls/hmac_drbg.c \
mbedtls/md.c \
mbedtls/md5.c \
mbedtls/md_wrap.c \
mbedtls/net_sockets.c \
mbedtls/oid.c \
mbedtls/pem.c \
mbedtls/pk.c \
mbedtls/pk_wrap.c \
mbedtls/pkcs12.c \
mbedtls/pkcs5.c \
mbedtls/pkparse.c \
mbedtls/pkwrite.c \
mbedtls/platform_util.c \
mbedtls/platform.c \
mbedtls/poly1305.c \
mbedtls/ripemd160.c \
mbedtls/rsa.c \
mbedtls/rsa_internal.c \
mbedtls/sha1.c \
mbedtls/sha256.c \
mbedtls/sha512.c \
mbedtls/ssl_cache.c \
mbedtls/ssl_ciphersuites.c \
mbedtls/ssl_cli.c \
mbedtls/ssl_cookie.c \
mbedtls/ssl_srv.c \
mbedtls/ssl_ticket.c \
mbedtls/ssl_tls.c \
mbedtls/threading.c \
mbedtls/timing.c \
mbedtls/version.c \
mbedtls/version_features.c \
mbedtls/x509.c \
mbedtls/x509_create.c \
mbedtls/x509_crl.c \
mbedtls/x509_crt.c \
mbedtls/x509_csr.c \
mbedtls/x509write_crt.c \
mbedtls/x509write_csr.c \
mbedtls/xtea.c \

Version 3 source code:

mbedtls/aes.c \
mbedtls/aesce.c \
mbedtls/aesni.c \
mbedtls/aria.c \
mbedtls/asn1parse.c \
mbedtls/asn1write.c \
mbedtls/base64.c \
mbedtls/bignum.c \
mbedtls/bignum_core.c \
mbedtls/bignum_mod.c \
mbedtls/bignum_mod_raw.c \
mbedtls/block_cipher.c \
mbedtls/camellia.c \
mbedtls/ccm.c \
mbedtls/chacha20.c \
mbedtls/chachapoly.c \
mbedtls/cipher.c \
mbedtls/cipher_wrap.c \
mbedtls/cmac.c \
mbedtls/constant_time.c \
mbedtls/ctr_drbg.c \
mbedtls/debug.c \
mbedtls/des.c \
mbedtls/dhm.c \
mbedtls/ecdh.c \
mbedtls/ecdsa.c \
mbedtls/ecjpake.c \
mbedtls/ecp.c \
mbedtls/ecp_curves.c \
mbedtls/ecp_curves_new.c \
mbedtls/entropy.c \
mbedtls/entropy_poll.c \
mbedtls/error.c \
mbedtls/gcm.c \
mbedtls/hkdf.c \
mbedtls/hmac_drbg.c \
mbedtls/lmots.c \
mbedtls/lms.c \
mbedtls/md.c \
mbedtls/md5.c \
mbedtls/memory_buffer_alloc.c \
mbedtls/mps_reader.c \
mbedtls/mps_trace.c \
mbedtls/net_sockets.c \
mbedtls/nist_kw.c \
mbedtls/oid.c \
mbedtls/padlock.c \
mbedtls/pem.c \
mbedtls/pk.c \
mbedtls/pk_ecc.c \
mbedtls/pk_wrap.c \
mbedtls/pkcs12.c \
mbedtls/pkcs5.c \
mbedtls/pkcs7.c \
mbedtls/pkparse.c \
mbedtls/pkwrite.c \
mbedtls/platform.c \
mbedtls/platform_util.c \
mbedtls/poly1305.c \
mbedtls/psa_crypto.c \
mbedtls/psa_crypto_aead.c \
mbedtls/psa_crypto_cipher.c \
mbedtls/psa_crypto_client.c \
mbedtls/psa_crypto_driver_wrappers_no_static.c \
mbedtls/psa_crypto_ecp.c \
mbedtls/psa_crypto_ffdh.c \
mbedtls/psa_crypto_hash.c \
mbedtls/psa_crypto_mac.c \
mbedtls/psa_crypto_pake.c \
mbedtls/psa_crypto_rsa.c \
mbedtls/psa_crypto_se.c \
mbedtls/psa_crypto_slot_management.c \
mbedtls/psa_crypto_storage.c \
mbedtls/psa_its_file.c \
mbedtls/psa_util.c \
mbedtls/ripemd160.c \
mbedtls/rsa.c \
mbedtls/rsa_alt_helpers.c \
mbedtls/sha1.c \
mbedtls/sha256.c \
mbedtls/sha3.c \
mbedtls/sha512.c \
mbedtls/ssl_cache.c \
mbedtls/ssl_ciphersuites.c \
mbedtls/ssl_client.c \
mbedtls/ssl_cookie.c \
mbedtls/ssl_debug_helpers_generated.c \
mbedtls/ssl_msg.c \
mbedtls/ssl_ticket.c \
mbedtls/ssl_tls.c \
mbedtls/ssl_tls12_client.c \
mbedtls/ssl_tls12_server.c \
mbedtls/ssl_tls13_client.c \
mbedtls/ssl_tls13_generic.c \
mbedtls/ssl_tls13_keys.c \
mbedtls/ssl_tls13_server.c \
mbedtls/threading.c \
mbedtls/timing.c \
mbedtls/version.c \
mbedtls/version_features.c \
mbedtls/x509.c \
mbedtls/x509_create.c \
mbedtls/x509_crl.c \
mbedtls/x509_crt.c \
mbedtls/x509_csr.c \
mbedtls/x509write.c \
mbedtls/x509write_crt.c \
mbedtls/x509write_csr.c \

7 changes: 5 additions & 2 deletions config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
#define RUN_SECURE_SERVER 1


// Which version of MbedTLS to use.
//#define HAVE_MBEDTLS2 1
#define HAVE_MBEDTLS3 1


#ifdef HAVE_WINDOWS
#undef HAVE_CLOUD
#define HAVE_CLIENT 1
Expand Down Expand Up @@ -95,5 +100,3 @@
#define HAVE_TINY_JOURNAL 1
#undef RUN_SECURE_SERVER
#endif


1 change: 1 addition & 0 deletions mbedtls
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 0d191e9

Please sign in to comment.