Commit Graph

5738 Commits

Author SHA1 Message Date
Daniel Pouzzner
2193df1d62 add WOLFSSL_ECC_NO_SMALL_STACK. 2021-12-10 23:57:14 -06:00
David Garske
41d4aafa3f Merge pull request #4645 from haydenroche5/parse_cert_public
Make wolfCrypt ASN cert parsing functionality public.
2021-12-10 18:27:18 -08:00
Hayden Roche
6764e7c15f Make wolfCrypt ASN cert parsing functionality public.
Currently, the `ParseCert` function is only available if `WOLFSSL_ASN_API` is
defined to `WOLFSSL_API`. The only way to achieve this without enabling the
compatibility layer is to define `WOLFSSL_TEST_CERT`. There are users defining
this so that they can parse certs with wolfCrypt, even though this doesn't seem
to be the original intent of the define. This commit adds the function
`wc_ParseCert` to the public wolfCrypt API. It's simply a wrapper around
`ParseCert`. Similarly, this commit adds `wc_InitDecodedCert` and
`wc_FreeDecodedCert` to the public API, which are wrappers around
`InitDecodedCert` and `FreeDecodedCert`, respectively.
2021-12-10 10:43:28 -08:00
David Garske
65a0b71994 Merge pull request #4641 from anhu/priv_key_check
Actually do a private/public key check for FALCON.
2021-12-10 06:53:35 -08:00
Anthony Hu
6b5fa9d0ae remove consistency check; let it fail elsewhere. 2021-12-09 17:12:42 -05:00
David Garske
dd0e3d6ebf Merge pull request #4644 from kareem-wolfssl/iotsafe_class
Fix compiling Iotsafe with C++ by avoiding reserved keyword 'class'.
2021-12-09 09:10:24 -08:00
Anthony Hu
494abde3eb Better casting. 2021-12-09 09:45:28 -05:00
Sean Parkinson
6da0cc1ced Merge pull request #4600 from dgarske/cust_oid
Support for Custom OID in subject and CSR request extension
2021-12-09 11:24:30 +10:00
Kareem
4200cf1b4d Fix compiling Iotsafe with C++ by avoiding reserved keyword 'class'. 2021-12-08 17:17:58 -07:00
Anthony Hu
7022eb6f89 Actually do a private/public key check for FALCON. 2021-12-08 18:04:11 -05:00
Anthony Hu
74442605fa Pass in pointer to a local size_t var, not word32 var to prevent stack corruption. 2021-12-08 16:01:52 -05:00
Hideki Miyazaki
081d28f556 better handling for global index
fix function proto type definition
2021-12-08 11:42:23 +09:00
Juliusz Sosinowicz
223f25149b Return early on failed key init 2021-12-07 18:11:19 +01:00
Kaleb Himes
96daf2bede Merge pull request #4632 from julek-wolfssl/PrintPubKeyEC-leak
`a` and `key` were not being freed => leak in `PrintPubKeyEC`
2021-12-07 07:20:05 -07:00
Juliusz Sosinowicz
574d171357 Fix leak when mp_int = 0 in integer.c 2021-12-07 12:46:24 +01:00
David Garske
e1b7363647 Fixes from peer review. 2021-12-06 16:12:07 -08:00
David Garske
579056a2f3 Subject raw should be populated with WOLFSSL_CERT_EXT. 2021-12-06 14:19:32 -08:00
Juliusz Sosinowicz
96b8b11fba a and key were not being freed => leak in PrintPubKeyEC 2021-12-06 12:03:02 +01:00
Jacob Barthelmeh
1ec86ee4cc add human readable string of IP 2021-12-02 16:04:58 -07:00
David Garske
b4c6140b64 Merge pull request #4442 from julek-wolfssl/kerberos
Add Kerberos 5 support
2021-12-02 09:07:34 -08:00
Daniele Lacamera
baee7bace4 Merge pull request #4584 from ethanlooney/nxp_se050_curve25519
Added curve25519 support for NXP SE050
2021-12-02 02:47:36 -08:00
David Garske
48b15b0dfb Merge pull request #4616 from SparkiDev/sp_int_mips32
SP math all: MIPS asm fix
2021-12-01 16:16:14 -08:00
David Garske
9f611e8b80 Merge pull request #4589 from JacobBarthelmeh/native-lwip
Native LwIP support update
2021-12-01 10:37:13 -08:00
JacobBarthelmeh
43ac0d3684 adjust test file for pritnf and test_pass 2021-11-30 16:41:02 -07:00
JacobBarthelmeh
b69a1c860c Merge pull request #3996 from cconlon/pkcs7_detachedhash
adjust PKCS7_VerifySignedData to correctly verify precomputed content hash with detached signature
2021-11-30 12:46:46 -08:00
David Garske
6d4c067b72 Merge pull request #4607 from anhu/wolfcrypt_pq_benchmarks
Use wolfCrypt's benchmarking app to run the PQ algorithms.
2021-11-30 10:09:48 -08:00
David Garske
d3d73f7a4e Merge pull request #4614 from SparkiDev/sp_exp_nct
SP math all: fix exponent bit count
2021-11-30 08:26:41 -08:00
David Garske
37df78b082 Merge pull request #4615 from SparkiDev/mp_mulx
TFM: fix Intel MULX multiply
2021-11-30 08:26:17 -08:00
David Garske
5a55baddad Merge pull request #4617 from SparkiDev/ecc_point_on_curve
ECC wc_ecc_point_is_on_curve: validate oridinates against prime
2021-11-30 08:25:47 -08:00
David Garske
7a41089b12 Merge pull request #4618 from douzzer/wc-port-h-linuxkm-XSNPRINTF-XATOI
linuxkm wc_port.h macro scoping fix
2021-11-30 08:25:06 -08:00
David Garske
78f4c84ee0 Merge pull request #4586 from SparkiDev/sp_gen_ecc_order
SP: fix range of k to be 1..n-1
2021-11-30 08:23:46 -08:00
Daniel Pouzzner
a33ae21801 whitespace cleanups and portability/pedantic fixes 2021-11-29 23:58:39 -06:00
Sean Parkinson
567cd155ea ECC wc_ecc_point_is_on_curve: validate oridinates against prime 2021-11-30 14:17:41 +10:00
Sean Parkinson
a7d538a82f SP math all: MIPS asm fix
Names $lo and $hi in register list are not supported with old GCC
compiler. Newer compiler also supports %lo and %hi.
2021-11-30 12:56:08 +10:00
Sean Parkinson
9f6fd6abf9 TFM: fix Intel MULX multiply
Carry wasn't being handled properly.
2021-11-30 12:07:44 +10:00
Sean Parkinson
e5e280b175 SP math all: fix exponent bit count
Only when using non-constant time implementation and modulus even.
2021-11-30 10:28:42 +10:00
Jacob Barthelmeh
f7c34d22e6 add calls to user callback and adjust formating 2021-11-29 15:56:00 -07:00
Chris Conlon
7221e06ff7 Merge pull request #4588 from miyazakh/sce_protect_mode_e2studio 2021-11-29 15:32:48 -07:00
David Garske
80c16745c4 Merge pull request #4602 from embhorn/zd13296
Initialize global in TSIP port
2021-11-29 13:01:03 -08:00
Anthony Hu
8a2945fe66 More braces. 2021-11-29 15:56:44 -05:00
Anthony Hu
5aa8bc2983 Drop a brace. 2021-11-29 15:47:53 -05:00
David Garske
c104ab2206 Merge pull request #4572 from SparkiDev/ecc_pub_decode
mp_sqrt: TonelliShanks algorithm doesn't handle zero
2021-11-29 12:27:36 -08:00
Anthony Hu
fea438d07f Use wolfCrypt's benchmarking app to run the PQ algorithms. 2021-11-26 15:15:23 -05:00
Hideki Miyazaki
fb4e39f00a addressed review comments prt1 2021-11-26 16:03:42 +09:00
Tesfa Mael
b2c0bacb06 Fix Cryptocell ecc 2021-11-24 19:22:40 -08:00
Eric Blankenhorn
6d7e50d2ae Initialize global in TSIP port 2021-11-24 09:22:14 -06:00
David Garske
be870e742d Edge case build fixes (cert gen only). 2021-11-23 15:12:48 -08:00
David Garske
7396a0cb3a Resolves all peer review comments. Fixes to get Curve25519 working on real hardware. Regression testing fixes for ECC. 2021-11-23 15:03:53 -08:00
David Garske
7524ededd3 Support for Custom OID in subject and CSR request extension:
* Adds new build option `WOLFSSL_CUSTOM_OID` for supplying a custom OID in a CSR
* Fixes in ASN template CSR generation.
* Fix to allow calling `wc_Ed25519PublicKeyToDer` and `wc_Ed448PublicKeyToDer` with NULL output buffer to get length only.
* Refactor of the certificate subject name encoding.
* Refactor of the OID's to consolidate.
* Improvements to the Domain Component API unit test.
ZD 12943
2021-11-23 09:51:13 -08:00
Hideki Miyazaki
89ed811e23 fix compile error when disabled SCEPROTECT 2021-11-22 21:36:02 +09:00