Commit Graph

5084 Commits

Author SHA1 Message Date
Sean Parkinson
0b2b218de7 ECC: better protection when using encrypted memory
Added new ECC scalar multiplication implementation.
2021-12-17 08:30:45 +10:00
Sean Parkinson
bd7e19b8fe Merge pull request #4639 from JacobBarthelmeh/ECC
deterministic ECC sign edge case fix and add variant
2021-12-16 08:48:37 +10:00
David Garske
abe8696852 Merge pull request #4642 from cconlon/pubKeyDerFromX509
Add wc_GetPubKeyDerFromCert()
2021-12-15 14:30:58 -08:00
Chris Conlon
5172130287 add wc_GetPubKeyDerFromCert(), get pub key DER from DecodedCert 2021-12-15 11:04:52 -07:00
Daniel Pouzzner
a773cdfd5d pkcs12.c wc_d2i_PKCS12_fp(): mollify Visual Studio (false positives C4701 and C4703). 2021-12-14 18:33:24 -06:00
Daniel Pouzzner
242eb2dcf1 wolfcrypt/src/pkcs12.c: fix scan-build deadcode.DeadStores gripe. 2021-12-14 18:08:54 -06:00
David Garske
a6c7d56c32 Merge pull request #4655 from haydenroche5/wc_pkcs12_from_file
Add wc_d2i_PKCS12_fp to parse a PKCS #12 file directly in wolfCrypt.
2021-12-14 08:58:57 -08:00
John Safranek
2359045b28 Merge pull request #4649 from kaleb-himes/KCAPI_FIPS_READY
The minimal changes needed to add KCAPI support with fips-ready
2021-12-13 17:33:03 -08:00
Hayden Roche
92d207a1cd Add wc_d2i_PKCS12_fp to parse a PKCS #12 file directly in wolfCrypt. 2021-12-13 15:28:34 -08:00
Sean Parkinson
f5cd61e4f9 Merge pull request #4654 from embhorn/zd13375
Fix _sp_exptmod_base_2 to init vars.
2021-12-14 07:38:20 +10:00
kareem-wolfssl
638d00f593 Merge pull request #4634 from danielinux/iotsafe-16bit-id
IoT-SAFE module: improvements and bug fixes
2021-12-13 11:33:19 -07:00
Eric Blankenhorn
53eb5d2e5a Fix _sp_exptmod_base_2 to init vars. 2021-12-13 10:16:55 -06:00
Daniel Pouzzner
355b779a3e feature gating tweaks to better support --disable-rsa --disable-dh --disable-dsa. also a whitespace fix in ssl.c. 2021-12-11 14:08:04 -06:00
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
kaleb-himes
7cccaa98b7 The minimal changes needed to add KCAPI support with fips-ready 2021-12-10 14:44:20 -07: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
Daniele Lacamera
f02763b088 Fixes after review comments 2021-12-09 11:23:44 +01: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
Jacob Barthelmeh
dfce101b5b deterministic ECC sign edge case fix and add variant 2021-12-08 09:54:47 -07: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
Daniele Lacamera
1cb8b34fba IoT-SAFE: minor fixes + doxygen for new API calls 2021-12-07 14:11:14 +01:00
Daniele Lacamera
9e73c324a4 iot-safe: Fixed debug printf, updated slot number for 16-bit demo 2021-12-07 14:11:14 +01:00
Daniele Lacamera
23982e4fb3 Fixed wolfIoT_ecc_keygen when key is stored during generation 2021-12-07 14:11:14 +01:00
Daniele Lacamera
b23d51ab78 Avoid looping on uart read after applet initialization fails 2021-12-07 14:11:14 +01:00
Daniele Lacamera
5da89c6275 Clear meaning for the return value of iotsafe_gen_keypair 2021-12-07 14:11:14 +01:00
Kareem
4d483b0a28 iotsafe: allow init to continue with empty response 2021-12-07 14:11:13 +01:00
Daniele Lacamera
e551f439f4 Reworked expect_tok to fix NULL dereferences 2021-12-07 14:11:13 +01:00
Daniele Lacamera
0c0f36d67d IoT-SAFE: Minor fixes
- reverted length change in put public operation
- Loading CA from IoT-SAFE file slot in 16bit demo
2021-12-07 14:11:13 +01:00
Daniele Lacamera
2646747f2a Fixed 8bit variable overflow/useless code 2021-12-07 14:11:13 +01:00
Daniele Lacamera
0621ba061b Multiple fixes for IoT-SAFE
- Tested with a different SIM:
  - 16bit IDs
  - Directly retrieving public key from keygen function
  - larger response buffers (up to 256 bytes in ReadFile)
  - Fixed hardcoded length in ID buffers
2021-12-07 14:11:13 +01:00
Daniele Lacamera
2f17a7e626 Support longer-than-8bit IDs for IoTSAFE key/file slots 2021-12-07 14:11:13 +01: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