mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-25 07:19:02 +00:00
Flatten Mbed TLS directory structure
This commit is contained in:
parent
d0ac995dc0
commit
1beeb7a829
199 changed files with 1184 additions and 944 deletions
examples
third_party/mbedtls
aes.caes.haesni.caesni.harc4.carc4.haria.caria.hasn1.hasn1parse.casn1write.casn1write.hbase64.cbase64.hbignum.cbignum.hblowfish.cblowfish.hbn_mul.hcamellia.ccamellia.hccm.cccm.hcerts.ccerts.hchacha20.cchacha20.hchachapoly.cchachapoly.hcheck_config.hcheck_crypto_config.hcipher.ccipher.hcipher_internal.hcipher_wrap.ccmac.ccmac.hcommon.hcompat-1.3.hconfig.hconfig_psa.hcrypto.hcrypto_compat.hcrypto_config.hcrypto_driver_common.hcrypto_extra.hcrypto_platform.hcrypto_se_driver.hcrypto_sizes.hcrypto_struct.hcrypto_types.hcrypto_values.hctr_drbg.cctr_drbg.hdebug.cdebug.hdes.cdes.hdhm.cdhm.hecdh.cecdh.hecdsa.cecdsa.hecjpake.cecjpake.hecp.cecp.hecp_curves.cecp_internal.hentropy.centropy.hentropy_poll.centropy_poll.herror.cerror.hgcm.cgcm.hhavege.chavege.hhkdf.chkdf.hhmac_drbg.chmac_drbg.hmbedtls.mkmd.cmd.hmd2.cmd2.hmd4.cmd4.hmd5.cmd5.hmd_internal.hmemory_buffer_alloc.cmemory_buffer_alloc.hnet.hnet_sockets.cnet_sockets.h
|
@ -10,16 +10,16 @@
|
|||
#include "libc/log/check.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/ctr_drbg.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/dhm.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/entropy.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/net_sockets.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/pk.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/ssl.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/ssl_cache.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/x509_crt.h"
|
||||
#include "third_party/mbedtls/ctr_drbg.h"
|
||||
#include "third_party/mbedtls/dhm.h"
|
||||
#include "third_party/mbedtls/entropy.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/net_sockets.h"
|
||||
#include "third_party/mbedtls/pk.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/ssl.h"
|
||||
#include "third_party/mbedtls/ssl_cache.h"
|
||||
#include "third_party/mbedtls/x509_crt.h"
|
||||
|
||||
#define R(e) \
|
||||
if ((r = e)) goto Die
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* FIPS-197 compliant AES implementation
|
||||
*
|
||||
|
@ -17,6 +23,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The AES block cipher was designed by Vincent Rijmen and Joan Daemen.
|
||||
*
|
||||
|
@ -25,25 +32,25 @@
|
|||
*/
|
||||
|
||||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_AES_C)
|
||||
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/aes.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/aes.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
#if defined(MBEDTLS_PADLOCK_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/padlock.h"
|
||||
#include "third_party/mbedtls/padlock.h"
|
||||
#endif
|
||||
#if defined(MBEDTLS_AESNI_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/aesni.h"
|
||||
#include "third_party/mbedtls/aesni.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -43,7 +43,7 @@
|
|||
#define MBEDTLS_AES_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
@ -111,7 +111,7 @@ typedef struct mbedtls_aes_xts_context
|
|||
#endif /* MBEDTLS_CIPHER_MODE_XTS */
|
||||
|
||||
#else /* MBEDTLS_AES_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/aes_alt.h" */
|
||||
/* #include "third_party/mbedtls/aes_alt.h" */
|
||||
#endif /* MBEDTLS_AES_ALT */
|
||||
|
||||
/**
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* AES-NI support functions
|
||||
*
|
||||
|
@ -25,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_AESNI_C)
|
||||
|
||||
|
@ -35,7 +40,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/aesni.h"
|
||||
#include "third_party/mbedtls/aesni.h"
|
||||
|
||||
|
||||
#ifndef asm
|
|
@ -28,12 +28,12 @@
|
|||
#define MBEDTLS_AESNI_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/aes.h"
|
||||
#include "third_party/mbedtls/aes.h"
|
||||
|
||||
#define MBEDTLS_AESNI_AES 0x02000000u
|
||||
#define MBEDTLS_AESNI_CLMUL 0x00000002u
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* An implementation of the ARCFOUR algorithm
|
||||
*
|
||||
|
@ -18,6 +23,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The ARCFOUR algorithm was publicly disclosed on 94/09.
|
||||
*
|
||||
|
@ -25,16 +31,16 @@
|
|||
*/
|
||||
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_ARC4_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/arc4.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/arc4.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -29,7 +29,7 @@
|
|||
#define MBEDTLS_ARC4_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
@ -62,7 +62,7 @@ typedef struct mbedtls_arc4_context
|
|||
mbedtls_arc4_context;
|
||||
|
||||
#else /* MBEDTLS_ARC4_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/arc4_alt.h" */
|
||||
/* #include "third_party/mbedtls/arc4_alt.h" */
|
||||
#endif /* MBEDTLS_ARC4_ALT */
|
||||
|
||||
/**
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* ARIA implementation
|
||||
*
|
||||
|
@ -25,16 +30,16 @@
|
|||
* [2] https://tools.ietf.org/html/rfc5794
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_ARIA_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/aria.h"
|
||||
#include "third_party/mbedtls/aria.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
||||
|
@ -42,7 +47,7 @@
|
|||
|
||||
#if !defined(MBEDTLS_ARIA_ALT)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
|
||||
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||
!defined(inline) && !defined(__cplusplus)
|
|
@ -32,13 +32,13 @@
|
|||
#define MBEDTLS_ARIA_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
|
||||
#define MBEDTLS_ARIA_ENCRYPT 1 /**< ARIA encryption. */
|
||||
#define MBEDTLS_ARIA_DECRYPT 0 /**< ARIA decryption. */
|
||||
|
@ -81,7 +81,7 @@ typedef struct mbedtls_aria_context
|
|||
mbedtls_aria_context;
|
||||
|
||||
#else /* MBEDTLS_ARIA_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/aria_alt.h" */
|
||||
/* #include "third_party/mbedtls/aria_alt.h" */
|
||||
#endif /* MBEDTLS_ARIA_ALT */
|
||||
|
||||
/**
|
|
@ -24,14 +24,14 @@
|
|||
#define MBEDTLS_ASN1_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(MBEDTLS_BIGNUM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#endif
|
||||
|
||||
/**
|
|
@ -1,5 +1,4 @@
|
|||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* Generic ASN.1 parsing
|
||||
*
|
||||
|
@ -18,22 +17,26 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
#if defined(MBEDTLS_ASN1_PARSE_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/asn1.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/asn1.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_BIGNUM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_calloc calloc
|
||||
#define mbedtls_free free
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* ASN.1 buffer writing functionality
|
||||
*
|
||||
|
@ -19,16 +24,16 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_ASN1_WRITE_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/asn1write.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/asn1write.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_calloc calloc
|
||||
#define mbedtls_free free
|
|
@ -25,12 +25,12 @@
|
|||
#define MBEDTLS_ASN1_WRITE_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/asn1.h"
|
||||
#include "third_party/mbedtls/asn1.h"
|
||||
|
||||
#define MBEDTLS_ASN1_CHK_ADD(g, f) \
|
||||
do \
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* RFC 1521 base64 encoding/decoding
|
||||
*
|
||||
|
@ -19,16 +24,16 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_BASE64_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/base64.h"
|
||||
#include "third_party/mbedtls/base64.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -25,7 +25,7 @@
|
|||
#define MBEDTLS_BASE64_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
|
@ -35,18 +35,18 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_BIGNUM_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/bn_mul.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/bn_mul.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#define mbedtls_calloc calloc
|
|
@ -25,7 +25,7 @@
|
|||
#include "libc/stdio/stdio.h"
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Blowfish implementation
|
||||
*
|
||||
|
@ -26,12 +31,12 @@
|
|||
*/
|
||||
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_BLOWFISH_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/blowfish.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/blowfish.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
|
||||
|
||||
#if !defined(MBEDTLS_BLOWFISH_ALT)
|
|
@ -25,13 +25,13 @@
|
|||
#define MBEDTLS_BLOWFISH_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
|
||||
#define MBEDTLS_BLOWFISH_ENCRYPT 1
|
||||
#define MBEDTLS_BLOWFISH_DECRYPT 0
|
||||
|
@ -70,7 +70,7 @@ typedef struct mbedtls_blowfish_context
|
|||
mbedtls_blowfish_context;
|
||||
|
||||
#else /* MBEDTLS_BLOWFISH_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/blowfish_alt.h" */
|
||||
/* #include "third_party/mbedtls/blowfish_alt.h" */
|
||||
#endif /* MBEDTLS_BLOWFISH_ALT */
|
||||
|
||||
/**
|
|
@ -39,12 +39,12 @@
|
|||
#define MBEDTLS_BN_MUL_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
|
||||
#if defined(MBEDTLS_HAVE_ASM)
|
||||
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Camellia implementation
|
||||
*
|
||||
|
@ -25,17 +30,17 @@
|
|||
* http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/01espec.pdf
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_CAMELLIA_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/camellia.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/camellia.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -25,13 +25,13 @@
|
|||
#define MBEDTLS_CAMELLIA_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
|
||||
#define MBEDTLS_CAMELLIA_ENCRYPT 1
|
||||
#define MBEDTLS_CAMELLIA_DECRYPT 0
|
||||
|
@ -66,7 +66,7 @@ typedef struct mbedtls_camellia_context
|
|||
mbedtls_camellia_context;
|
||||
|
||||
#else /* MBEDTLS_CAMELLIA_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/camellia_alt.h" */
|
||||
/* #include "third_party/mbedtls/camellia_alt.h" */
|
||||
#endif /* MBEDTLS_CAMELLIA_ALT */
|
||||
|
||||
/**
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* NIST SP800-38C compliant CCM implementation
|
||||
*
|
||||
|
@ -28,17 +33,17 @@
|
|||
* RFC 5116 "An Interface and Algorithms for Authenticated Encryption"
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_CCM_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ccm.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/ccm.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -50,12 +50,12 @@
|
|||
#define MBEDTLS_CCM_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/cipher.h"
|
||||
#include "third_party/mbedtls/cipher.h"
|
||||
|
||||
#define MBEDTLS_ERR_CCM_BAD_INPUT -0x000D /**< Bad input parameters to the function. */
|
||||
#define MBEDTLS_ERR_CCM_AUTH_FAILED -0x000F /**< Authenticated decryption failed. */
|
||||
|
@ -82,7 +82,7 @@ typedef struct mbedtls_ccm_context
|
|||
mbedtls_ccm_context;
|
||||
|
||||
#else /* MBEDTLS_CCM_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/ccm_alt.h" */
|
||||
/* #include "third_party/mbedtls/ccm_alt.h" */
|
||||
#endif /* MBEDTLS_CCM_ALT */
|
||||
|
||||
/**
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* X.509 test certificates
|
||||
*
|
||||
|
@ -19,9 +24,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/certs.h"
|
||||
#include "third_party/mbedtls/certs.h"
|
||||
|
||||
#if defined(MBEDTLS_CERTS_C)
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
#define MBEDTLS_CERTS_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/**
|
||||
* \file chacha20.c
|
||||
*
|
||||
|
@ -23,18 +28,18 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_CHACHA20_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/chacha20.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/chacha20.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -35,7 +35,7 @@
|
|||
#define MBEDTLS_CHACHA20_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
@ -66,7 +66,7 @@ typedef struct mbedtls_chacha20_context
|
|||
mbedtls_chacha20_context;
|
||||
|
||||
#else /* MBEDTLS_CHACHA20_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/chacha20_alt.h" */
|
||||
/* #include "third_party/mbedtls/chacha20_alt.h" */
|
||||
#endif /* MBEDTLS_CHACHA20_ALT */
|
||||
|
||||
/**
|
|
@ -20,18 +20,18 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_CHACHAPOLY_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/chachapoly.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/chachapoly.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -35,13 +35,13 @@
|
|||
#define MBEDTLS_CHACHAPOLY_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
/* for shared error codes */
|
||||
#include "third_party/mbedtls/include/mbedtls/poly1305.h"
|
||||
#include "third_party/mbedtls/poly1305.h"
|
||||
|
||||
#define MBEDTLS_ERR_CHACHAPOLY_BAD_STATE -0x0054 /**< The requested operation is not permitted in the current state. */
|
||||
#define MBEDTLS_ERR_CHACHAPOLY_AUTH_FAILED -0x0056 /**< Authenticated decryption failed: data was not authentic. */
|
||||
|
@ -59,7 +59,7 @@ mbedtls_chachapoly_mode_t;
|
|||
|
||||
#if !defined(MBEDTLS_CHACHAPOLY_ALT)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/chacha20.h"
|
||||
#include "third_party/mbedtls/chacha20.h"
|
||||
|
||||
typedef struct mbedtls_chachapoly_context
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ typedef struct mbedtls_chachapoly_context
|
|||
mbedtls_chachapoly_context;
|
||||
|
||||
#else /* !MBEDTLS_CHACHAPOLY_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/chachapoly_alt.h" */
|
||||
/* #include "third_party/mbedtls/chachapoly_alt.h" */
|
||||
#endif /* !MBEDTLS_CHACHAPOLY_ALT */
|
||||
|
||||
/**
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/**
|
||||
* \file cipher.c
|
||||
*
|
||||
|
@ -23,48 +28,48 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_CIPHER_C)
|
||||
|
||||
#include "third_party/mbedtls/include/psa/sheesh.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/cipher.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/cipher_internal.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/sheesh.h"
|
||||
#include "third_party/mbedtls/cipher.h"
|
||||
#include "third_party/mbedtls/cipher_internal.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_CHACHAPOLY_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/chachapoly.h"
|
||||
#include "third_party/mbedtls/chachapoly.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_GCM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/gcm.h"
|
||||
#include "third_party/mbedtls/gcm.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CCM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/ccm.h"
|
||||
#include "third_party/mbedtls/ccm.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CHACHA20_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/chacha20.h"
|
||||
#include "third_party/mbedtls/chacha20.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CMAC_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/cmac.h"
|
||||
#include "third_party/mbedtls/cmac.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#include "third_party/mbedtls/include/psa/crypto.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/psa_util.h"
|
||||
#include "third_party/mbedtls/crypto.h"
|
||||
#include "third_party/mbedtls/psa_util.h"
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
|
||||
#if defined(MBEDTLS_NIST_KW_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/nist_kw.h"
|
||||
#include "third_party/mbedtls/nist_kw.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_calloc calloc
|
||||
#define mbedtls_free free
|
|
@ -30,12 +30,12 @@
|
|||
#define MBEDTLS_CIPHER_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
|
||||
#if defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) || defined(MBEDTLS_CHACHAPOLY_C)
|
||||
#define MBEDTLS_CIPHER_MODE_AEAD
|
|
@ -27,15 +27,15 @@
|
|||
#define MBEDTLS_CIPHER_WRAP_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/cipher.h"
|
||||
#include "third_party/mbedtls/cipher.h"
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#include "third_party/mbedtls/include/psa/crypto.h"
|
||||
#include "third_party/mbedtls/crypto.h"
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
|
||||
#ifdef __cplusplus
|
|
@ -23,62 +23,62 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_CIPHER_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/cipher_internal.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/cipher_internal.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
#if defined(MBEDTLS_CHACHAPOLY_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/chachapoly.h"
|
||||
#include "third_party/mbedtls/chachapoly.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_AES_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/aes.h"
|
||||
#include "third_party/mbedtls/aes.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ARC4_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/arc4.h"
|
||||
#include "third_party/mbedtls/arc4.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CAMELLIA_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/camellia.h"
|
||||
#include "third_party/mbedtls/camellia.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ARIA_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/aria.h"
|
||||
#include "third_party/mbedtls/aria.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_DES_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/des.h"
|
||||
#include "third_party/mbedtls/des.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_BLOWFISH_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/blowfish.h"
|
||||
#include "third_party/mbedtls/blowfish.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CHACHA20_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/chacha20.h"
|
||||
#include "third_party/mbedtls/chacha20.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_GCM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/gcm.h"
|
||||
#include "third_party/mbedtls/gcm.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CCM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/ccm.h"
|
||||
#include "third_party/mbedtls/ccm.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_NIST_KW_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/nist_kw.h"
|
||||
#include "third_party/mbedtls/nist_kw.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CIPHER_NULL_CIPHER)
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_calloc calloc
|
||||
#define mbedtls_free free
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/**
|
||||
* \file cmac.c
|
||||
*
|
||||
|
@ -40,14 +45,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_CMAC_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/cmac.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/cmac.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
|
||||
|
||||
#if !defined(MBEDTLS_CMAC_ALT) || defined(MBEDTLS_SELF_TEST)
|
|
@ -29,12 +29,12 @@
|
|||
#define MBEDTLS_CMAC_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/cipher.h"
|
||||
#include "third_party/mbedtls/cipher.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -71,7 +71,7 @@ struct mbedtls_cmac_context_t
|
|||
};
|
||||
|
||||
#else /* !MBEDTLS_CMAC_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/cmac_alt.h" */
|
||||
/* #include "third_party/mbedtls/cmac_alt.h" */
|
||||
#endif /* !MBEDTLS_CMAC_ALT */
|
||||
|
||||
/**
|
|
@ -28,7 +28,7 @@
|
|||
#if defined(MBEDTLS_CONFIG_FILE)
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#else
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#endif
|
||||
|
||||
/** Helper to define a function as static except when building invasive tests.
|
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
|
@ -3958,9 +3958,9 @@
|
|||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_CONFIG)
|
||||
#include "third_party/mbedtls/include/mbedtls/config_psa.h"
|
||||
#include "third_party/mbedtls/config_psa.h"
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/check_config.h"
|
||||
#include "third_party/mbedtls/check_config.h"
|
||||
|
||||
#endif /* MBEDTLS_CONFIG_H */
|
|
@ -33,7 +33,7 @@
|
|||
#define MBEDTLS_CONFIG_PSA_H
|
||||
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_CONFIG)
|
||||
#include "third_party/mbedtls/include/psa/crypto_config.h"
|
||||
#include "third_party/mbedtls/crypto_config.h"
|
||||
#endif /* defined(MBEDTLS_PSA_CRYPTO_CONFIG) */
|
||||
|
||||
#ifdef __cplusplus
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
#ifndef PSA_CRYPTO_H
|
||||
#define PSA_CRYPTO_H
|
||||
#include "third_party/mbedtls/include/psa/crypto_platform.h"
|
||||
#include "third_party/mbedtls/crypto_platform.h"
|
||||
|
||||
#ifdef __DOXYGEN_ONLY__
|
||||
/* This __DOXYGEN_ONLY__ block contains mock definitions for things that
|
||||
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
|
||||
/* The file "crypto_types.h" declares types that encode errors,
|
||||
* algorithms, key types, policies, etc. */
|
||||
#include "third_party/mbedtls/include/psa/crypto_types.h"
|
||||
#include "third_party/mbedtls/crypto_types.h"
|
||||
|
||||
/** \defgroup version API version
|
||||
* @{
|
||||
|
@ -62,7 +62,7 @@ extern "C" {
|
|||
|
||||
/* The file "crypto_values.h" declares macros to build and analyze values
|
||||
* of integral types defined in "crypto_types.h". */
|
||||
#include "third_party/mbedtls/include/psa/crypto_values.h"
|
||||
#include "third_party/mbedtls/crypto_values.h"
|
||||
|
||||
/** \defgroup initialization Library initialization
|
||||
* @{
|
||||
|
@ -3761,14 +3761,14 @@ psa_status_t psa_generate_key(const psa_key_attributes_t *attributes,
|
|||
|
||||
/* The file "crypto_sizes.h" contains definitions for size calculation
|
||||
* macros whose definitions are implementation-specific. */
|
||||
#include "third_party/mbedtls/include/psa/crypto_sizes.h"
|
||||
#include "third_party/mbedtls/crypto_sizes.h"
|
||||
|
||||
/* The file "crypto_struct.h" contains definitions for
|
||||
* implementation-specific structs that are declared above. */
|
||||
#include "third_party/mbedtls/include/psa/crypto_struct.h"
|
||||
#include "third_party/mbedtls/crypto_struct.h"
|
||||
|
||||
/* The file "crypto_extra.h" contains vendor-specific definitions. This
|
||||
* can include vendor-defined algorithms, extra functions, etc. */
|
||||
#include "third_party/mbedtls/include/psa/crypto_extra.h"
|
||||
#include "third_party/mbedtls/crypto_extra.h"
|
||||
|
||||
#endif /* PSA_CRYPTO_H */
|
|
@ -29,8 +29,8 @@
|
|||
*/
|
||||
#ifndef PSA_CRYPTO_COMPAT_H
|
||||
#define PSA_CRYPTO_COMPAT_H
|
||||
#include "third_party/mbedtls/include/psa/crypto_values.h"
|
||||
#include "third_party/mbedtls/include/psa/crypto_types.h"
|
||||
#include "third_party/mbedtls/crypto_values.h"
|
||||
#include "third_party/mbedtls/crypto_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
|
@ -39,8 +39,8 @@
|
|||
/* Include type definitions (psa_status_t, psa_algorithm_t,
|
||||
* psa_key_type_t, etc.) and macros to build and analyze values
|
||||
* of these types. */
|
||||
#include "third_party/mbedtls/include/psa/crypto_types.h"
|
||||
#include "third_party/mbedtls/include/psa/crypto_values.h"
|
||||
#include "third_party/mbedtls/crypto_types.h"
|
||||
#include "third_party/mbedtls/crypto_values.h"
|
||||
|
||||
/** For encrypt-decrypt functions, whether the operation is an encryption
|
||||
* or a decryption. */
|
|
@ -26,10 +26,10 @@
|
|||
*/
|
||||
#ifndef PSA_CRYPTO_EXTRA_H
|
||||
#define PSA_CRYPTO_EXTRA_H
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/psa/crypto_compat.h"
|
||||
#include "third_party/mbedtls/include/psa/crypto_struct.h"
|
||||
#include "third_party/mbedtls/include/psa/crypto_types.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/crypto_compat.h"
|
||||
#include "third_party/mbedtls/crypto_struct.h"
|
||||
#include "third_party/mbedtls/crypto_types.h"
|
||||
/* clang-format off */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -568,7 +568,7 @@ psa_status_t psa_get_key_domain_parameters(
|
|||
*/
|
||||
|
||||
#if defined(MBEDTLS_ECP_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
|
||||
/** Convert an ECC curve identifier from the Mbed TLS encoding to PSA.
|
||||
*
|
|
@ -33,8 +33,8 @@
|
|||
*/
|
||||
#ifndef PSA_CRYPTO_PLATFORM_H
|
||||
#define PSA_CRYPTO_PLATFORM_H
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/config_psa.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config_psa.h"
|
||||
|
||||
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||
!defined(inline) && !defined(__cplusplus)
|
|
@ -36,7 +36,7 @@
|
|||
#ifndef PSA_CRYPTO_SE_DRIVER_H
|
||||
#define PSA_CRYPTO_SE_DRIVER_H
|
||||
|
||||
#include "third_party/mbedtls/include/psa/crypto_driver_common.h"
|
||||
#include "third_party/mbedtls/crypto_driver_common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
|
@ -45,7 +45,7 @@
|
|||
/* Include the Mbed TLS configuration file, the way Mbed TLS does it
|
||||
* in each of its header files. */
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
|
@ -51,21 +51,21 @@
|
|||
*/
|
||||
#ifndef PSA_CRYPTO_STRUCT_H
|
||||
#define PSA_CRYPTO_STRUCT_H
|
||||
#include "third_party/mbedtls/include/mbedtls/cipher.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/cmac.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/gcm.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/md.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/md2.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/md4.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/md5.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/ripemd160.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/sha1.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/sha256.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/sha512.h"
|
||||
#include "third_party/mbedtls/include/psa/crypto_sizes.h"
|
||||
#include "third_party/mbedtls/include/psa/crypto_types.h"
|
||||
#include "third_party/mbedtls/include/psa/crypto_values.h"
|
||||
#include "third_party/mbedtls/cipher.h"
|
||||
#include "third_party/mbedtls/cmac.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/gcm.h"
|
||||
#include "third_party/mbedtls/md.h"
|
||||
#include "third_party/mbedtls/md2.h"
|
||||
#include "third_party/mbedtls/md4.h"
|
||||
#include "third_party/mbedtls/md5.h"
|
||||
#include "third_party/mbedtls/ripemd160.h"
|
||||
#include "third_party/mbedtls/sha1.h"
|
||||
#include "third_party/mbedtls/sha256.h"
|
||||
#include "third_party/mbedtls/sha512.h"
|
||||
#include "third_party/mbedtls/crypto_sizes.h"
|
||||
#include "third_party/mbedtls/crypto_types.h"
|
||||
#include "third_party/mbedtls/crypto_values.h"
|
||||
/* clang-format off */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
#ifndef PSA_CRYPTO_TYPES_H
|
||||
#define PSA_CRYPTO_TYPES_H
|
||||
#include "third_party/mbedtls/include/psa/crypto_platform.h"
|
||||
#include "third_party/mbedtls/crypto_platform.h"
|
||||
|
||||
/* If MBEDTLS_PSA_CRYPTO_C is defined, make sure MBEDTLS_PSA_CRYPTO_CLIENT
|
||||
* is defined as well to include all PSA code.
|
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
#ifndef PSA_CRYPTO_VALUES_H
|
||||
#define PSA_CRYPTO_VALUES_H
|
||||
#include "third_party/mbedtls/include/psa/crypto_types.h"
|
||||
#include "third_party/mbedtls/crypto_types.h"
|
||||
|
||||
/** \defgroup error Error codes
|
||||
* @{
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* CTR_DRBG implementation based on AES-256 (NIST SP 800-90)
|
||||
*
|
||||
|
@ -26,17 +31,17 @@
|
|||
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_CTR_DRBG_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ctr_drbg.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/ctr_drbg.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -44,15 +44,15 @@
|
|||
#define MBEDTLS_CTR_DRBG_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/aes.h"
|
||||
#include "third_party/mbedtls/aes.h"
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/threading.h"
|
||||
#include "third_party/mbedtls/threading.h"
|
||||
#endif
|
||||
|
||||
#define MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED -0x0034 /**< The entropy source failed. */
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Debugging routines
|
||||
*
|
||||
|
@ -19,12 +24,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_DEBUG_C)
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_calloc calloc
|
||||
#define mbedtls_free free
|
||||
|
@ -33,8 +38,8 @@
|
|||
#define mbedtls_vsnprintf vsnprintf
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/debug.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/debug.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||
!defined(inline) && !defined(__cplusplus)
|
|
@ -25,15 +25,15 @@
|
|||
#define MBEDTLS_DEBUG_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ssl.h"
|
||||
#include "third_party/mbedtls/ssl.h"
|
||||
|
||||
#if defined(MBEDTLS_ECP_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_DEBUG_C)
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* FIPS-46-3 compliant Triple-DES implementation
|
||||
*
|
||||
|
@ -25,16 +30,16 @@
|
|||
* http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_DES_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/des.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/des.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -30,7 +30,7 @@
|
|||
#define MBEDTLS_DES_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
@ -77,7 +77,7 @@ typedef struct mbedtls_des3_context
|
|||
mbedtls_des3_context;
|
||||
|
||||
#else /* MBEDTLS_DES_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/des_alt.h" */
|
||||
/* #include "third_party/mbedtls/des_alt.h" */
|
||||
#endif /* MBEDTLS_DES_ALT */
|
||||
|
||||
/**
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Diffie-Hellman-Merkle key exchange
|
||||
*
|
||||
|
@ -18,6 +23,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following sources were referenced in the design of this implementation
|
||||
* of the Diffie-Hellman-Merkle algorithm:
|
||||
|
@ -28,25 +34,25 @@
|
|||
*/
|
||||
|
||||
#include "libc/calls/calls.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_DHM_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/dhm.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/dhm.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_PEM_PARSE_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/pem.h"
|
||||
#include "third_party/mbedtls/pem.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ASN1_PARSE_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/asn1.h"
|
||||
#include "third_party/mbedtls/asn1.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#define mbedtls_calloc calloc
|
|
@ -66,11 +66,11 @@
|
|||
#define MBEDTLS_DHM_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
#include "third_party/mbedtls/include/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
|
||||
/*
|
||||
* DHM Error codes
|
||||
|
@ -116,7 +116,7 @@ typedef struct mbedtls_dhm_context
|
|||
mbedtls_dhm_context;
|
||||
|
||||
#else /* MBEDTLS_DHM_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/dhm_alt.h" */
|
||||
/* #include "third_party/mbedtls/dhm_alt.h" */
|
||||
#endif /* MBEDTLS_DHM_ALT */
|
||||
|
||||
/**
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Elliptic curve Diffie-Hellman
|
||||
*
|
||||
|
@ -26,13 +31,13 @@
|
|||
* RFC 4492
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_ECDH_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ecdh.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/ecdh.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
/* Parameter validation macros based on platform_util.h */
|
|
@ -35,12 +35,12 @@
|
|||
#define MBEDTLS_ECDH_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
|
||||
#if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)
|
||||
#undef MBEDTLS_ECDH_LEGACY_CONTEXT
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Elliptic curve DSA
|
||||
*
|
||||
|
@ -25,27 +30,27 @@
|
|||
* SEC1 http://www.secg.org/index.php?action=secg,docs_secg
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_ECDSA_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ecdsa.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/asn1write.h"
|
||||
#include "third_party/mbedtls/ecdsa.h"
|
||||
#include "third_party/mbedtls/asn1write.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
|
||||
#include "third_party/mbedtls/include/mbedtls/hmac_drbg.h"
|
||||
#include "third_party/mbedtls/hmac_drbg.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_calloc calloc
|
||||
#define mbedtls_free free
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
/* Parameter validation macros based on platform_util.h */
|
||||
#define ECDSA_VALIDATE_RET( cond ) \
|
|
@ -33,13 +33,13 @@
|
|||
#define MBEDTLS_ECDSA_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/md.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/md.h"
|
||||
|
||||
/**
|
||||
* \brief Maximum ECDSA signature size for a given curve bit size
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Elliptic curve J-PAKE
|
||||
*
|
||||
|
@ -24,13 +29,13 @@
|
|||
* available to members of the Thread Group http://threadgroup.org/
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_ECJPAKE_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ecjpake.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/ecjpake.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if !defined(MBEDTLS_ECJPAKE_ALT)
|
||||
|
@ -801,7 +806,7 @@ cleanup:
|
|||
#if defined(MBEDTLS_SELF_TEST)
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif
|
|
@ -41,13 +41,13 @@
|
|||
* also be use outside TLS.
|
||||
*/
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/md.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/md.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -93,7 +93,7 @@ typedef struct mbedtls_ecjpake_context
|
|||
} mbedtls_ecjpake_context;
|
||||
|
||||
#else /* MBEDTLS_ECJPAKE_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/ecjpake_alt.h" */
|
||||
/* #include "third_party/mbedtls/ecjpake_alt.h" */
|
||||
#endif /* MBEDTLS_ECJPAKE_ALT */
|
||||
|
||||
/**
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Elliptic curves over GF(p): generic functions
|
||||
*
|
||||
|
@ -41,7 +46,7 @@
|
|||
* <http://eprint.iacr.org/2004/342.pdf>
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
/**
|
||||
* \brief Function level alternative implementation.
|
||||
|
@ -74,10 +79,10 @@
|
|||
|
||||
#if defined(MBEDTLS_ECP_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/threading.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/threading.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if !defined(MBEDTLS_ECP_ALT)
|
||||
|
@ -89,20 +94,20 @@
|
|||
MBEDTLS_INTERNAL_VALIDATE( cond )
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#define mbedtls_calloc calloc
|
||||
#define mbedtls_free free
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ecp_internal.h"
|
||||
#include "third_party/mbedtls/ecp_internal.h"
|
||||
|
||||
#if !defined(MBEDTLS_ECP_NO_INTERNAL_RNG)
|
||||
#if defined(MBEDTLS_HMAC_DRBG_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/hmac_drbg.h"
|
||||
#include "third_party/mbedtls/hmac_drbg.h"
|
||||
#elif defined(MBEDTLS_CTR_DRBG_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/ctr_drbg.h"
|
||||
#include "third_party/mbedtls/ctr_drbg.h"
|
||||
#else
|
||||
#error "Invalid configuration detected. Include check_config.h to ensure that the configuration is valid."
|
||||
#endif
|
|
@ -37,12 +37,12 @@
|
|||
#define MBEDTLS_ECP_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
|
||||
/*
|
||||
* ECP error codes
|
||||
|
@ -298,7 +298,7 @@ mbedtls_ecp_group;
|
|||
/* \} name SECTION: Module settings */
|
||||
|
||||
#else /* MBEDTLS_ECP_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/ecp_alt.h" */
|
||||
/* #include "third_party/mbedtls/ecp_alt.h" */
|
||||
#endif /* MBEDTLS_ECP_ALT */
|
||||
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE)
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Elliptic curves over GF(p): curve-specific data and functions
|
||||
*
|
||||
|
@ -19,13 +24,13 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_ECP_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if !defined(MBEDTLS_ECP_ALT)
|
|
@ -62,7 +62,7 @@
|
|||
#define MBEDTLS_ECP_INTERNAL_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Entropy accumulator implementation
|
||||
*
|
||||
|
@ -21,7 +26,7 @@
|
|||
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_ENTROPY_C)
|
||||
|
||||
|
@ -31,29 +36,29 @@
|
|||
#warning "**** THIS BUILD IS *NOT* SUITABLE FOR PRODUCTION USE "
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/entropy.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/entropy_poll.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/entropy.h"
|
||||
#include "third_party/mbedtls/entropy_poll.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_FS_IO)
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ENTROPY_NV_SEED)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
||||
#endif /* MBEDTLS_SELF_TEST */
|
||||
|
||||
#if defined(MBEDTLS_HAVEGE_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/havege.h"
|
||||
#include "third_party/mbedtls/havege.h"
|
||||
#endif
|
||||
|
||||
#define ENTROPY_MAX_LOOP 256 /**< Maximum amount to loop before error */
|
|
@ -25,28 +25,28 @@
|
|||
#define MBEDTLS_ENTROPY_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(MBEDTLS_SHA512_C) && !defined(MBEDTLS_ENTROPY_FORCE_SHA256)
|
||||
#include "third_party/mbedtls/include/mbedtls/sha512.h"
|
||||
#include "third_party/mbedtls/sha512.h"
|
||||
#define MBEDTLS_ENTROPY_SHA512_ACCUMULATOR
|
||||
#else
|
||||
#if defined(MBEDTLS_SHA256_C)
|
||||
#define MBEDTLS_ENTROPY_SHA256_ACCUMULATOR
|
||||
#include "third_party/mbedtls/include/mbedtls/sha256.h"
|
||||
#include "third_party/mbedtls/sha256.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/threading.h"
|
||||
#include "third_party/mbedtls/threading.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_HAVEGE_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/havege.h"
|
||||
#include "third_party/mbedtls/havege.h"
|
||||
#endif
|
||||
|
||||
#define MBEDTLS_ERR_ENTROPY_SOURCE_FAILED -0x003C /**< Critical entropy source failure. */
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Platform-specific and custom entropy polling functions
|
||||
*
|
||||
|
@ -25,23 +30,23 @@
|
|||
#endif
|
||||
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_ENTROPY_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/entropy.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/entropy_poll.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/entropy.h"
|
||||
#include "third_party/mbedtls/entropy_poll.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
#if defined(MBEDTLS_TIMING_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/timing.h"
|
||||
#include "third_party/mbedtls/timing.h"
|
||||
#endif
|
||||
#if defined(MBEDTLS_HAVEGE_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/havege.h"
|
||||
#include "third_party/mbedtls/havege.h"
|
||||
#endif
|
||||
#if defined(MBEDTLS_ENTROPY_NV_SEED)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
|
|
@ -25,7 +25,7 @@
|
|||
#define MBEDTLS_ENTROPY_POLL_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* Error message information
|
||||
*
|
||||
|
@ -19,194 +24,194 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
#if defined(MBEDTLS_ERROR_C) || defined(MBEDTLS_ERROR_STRERROR_DUMMY)
|
||||
|
||||
#if defined(MBEDTLS_ERROR_C)
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_snprintf snprintf
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_AES_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/aes.h"
|
||||
#include "third_party/mbedtls/aes.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ARC4_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/arc4.h"
|
||||
#include "third_party/mbedtls/arc4.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ARIA_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/aria.h"
|
||||
#include "third_party/mbedtls/aria.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ASN1_PARSE_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/asn1.h"
|
||||
#include "third_party/mbedtls/asn1.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_BASE64_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/base64.h"
|
||||
#include "third_party/mbedtls/base64.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_BIGNUM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_BLOWFISH_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/blowfish.h"
|
||||
#include "third_party/mbedtls/blowfish.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CAMELLIA_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/camellia.h"
|
||||
#include "third_party/mbedtls/camellia.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CCM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/ccm.h"
|
||||
#include "third_party/mbedtls/ccm.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CHACHA20_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/chacha20.h"
|
||||
#include "third_party/mbedtls/chacha20.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CHACHAPOLY_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/chachapoly.h"
|
||||
#include "third_party/mbedtls/chachapoly.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CIPHER_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/cipher.h"
|
||||
#include "third_party/mbedtls/cipher.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CMAC_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/cmac.h"
|
||||
#include "third_party/mbedtls/cmac.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_CTR_DRBG_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/ctr_drbg.h"
|
||||
#include "third_party/mbedtls/ctr_drbg.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_DES_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/des.h"
|
||||
#include "third_party/mbedtls/des.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_DHM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/dhm.h"
|
||||
#include "third_party/mbedtls/dhm.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ECP_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/ecp.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ENTROPY_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/entropy.h"
|
||||
#include "third_party/mbedtls/entropy.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_ERROR_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_GCM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/gcm.h"
|
||||
#include "third_party/mbedtls/gcm.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_HKDF_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/hkdf.h"
|
||||
#include "third_party/mbedtls/hkdf.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_HMAC_DRBG_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/hmac_drbg.h"
|
||||
#include "third_party/mbedtls/hmac_drbg.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_MD_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/md.h"
|
||||
#include "third_party/mbedtls/md.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_MD2_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/md2.h"
|
||||
#include "third_party/mbedtls/md2.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_MD4_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/md4.h"
|
||||
#include "third_party/mbedtls/md4.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_MD5_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/md5.h"
|
||||
#include "third_party/mbedtls/md5.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_NET_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/net_sockets.h"
|
||||
#include "third_party/mbedtls/net_sockets.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_OID_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/oid.h"
|
||||
#include "third_party/mbedtls/oid.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PADLOCK_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/padlock.h"
|
||||
#include "third_party/mbedtls/padlock.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PEM_PARSE_C) || defined(MBEDTLS_PEM_WRITE_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/pem.h"
|
||||
#include "third_party/mbedtls/pem.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PK_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/pk.h"
|
||||
#include "third_party/mbedtls/pk.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PKCS12_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/pkcs12.h"
|
||||
#include "third_party/mbedtls/pkcs12.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PKCS5_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/pkcs5.h"
|
||||
#include "third_party/mbedtls/pkcs5.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_POLY1305_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/poly1305.h"
|
||||
#include "third_party/mbedtls/poly1305.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_RIPEMD160_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/ripemd160.h"
|
||||
#include "third_party/mbedtls/ripemd160.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_RSA_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/rsa.h"
|
||||
#include "third_party/mbedtls/rsa.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA1_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/sha1.h"
|
||||
#include "third_party/mbedtls/sha1.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA256_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/sha256.h"
|
||||
#include "third_party/mbedtls/sha256.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA512_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/sha512.h"
|
||||
#include "third_party/mbedtls/sha512.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_TLS_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/ssl.h"
|
||||
#include "third_party/mbedtls/ssl.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/threading.h"
|
||||
#include "third_party/mbedtls/threading.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/x509.h"
|
||||
#include "third_party/mbedtls/x509.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_XTEA_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/xtea.h"
|
||||
#include "third_party/mbedtls/xtea.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
#define MBEDTLS_ERROR_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* NIST SP800-38D compliant GCM implementation
|
||||
*
|
||||
|
@ -31,22 +36,22 @@
|
|||
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_GCM_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/gcm.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/gcm.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_AESNI_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/aesni.h"
|
||||
#include "third_party/mbedtls/aesni.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/aes.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/aes.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#if !defined(MBEDTLS_PLATFORM_C)
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -34,12 +34,12 @@
|
|||
#define MBEDTLS_GCM_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/cipher.h"
|
||||
#include "third_party/mbedtls/cipher.h"
|
||||
|
||||
|
||||
#define MBEDTLS_GCM_ENCRYPT 1
|
||||
|
@ -78,7 +78,7 @@ typedef struct mbedtls_gcm_context
|
|||
mbedtls_gcm_context;
|
||||
|
||||
#else /* !MBEDTLS_GCM_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/gcm_alt.h" */
|
||||
/* #include "third_party/mbedtls/gcm_alt.h" */
|
||||
#endif /* !MBEDTLS_GCM_ALT */
|
||||
|
||||
/**
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/**
|
||||
* \brief HAVEGE: HArdware Volatile Entropy Gathering and Expansion
|
||||
*
|
||||
|
@ -26,13 +31,13 @@
|
|||
* Contact: seznec(at)irisa_dot_fr - orocheco(at)irisa_dot_fr
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_HAVEGE_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/havege.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/timing.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/havege.h"
|
||||
#include "third_party/mbedtls/timing.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
* On average, one iteration accesses two 8-word blocks in the havege WALK
|
|
@ -25,7 +25,7 @@
|
|||
#define MBEDTLS_HAVEGE_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* HKDF implementation -- RFC 5869
|
||||
*
|
||||
|
@ -19,13 +24,13 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_HKDF_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/hkdf.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/hkdf.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
int mbedtls_hkdf( const mbedtls_md_info_t *md, const unsigned char *salt,
|
||||
size_t salt_len, const unsigned char *ikm, size_t ikm_len,
|
|
@ -28,12 +28,12 @@
|
|||
#define MBEDTLS_HKDF_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/md.h"
|
||||
#include "third_party/mbedtls/md.h"
|
||||
|
||||
/**
|
||||
* \name HKDF Error codes
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* HMAC_DRBG implementation (NIST SP 800-90)
|
||||
*
|
||||
|
@ -27,13 +32,13 @@
|
|||
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_HMAC_DRBG_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/hmac_drbg.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/hmac_drbg.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_FS_IO)
|
||||
|
@ -41,7 +46,7 @@
|
|||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_SELF_TEST */
|
|
@ -29,15 +29,15 @@
|
|||
#define MBEDTLS_HMAC_DRBG_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/md.h"
|
||||
#include "third_party/mbedtls/md.h"
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/threading.h"
|
||||
#include "third_party/mbedtls/threading.h"
|
||||
#endif
|
||||
|
||||
/*
|
4
third_party/mbedtls/mbedtls.mk
vendored
4
third_party/mbedtls/mbedtls.mk
vendored
|
@ -6,9 +6,7 @@ PKGS += THIRD_PARTY_MBEDTLS
|
|||
THIRD_PARTY_MBEDTLS_ARTIFACTS += THIRD_PARTY_MBEDTLS_A
|
||||
THIRD_PARTY_MBEDTLS = $(THIRD_PARTY_MBEDTLS_A_DEPS) $(THIRD_PARTY_MBEDTLS_A)
|
||||
THIRD_PARTY_MBEDTLS_A = o/$(MODE)/third_party/mbedtls/mbedtls.a
|
||||
THIRD_PARTY_MBEDTLS_A_FILES := \
|
||||
$(wildcard third_party/mbedtls/library/*.*) \
|
||||
$(wildcard third_party/mbedtls/include/*/*.*)
|
||||
THIRD_PARTY_MBEDTLS_A_FILES := $(wildcard third_party/mbedtls/*)
|
||||
THIRD_PARTY_MBEDTLS_A_HDRS = $(filter %.h,$(THIRD_PARTY_MBEDTLS_A_FILES))
|
||||
THIRD_PARTY_MBEDTLS_A_SRCS = $(filter %.c,$(THIRD_PARTY_MBEDTLS_A_FILES))
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/**
|
||||
* \file md.c
|
||||
*
|
||||
|
@ -23,25 +28,25 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_MD_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/md.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/md_internal.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/md.h"
|
||||
#include "third_party/mbedtls/md_internal.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/md2.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/md4.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/md5.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/ripemd160.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/sha1.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/sha256.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/sha512.h"
|
||||
#include "third_party/mbedtls/md2.h"
|
||||
#include "third_party/mbedtls/md4.h"
|
||||
#include "third_party/mbedtls/md5.h"
|
||||
#include "third_party/mbedtls/ripemd160.h"
|
||||
#include "third_party/mbedtls/sha1.h"
|
||||
#include "third_party/mbedtls/sha256.h"
|
||||
#include "third_party/mbedtls/sha512.h"
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_calloc calloc
|
||||
#define mbedtls_free free
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* RFC 1115/1319 compliant MD2 implementation
|
||||
*
|
||||
|
@ -25,18 +30,18 @@
|
|||
* http://www.ietf.org/rfc/rfc1319.txt
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_MD2_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/md2.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/md2.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -30,7 +30,7 @@
|
|||
#define MBEDTLS_MD2_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
@ -65,7 +65,7 @@ typedef struct mbedtls_md2_context
|
|||
mbedtls_md2_context;
|
||||
|
||||
#else /* MBEDTLS_MD2_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/md2_alt.h" */
|
||||
/* #include "third_party/mbedtls/md2_alt.h" */
|
||||
#endif /* MBEDTLS_MD2_ALT */
|
||||
|
||||
/**
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* RFC 1186/1320 compliant MD4 implementation
|
||||
*
|
||||
|
@ -25,18 +30,18 @@
|
|||
* http://www.ietf.org/rfc/rfc1320.txt
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_MD4_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/md4.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/md4.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -30,7 +30,7 @@
|
|||
#define MBEDTLS_MD4_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
@ -64,7 +64,7 @@ typedef struct mbedtls_md4_context
|
|||
mbedtls_md4_context;
|
||||
|
||||
#else /* MBEDTLS_MD4_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/md4_alt.h" */
|
||||
/* #include "third_party/mbedtls/md4_alt.h" */
|
||||
#endif /* MBEDTLS_MD4_ALT */
|
||||
|
||||
/**
|
|
@ -1,5 +1,10 @@
|
|||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
Copyright The Mbed TLS Contributors\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
|
||||
/*
|
||||
* RFC 1321 compliant MD5 implementation
|
||||
*
|
||||
|
@ -24,18 +29,18 @@
|
|||
* http://www.ietf.org/rfc/rfc1321.txt
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_MD5_C)
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/md5.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/md5.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#define mbedtls_printf printf
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
|
@ -29,7 +29,7 @@
|
|||
#define MBEDTLS_MD5_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
@ -63,7 +63,7 @@ typedef struct mbedtls_md5_context
|
|||
mbedtls_md5_context;
|
||||
|
||||
#else /* MBEDTLS_MD5_ALT */
|
||||
/* #include "third_party/mbedtls/include/mbedtls/md5_alt.h" */
|
||||
/* #include "third_party/mbedtls/md5_alt.h" */
|
||||
#endif /* MBEDTLS_MD5_ALT */
|
||||
|
||||
/**
|
|
@ -29,12 +29,12 @@
|
|||
#define MBEDTLS_MD_WRAP_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/md.h"
|
||||
#include "third_party/mbedtls/md.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
|
@ -19,18 +19,18 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
||||
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/memory_buffer_alloc.h"
|
||||
#include "third_party/mbedtls/memory_buffer_alloc.h"
|
||||
|
||||
/* No need for the header guard as MBEDTLS_MEMORY_BUFFER_ALLOC_C
|
||||
is dependent upon MBEDTLS_PLATFORM_C */
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/platform_util.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform_util.h"
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/threading.h"
|
||||
#include "third_party/mbedtls/threading.h"
|
||||
#endif
|
||||
|
||||
#define MAGIC1 0xFF00AA55
|
|
@ -25,7 +25,7 @@
|
|||
#define MBEDTLS_MEMORY_BUFFER_ALLOC_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
|
@ -24,13 +24,13 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
|
||||
#include "third_party/mbedtls/include/mbedtls/net_sockets.h"
|
||||
#include "third_party/mbedtls/net_sockets.h"
|
||||
#if defined(MBEDTLS_DEPRECATED_WARNING)
|
||||
#warning "Deprecated header file: Superseded by mbedtls/net_sockets.h"
|
||||
#endif /* MBEDTLS_DEPRECATED_WARNING */
|
|
@ -34,7 +34,7 @@
|
|||
#include "libc/sysv/consts/so.h"
|
||||
#include "libc/sysv/consts/sock.h"
|
||||
#include "libc/sysv/consts/sol.h"
|
||||
#include "third_party/mbedtls/library/common.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
/* clang-format off */
|
||||
|
||||
#if defined(MBEDTLS_NET_C)
|
||||
|
@ -46,12 +46,12 @@
|
|||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
#include "third_party/mbedtls/include/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#else
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/net_sockets.h"
|
||||
#include "third_party/mbedtls/include/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/net_sockets.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
||||
|
||||
#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \
|
|
@ -41,12 +41,12 @@
|
|||
#define MBEDTLS_NET_SOCKETS_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "third_party/mbedtls/include/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#include "third_party/mbedtls/include/mbedtls/ssl.h"
|
||||
#include "third_party/mbedtls/ssl.h"
|
||||
|
||||
|
||||
#define MBEDTLS_ERR_NET_SOCKET_FAILED -0x0042 /**< Failed to open a socket. */
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue