Skip to content

Commit b93cc66

Browse files
authored
Merge pull request #71 from JacobBarthelmeh/release
Release version 0.0.8
2 parents 5529fdc + b12e24f commit b93cc66

File tree

9 files changed

+66
-22
lines changed

9 files changed

+66
-22
lines changed

ChangeLog.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
# wolfCLU v0.0.8 (Mar 04, 2022)
2+
### Commands Added
3+
- Add rand command
4+
- Add PKCS12 parsing support and command
5+
- Add a basic s_client command for simple TLS client connections
6+
- Add support for x509 verify command
7+
- Add initial rsa command support
8+
- Add CRL verify command
9+
- Add ca command
10+
- Add dsaparam command
11+
- Add sha hash commands (sha256, sha384, sha512)
12+
- Add dhparam command
13+
14+
### Fixes and Enhancements
15+
- Support for parsing multiple organization names with conf file
16+
- Set the default certificate request version to 3
17+
- Add print out of private key to PKEY command
18+
- Added support for -nosalt option
19+
- Fix for RSA free with dgst command
20+
- Testing with FIPS 140-3 wolfCrypt
21+
- Add -subj support to req command
22+
- Fix for -base64 with enc
23+
- Fix for piping errors to stderr instead of stdout
24+
- Removed testing-certs directory in favor of certs directory
25+
- Fix for handling large file sizes with dgst and hash command
26+
- Expanded req command to handle -text, -noout, -extensions and -verify
27+
- Expanded x509 command to handle -subject, -issuer, -serial, -dates, -email, -fingerprint, -purpose, -hash
28+
- Added -text support to ecparam command
29+
- Added support for -sign with dgst command
30+
- Tied in github actions for continuous integration testing
31+
- Added support for creating encrypted private keys with -newkey
32+
33+
134
# wolfCLU v0.0.6 (Nov 09, 2021)
235

336
- Add ecparam for ECC key generation with parameters
@@ -8,7 +41,7 @@
841
- Add support for parsing a config file when creating a certificate or CSR
942
- Refactor all file calls to use XFILE wrapping
1043
- Refactor strncmp and other system calls to use the X* wrapping
11-
- Formating on if else newlines throughout wolfCLU
44+
- Formatting on if else newlines throughout wolfCLU
1245
- Change the name of bundle created with 'make dist'
1346
- Add some error print outs and checking with FIPS builds
1447
- Add check for warnings (Wall) as errors and the resulting fixes

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#requires user to have AutoConf version 2.63 or greater.
1111
AC_PREREQ([2.63])
1212

