Skip to content

Commit 1ebecb6

Browse files
authored
Merge pull request #9484 from holtrop/add-rust-wrapper-build-configs
Add several library configurations from os-check.yml to the Rust wrapper CI build
2 parents 2b726eb + 10a12b7 commit 1ebecb6

22 files changed

Lines changed: 347 additions & 80 deletions

File tree

.github/workflows/rust-wrapper.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,50 @@ jobs:
2424
uses: wolfSSL/actions-build-autotools-project@v1
2525
with:
2626
path: wolfssl
27-
configure: --enable-all
27+
configure: ${{ matrix.config }}
2828
- name: Build Rust Wrapper
2929
working-directory: wolfssl
3030
run: make -C wrapper/rust
3131
- name: Run Rust Wrapper Tests
3232
working-directory: wolfssl
3333
run: make -C wrapper/rust test
34+
strategy:
35+
matrix:
36+
config: [
37+
# Add new configs here
38+
'',
39+
'--enable-all',
40+
'--enable-cryptonly --disable-examples',
41+
'--enable-cryptonly --disable-examples --disable-aes --disable-aesgcm',
42+
'--enable-cryptonly --disable-examples --disable-aescbc',
43+
'--enable-cryptonly --disable-examples --disable-aeseax',
44+
'--enable-cryptonly --disable-examples --disable-aesecb',
45+
'--enable-cryptonly --disable-examples --disable-aesccm',
46+
'--enable-cryptonly --disable-examples --disable-aescfb',
47+
'--enable-cryptonly --disable-examples --disable-aesctr',
48+
'--enable-cryptonly --disable-examples --disable-aescts',
49+
'--enable-cryptonly --disable-examples --disable-aesgcm',
50+
'--enable-cryptonly --disable-examples --disable-aesgcm-stream',
51+
'--enable-cryptonly --disable-examples --disable-aesofb',
52+
'--enable-cryptonly --disable-examples --disable-aesxts',
53+
'--enable-cryptonly --disable-examples --disable-cmac',
54+
'--enable-cryptonly --disable-examples --disable-dh',
55+
'--enable-cryptonly --disable-examples --disable-ecc',
56+
'--enable-cryptonly --disable-examples --disable-ed25519',
57+
'--enable-cryptonly --disable-examples --disable-ed25519-stream',
58+
'--enable-cryptonly --disable-examples --disable-ed448',
59+
'--enable-cryptonly --disable-examples --disable-ed448-stream',
60+
'--enable-cryptonly --disable-examples --disable-hkdf',
61+
'--enable-cryptonly --disable-examples --disable-hmac',
62+
'--enable-cryptonly --disable-examples --disable-rng',
63+
'--enable-cryptonly --disable-examples --disable-rsa',
64+
'--enable-cryptonly --disable-examples --disable-rsapss',
65+
'--enable-cryptonly --disable-examples --disable-sha224',
66+
'--enable-cryptonly --disable-examples --disable-sha3',
67+
'--enable-cryptonly --disable-examples --disable-sha384',
68+
'--enable-cryptonly --disable-examples --disable-sha512',
69+
'--enable-cryptonly --disable-examples --disable-shake128',
70+
'--enable-cryptonly --disable-examples --disable-shake256',
71+
'--enable-cryptonly --disable-examples --disable-srtp-kdf',
72+
'--enable-cryptonly --disable-examples --disable-x963kdf',
73+
]

