Skip to content

Commit bc35b82

Browse files
authored
Merge pull request #67 from SparkiDev/params_get_uint_fix
Params get uint: fix setting 'set'
2 parents b89abe4 + cb5c00b commit bc35b82

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ sudo make install
7171
git clone https://github.com/wolfssl/wolfssl.git
7272
cd wolfssl
7373
./autogen.sh
74-
./configure --enable-opensslcoexist --enable-cmac --enable-keygen --enable-sha --enable-des3 --enable-aesctr --enable-aesccm --enable-x963kdf --enable-compkey CPPFLAGS="-DHAVE_AES_ECB -DWOLFSSL_AES_DIRECT -DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP -DECC_MIN_KEY_SZ=192 -DHAVE_PUBLIC_FFDHE -DWOLFSSL_DH_EXTRA -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER -DRSA_MIN_SIZE=1024" --enable-certgen --enable-aeskeywrap --enable-enckeys --enable-base16
74+
./configure --enable-opensslcoexist --enable-cmac --enable-keygen --enable-sha --enable-des3 --enable-aesctr --enable-aesccm --enable-x963kdf --enable-compkey CPPFLAGS="-DHAVE_AES_ECB -DWOLFSSL_AES_DIRECT -DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP -DHAVE_PUBLIC_FFDHE -DWOLFSSL_DH_EXTRA -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER -DRSA_MIN_SIZE=1024" --enable-certgen --enable-aeskeywrap --enable-enckeys --enable-base16 --with-eccminsz=192
7575
make
7676
sudo make install
7777
```
@@ -90,6 +90,8 @@ Add `--enable-sp=yes,asm' '--enable-sp-math-all'` to use SP Integer maths. Repla
9090

9191
Remove `-DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER` and add `--enable-fips=v2` to the configure command above if building from a FIPS v2 bundle and not the git repository. Change `--enable-fips=v2` to `--enable-fips=ready` if using a FIPS Ready bundle.
9292

93+
If '--with-eccminsz=192' is not supported by wolfSSL, add '-DECC_MIN_KEY_SZ=192' to the CPPFLAGS.
94+
9395
### wolfProvider
9496

9597
```

src/wp_fips.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static long fipsChecks = WP_FIPS_CHECKS_DEFAULT;
3030
* Default FIPS checks for wolfProvider is WE_FIPS_CHECKS_DEFAULT.
3131
*
3232
* @param checksMask [in] Bitmask of FIPS checks from wolfProvider_FipsCheck
33-
* in we_fips.h.
33+
* in wp_fips.h.
3434
*/
3535
void wolfProvider_SetFipsChecks(long checksMask)
3636
{

src/wp_logging.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void wolfProv_Debugging_OFF(void)
104104
* Default logging level for wolfProv is WP_LOG_LEVEL_DEFAULT.
105105
*
106106
* @param levelMask [IN] Bitmask of logging levels from wolfProv_LogType
107-
* in we_logging.h.
107+
* in wp_logging.h.
108108
* @return 0 on success, NOT_COMPILED_IN if debugging has not been enabled.
109109
*/
110110
int wolfProv_SetLogLevel(int levelMask)
@@ -123,7 +123,7 @@ int wolfProv_SetLogLevel(int levelMask)
123123
* Default component level for wolfProv is WP_LOG_COMPONENT_DEFAULT.
124124
*
125125
* @param componentMask [IN] Bitmask of components from
126-
* wolfProv_LogComponents in we_logging.h.
126+
* wolfProv_LogComponents in wp_logging.h.
127127
* @return 0 on success, NOT_COMPILED_IN if debugging has not been enabled.
128128
*/
129129
int wolfProv_SetLogComponents(int componentMask)

src/wp_params.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,13 +554,13 @@ int wp_params_get_uint(const OSSL_PARAM* params, const char* key,
554554
const OSSL_PARAM* p;
555555

556556
if (set != NULL) {
557-
*set = 1;
557+
*set = 0;
558558
}
559559
p = OSSL_PARAM_locate_const(params, key);
560560
if ((p != NULL) && (!OSSL_PARAM_get_uint(p, val))) {
561561
ok = 0;
562562
}
563-
if (ok && (set != NULL)) {
563+
if (ok && (p != NULL) && (set != NULL)) {
564564
*set = 1;
565565
}
566566

0 commit comments

Comments
 (0)