13-
AC_INIT([wolfclu], [0.0.7], [http://www.wolfssl.com])
13+
AC_INIT([wolfclu], [0.0.8], [http://www.wolfssl.com])
1414

1515
#a helpful directory to keep clutter out of root
1616
AC_CONFIG_AUX_DIR([build-aux])

src/dh/clu_dh.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ int wolfCLU_DhParamSetup(int argc, char** argv)
106106
case WOLFCLU_GEN_KEY:
107107
genKey = 1;
108108
break;
109-
109+
110110
case WOLFCLU_CHECK:
111111
check = 1;
112112
break;
@@ -271,7 +271,7 @@ int wolfCLU_DhParamSetup(int argc, char** argv)
271271
if (outBuf != NULL)
272272
XFREE(outBuf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
273273
}
274-
274+
275275
/* Check if parameters are valid */
276276
if(ret == WOLFCLU_SUCCESS && check){
277277
byte p[WOLFSSL_MAX_DH_BITS/8];
@@ -282,7 +282,7 @@ int wolfCLU_DhParamSetup(int argc, char** argv)
282282
p_len = (word32)sizeof(p);
283283
q_len = (word32)sizeof(q);
284284
g_len = (word32)sizeof(g);
285-
285+
286286
/* Export DH parameters */
287287
if (wc_DhExportParamsRaw(&dh, p, &p_len, q, &q_len, g, &g_len) != 0) {
288288
WOLFCLU_LOG(WOLFCLU_E0, "Failed to export DH params");
@@ -302,9 +302,9 @@ int wolfCLU_DhParamSetup(int argc, char** argv)
302302
/* print out the dh key */
303303
if (ret == WOLFCLU_SUCCESS && genKey) {
304304
byte priv[WOLFSSL_MAX_DH_BITS/8];
305-
byte pub[WOLFSSL_MAX_DH_BITS/8];
305+
byte pub[WOLFSSL_MAX_DH_BITS/8];
306306
word32 privSz = (word32)sizeof(priv);
307-
word32 pubSz = (word32)sizeof(pub);
307+
word32 pubSz = (word32)sizeof(pub);
308308
byte* outBuf = NULL;
309309
byte* pem = NULL;
310310
word32 outBufSz = 0;
@@ -315,13 +315,12 @@ int wolfCLU_DhParamSetup(int argc, char** argv)
315315
ret = WOLFCLU_FATAL_ERROR;
316316
}
317317

318-
/* get DER size (param has p,q,g and key has p,q,g,y,x) */
319-
if (wc_DhParamsToDer(&dh, NULL, &outBufSz) != LENGTH_ONLY_E) {
320-
WOLFCLU_LOG(WOLFCLU_E0, "Unable to get output buffer size");
321-
ret = WOLFCLU_FATAL_ERROR;
322-
}
323-
else {
324-
ret = WOLFCLU_SUCCESS;
318+
if (ret == WOLFCLU_SUCCESS) {
319+
/* get DER size (param has p,q,g and key has p,q,g,y,x) */
320+
if (wc_DhParamsToDer(&dh, NULL, &outBufSz) != LENGTH_ONLY_E) {
321+
WOLFCLU_LOG(WOLFCLU_E0, "Unable to get output buffer size");
322+
ret = WOLFCLU_FATAL_ERROR;
323+
}
325324
}
326325

327326
if (ret == WOLFCLU_SUCCESS) {

src/genkey/clu_genkey.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void wolfCLU_EcparamPrintOID(WOLFSSL_BIO* out, WOLFSSL_EC_KEY* key,
278278
if (fmt == PEM_FORM) {
279279
byte* base64 = NULL;
280280
word32 base64Sz;
281-
281+
282282
if (wolfSSL_BIO_write(out, header, (int)XSTRLEN(header)) <= 0) {
283283
ret = WOLFCLU_FATAL_ERROR;
284284
}
@@ -326,6 +326,7 @@ void wolfCLU_EcparamPrintOID(WOLFSSL_BIO* out, WOLFSSL_EC_KEY* key,
326326
if (objOID != NULL) {
327327
XFREE(objOID, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
328328
}
329+
(void)ret;
329330
}
330331

331332
WOLFSSL_EC_KEY* wolfCLU_GenKeyECC(char* name)
@@ -358,6 +359,12 @@ WOLFSSL_EC_KEY* wolfCLU_GenKeyECC(char* name)
358359
ret = WOLFCLU_FATAL_ERROR;
359360
}
360361
}
362+
363+
if (ret != WOLFCLU_SUCCESS) {
364+
wolfSSL_EC_KEY_free(key);
365+
key = NULL;
366+
}
367+
361368
return key;
362369
}
363370
#endif /* HAVE_ECC */

src/pkey/clu_pkey.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ static int wolfCLU_DerToEncryptedPEM(WOLFSSL_BIO* bio, byte* key, word32 keySz,
194194
/* convert to PEM format and output */
195195
if (ret == WOLFCLU_SUCCESS) {
196196
pemBufSz = wolfCLU_KeyDerToPem(out, outSz, &pemBuf,
197-
PKCS8_ENC_PRIVATEKEY_TYPE, DYNAMIC_TYPE_PUBLIC_KEY);
197+
PKCS8_ENC_PRIVATEKEY_TYPE, DYNAMIC_TYPE_PRIVATE_KEY);
198198
if (pemBufSz <= 0) {
199199
ret = WOLFCLU_FATAL_ERROR;
200200
}
@@ -206,6 +206,9 @@ static int wolfCLU_DerToEncryptedPEM(WOLFSSL_BIO* bio, byte* key, word32 keySz,
206206
}
207207
}
208208

209+
if (pemBuf != NULL) {
210+
XFREE(pemBuf, HEAP_HINT, DYNAMIC_TYPE_PRIVATE_KEY);
211+
}
209212
if (out != NULL) {
210213
XFREE(out, heap, DYNAMIC_TYPE_TMP_BUFFER);
211214
}

src/x509/clu_request_setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,7 @@ int wolfCLU_requestSetup(int argc, char** argv)
970970
ret = wolfCLU_pKeyPEMtoPriKey(keyOutBio, pkey);
971971
}
972972
}
973+
wolfSSL_BIO_free(keyOutBio);
973974
}
974975

975976
(void)algCheck;

tests/genkey_sign_ver/genkey-sign-ver-test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626

2727
cleanup_genkey_sign_ver(){
28+
rm -f ecckey
2829
rm ecckey.priv
2930
rm ecckey.pub
3031
rm edkey.priv

tests/x509/x509-process-test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ run3() {
119119
test.pem tmp.pem
120120
rm -f test.pem tmp.pem
121121
echo "TEST 3.b"
122-
./wolfssl x509 -inform pem -in certs/ca-cert.pem -outform der -out test.der
123-
cert_test_case "-inform pem -outform der -in certs/ca-cert.pem -out tmp.der" \
124-
test.der tmp.der
125-
rm -f test.pem tmp.pem
122+
./wolfssl x509 -inform pem -in certs/ca-cert.pem -outform der -out x509_test.der
123+
cert_test_case "-inform pem -outform der -in certs/ca-cert.pem -out x509_tmp.der" \
124+
x509_test.der x509_tmp.der
125+
rm -f x509_test.pem x509_tmp.pem
126126
echo "TEST 3.c"
127127
test_case "-in certs/server-cert.pem -subject -noout"
128128
EXPECTED="/C=US/ST=Montana/L=Bozeman/O=wolfSSL/OU=Support/CN=www.wolfssl.com/[email protected]"

wolfclu/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
extern "C" {
2727
#endif
2828

29-
#define CLUWOLFSSL_VERSION_STRING "0.0.7"
30-
#define CLUWOLFSSL_VERSION_HEX 0x00000007
29+
#define CLUWOLFSSL_VERSION_STRING "0.0.8"
30+
#define CLUWOLFSSL_VERSION_HEX 0x00000008
3131

3232
#ifdef __cplusplus
3333
}

0 commit comments

Comments
 (0)