wolfssl/wolfcrypt/rsa.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,15 @@ WOLFSSL_API int wc_RsaPrivateDecrypt(const byte* in, word32 inLen, byte* out,
330330
word32 outLen, RsaKey* key);
331331
WOLFSSL_API int wc_RsaSSL_Sign(const byte* in, word32 inLen, byte* out,
332332
word32 outLen, RsaKey* key, WC_RNG* rng);
333+
#ifdef WC_RSA_PSS
333334
WOLFSSL_API int wc_RsaPSS_Sign(const byte* in, word32 inLen, byte* out,
334335
word32 outLen, enum wc_HashType hash, int mgf,
335336
RsaKey* key, WC_RNG* rng);
336337
WOLFSSL_API int wc_RsaPSS_Sign_ex(const byte* in, word32 inLen, byte* out,
337338
word32 outLen, enum wc_HashType hash,
338339
int mgf, int saltLen, RsaKey* key,
339340
WC_RNG* rng);
341+
#endif
340342
WOLFSSL_API int wc_RsaSSL_VerifyInline(byte* in, word32 inLen, byte** out,
341343
RsaKey* key);
342344
WOLFSSL_API int wc_RsaSSL_Verify(const byte* in, word32 inLen, byte* out,
@@ -346,6 +348,7 @@ WOLFSSL_API int wc_RsaSSL_Verify_ex(const byte* in, word32 inLen, byte* out,
346348
WOLFSSL_API int wc_RsaSSL_Verify_ex2(const byte* in, word32 inLen, byte* out,
347349
word32 outLen, RsaKey* key, int pad_type,
348350
enum wc_HashType hash);
351+
#ifdef WC_RSA_PSS
349352
WOLFSSL_API int wc_RsaPSS_VerifyInline(byte* in, word32 inLen, byte** out,
350353
enum wc_HashType hash, int mgf,
351354
RsaKey* key);
@@ -378,6 +381,7 @@ WOLFSSL_API int wc_RsaPSS_VerifyCheck(const byte* in, word32 inLen,
378381
const byte* digest, word32 digestLen,
379382
enum wc_HashType hash, int mgf,
380383
RsaKey* key);
384+
#endif
381385

382386
WOLFSSL_API int wc_RsaEncryptSize(const RsaKey* key);
383387

wolfssl/wolfcrypt/sha512.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ struct wc_Sha512 {
229229

230230
#endif /* HAVE_FIPS */
231231

232-
#if defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384)
232+
#if defined(WOLFSSL_SHA512)
233233

234234
#ifdef WOLFSSL_ARMASM
235235
#if !defined(WOLFSSL_ARMASM_NO_NEON)

wrapper/rust/wolfssl/build.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ fn scan_cfg() -> Result<()> {
125125
/* dh */
126126
check_cfg(&binding, "wc_InitDhKey", "dh");
127127
check_cfg(&binding, "wc_DhGenerateParams", "dh_keygen");
128+
check_cfg(&binding, "wc_Dh_ffdhe2048_Get", "dh_ffdhe_2048");
129+
check_cfg(&binding, "wc_Dh_ffdhe3072_Get", "dh_ffdhe_3072");
130+
check_cfg(&binding, "wc_Dh_ffdhe4096_Get", "dh_ffdhe_4096");
131+
check_cfg(&binding, "wc_Dh_ffdhe6144_Get", "dh_ffdhe_6144");
132+
check_cfg(&binding, "wc_Dh_ffdhe8192_Get", "dh_ffdhe_8192");
128133

129134
/* ecc */
130135
check_cfg(&binding, "wc_ecc_init", "ecc");
@@ -155,24 +160,37 @@ fn scan_cfg() -> Result<()> {
155160
check_cfg(&binding, "wc_ed448_verify_msg_ex", "ed448_verify");
156161
check_cfg(&binding, "wc_ed448_verify_msg_init", "ed448_streaming_verify");
157162

163+
/* hkdf */
164+
check_cfg(&binding, "wc_HKDF_Extract_ex", "hkdf");
165+
166+
/* hmac */
167+
check_cfg(&binding, "wc_HmacSetKey", "hmac");
168+
158169
/* kdf */
159170
check_cfg(&binding, "wc_PBKDF2", "kdf_pbkdf2");
160171
check_cfg(&binding, "wc_PKCS12_PBKDF_ex", "kdf_pkcs12");
161172
check_cfg(&binding, "wc_SRTP_KDF", "kdf_srtp");
162173
check_cfg(&binding, "wc_SSH_KDF", "kdf_ssh");
163174
check_cfg(&binding, "wc_Tls13_HKDF_Extract_ex", "kdf_tls13");
164175

176+
/* prf */
177+
check_cfg(&binding, "wc_PRF", "prf");
178+
165179
/* random */
166180
check_cfg(&binding, "wc_RNG_DRBG_Reseed", "random_hashdrbg");
181+
check_cfg(&binding, "wc_InitRng", "random");
167182

168183
/* rsa */
169184
check_cfg(&binding, "wc_InitRsaKey", "rsa");
170185
check_cfg(&binding, "wc_RsaDirect", "rsa_direct");
171186
check_cfg(&binding, "wc_MakeRsaKey", "rsa_keygen");
187+
check_cfg(&binding, "wc_RsaPSS_Sign", "rsa_pss");
172188

173189
/* sha */
174190
check_cfg(&binding, "wc_InitSha", "sha");
191+
check_cfg(&binding, "wc_InitSha224", "sha224");
175192
check_cfg(&binding, "wc_InitSha256", "sha256");
193+
check_cfg(&binding, "wc_InitSha384", "sha384");
176194
check_cfg(&binding, "wc_InitSha512", "sha512");
177195
check_cfg(&binding, "wc_InitSha3_224", "sha3");
178196
check_cfg(&binding, "wc_InitShake128", "shake128");

0 commit comments

Comments
 (0)