Skip to content

Commit 093cc04

Browse files
committed
Stack API: Pull out implementation into separate file
General stack APIs pulled out into ssl_sk.c. Other simple APIs also pulled out into ssl_sk.c. wolfSSL_lh_retrieve also pulled out into ssl_sk.c. Added tests of public APIs that weren't already tested.
1 parent d54f5e7 commit 093cc04

19 files changed

Lines changed: 1885 additions & 1081 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,16 +2682,17 @@ if(WOLFSSL_EXAMPLES)
26822682
tests/api/test_pkcs7.c
26832683
tests/api/test_pkcs12.c
26842684
tests/api/test_ossl_asn1.c
2685-
tests/api/test_ossl_bn.c
26862685
tests/api/test_ossl_bio.c
2687-
tests/api/test_ossl_dgst.c
2688-
tests/api/test_ossl_mac.c
2686+
tests/api/test_ossl_bn.c
26892687
tests/api/test_ossl_cipher.c
2690-
tests/api/test_ossl_rsa.c
26912688
tests/api/test_ossl_dh.c
2689+
tests/api/test_ossl_dgst.c
2690+
tests/api/test_ossl_dsa.c
26922691
tests/api/test_ossl_ec.c
26932692
tests/api/test_ossl_ecx.c
2694-
tests/api/test_ossl_dsa.c
2693+
tests/api/test_ossl_mac.c
2694+
tests/api/test_ossl_rsa.c
2695+
tests/api/test_ossl_sk.c
26952696
tests/api/test_tls13.c
26962697
tests/srp.c
26972698
tests/suites.c

IDE/Espressif/ESP-IDF/UPDATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ Updates to Espressif ESP-IDF wolfssl_benchmark and wolfssl_test examples:
2222
- Added optional `time_helper` for wolfssl_test
2323
- Exclude `ssl_misc.c` in component cmake to fix warning: #warning ssl_misc.c does not need to be compiled separately from ssl.c
2424
- Exclude `ssl_crypto.c` in component cmake to fix warning: #warning ssl_crypto.c does not need to be compiled separately from ssl.c
25+
- Exclude `ssl_sk.c` in component cmake to fix warning: #warning ssl_sk.c does not need to be compiled separately from ssl.c

IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,7 @@ else()
845845
"\"${WOLFSSL_ROOT}/src/ssl_misc.c\"" # included by ssl.c
846846
"\"${WOLFSSL_ROOT}/src/ssl_p7p12.c\"" # included by ssl.c
847847
"\"${WOLFSSL_ROOT}/src/ssl_sess.c\"" # included by ssl.c
848+
"\"${WOLFSSL_ROOT}/src/ssl_sk.c\"" # included by ssl.c
848849
"\"${WOLFSSL_ROOT}/src/x509.c\""
849850
"\"${WOLFSSL_ROOT}/src/x509_str.c\""
850851
"\"${WOLFSSL_ROOT}/wolfcrypt/src/ext_kyber.c\"" # external non-wolfssl Kyber disabled by default

IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,7 @@ else()
845845
"\"${WOLFSSL_ROOT}/src/ssl_misc.c\"" # included by ssl.c
846846
"\"${WOLFSSL_ROOT}/src/ssl_p7p12.c\"" # included by ssl.c
847847
"\"${WOLFSSL_ROOT}/src/ssl_sess.c\"" # included by ssl.c
848+
"\"${WOLFSSL_ROOT}/src/ssl_sk.c\"" # included by ssl.c
848849
"\"${WOLFSSL_ROOT}/src/x509.c\""
849850
"\"${WOLFSSL_ROOT}/src/x509_str.c\""
850851
"\"${WOLFSSL_ROOT}/wolfcrypt/src/ext_kyber.c\"" # external non-wolfssl Kyber disabled by default

IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,7 @@ else()
845845
"\"${WOLFSSL_ROOT}/src/ssl_misc.c\"" # included by ssl.c
846846
"\"${WOLFSSL_ROOT}/src/ssl_p7p12.c\"" # included by ssl.c
847847
"\"${WOLFSSL_ROOT}/src/ssl_sess.c\"" # included by ssl.c
848+
"\"${WOLFSSL_ROOT}/src/ssl_sk.c\"" # included by ssl.c
848849
"\"${WOLFSSL_ROOT}/src/x509.c\""
849850
"\"${WOLFSSL_ROOT}/src/x509_str.c\""
850851
"\"${WOLFSSL_ROOT}/wolfcrypt/src/ext_kyber.c\"" # external non-wolfssl Kyber disabled by default

IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,7 @@ else()
845845
"\"${WOLFSSL_ROOT}/src/ssl_misc.c\"" # included by ssl.c
846846
"\"${WOLFSSL_ROOT}/src/ssl_p7p12.c\"" # included by ssl.c
847847
"\"${WOLFSSL_ROOT}/src/ssl_sess.c\"" # included by ssl.c
848+
"\"${WOLFSSL_ROOT}/src/ssl_sk.c\"" # included by ssl.c
848849
"\"${WOLFSSL_ROOT}/src/x509.c\""
849850
"\"${WOLFSSL_ROOT}/src/x509_str.c\""
850851
"\"${WOLFSSL_ROOT}/wolfcrypt/src/ext_kyber.c\"" # external non-wolfssl Kyber disabled by default

IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,7 @@ else()
845845
"\"${WOLFSSL_ROOT}/src/ssl_misc.c\"" # included by ssl.c
846846
"\"${WOLFSSL_ROOT}/src/ssl_p7p12.c\"" # included by ssl.c
847847
"\"${WOLFSSL_ROOT}/src/ssl_sess.c\"" # included by ssl.c
848+
"\"${WOLFSSL_ROOT}/src/ssl_sk.c\"" # included by ssl.c
848849
"\"${WOLFSSL_ROOT}/src/x509.c\""
849850
"\"${WOLFSSL_ROOT}/src/x509_str.c\""
850851
"\"${WOLFSSL_ROOT}/wolfcrypt/src/ext_kyber.c\"" # external non-wolfssl Kyber disabled by default

IDE/Espressif/ESP-IDF/libs/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ set(COMPONENT_SRCEXCLUDE
7979
"./src/ssl_misc.c" # included by ssl.c
8080
"./src/ssl_p7p12.c" # included by ssl.c
8181
"./src/ssl_sess.c" # included by ssl.c
82+
"./src/ssl_sk.c" # included by ssl.c
8283
"./src/x509.c"
8384
"./src/x509_str.c"
8485
"./wolfcrypt/src/evp.c"

IDE/INTIME-RTOS/wolfssl-lib.vcxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">true</ExcludedFromBuild>
6262
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|INtime'">true</ExcludedFromBuild>
6363
</ClCompile>
64+
<ClCompile Include="..\..\src\ssl_sk.c">
65+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">true</ExcludedFromBuild>
66+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|INtime'">true</ExcludedFromBuild>
67+
</ClCompile>
6468
<ClCompile Include="..\..\src\tls13.c" />
6569
<ClCompile Include="..\..\src\x509.c">
6670
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|INtime'">true</ExcludedFromBuild>
@@ -360,4 +364,4 @@
360364
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
361365
<ImportGroup Label="ExtensionTargets">
362366
</ImportGroup>
363-
</Project>
367+
</Project>

IDE/MSVS-2019-AZSPHERE/wolfssl_new_azsphere/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ list( REMOVE_ITEM SSL_SOURCES ../../../src/ssl_load.c )
4545
list( REMOVE_ITEM SSL_SOURCES ../../../src/ssl_misc.c )
4646
list( REMOVE_ITEM SSL_SOURCES ../../../src/ssl_p7p12.c )
4747
list( REMOVE_ITEM SSL_SOURCES ../../../src/ssl_sess.c )
48+
list( REMOVE_ITEM SSL_SOURCES ../../../src/ssl_sk.c )
4849
aux_source_directory( ${CRYPTO_SRC_DIR} CRYPTO_SOURCES )
4950
list( REMOVE_ITEM CRYPTO_SOURCES ../../../wolfcrypt/src/evp.c )
5051
list( REMOVE_ITEM CRYPTO_SOURCES ../../../wolfcrypt/src/misc.c )

0 commit comments

Comments
 (0)