Skip to content

Commit 78fcf03

Browse files
committed
Added ChangeLog.md in prep for v1.0 tag. Minor typo/line length cleanups.
1 parent 12d604b commit 78fcf03

File tree

11 files changed

+153
-29
lines changed

11 files changed

+153
-29
lines changed

ChangeLog.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# wolfKeyMgr v1.0 (Sep 1, 2021)
2+
* Support for Curve25519 and Curve448 in key manager.
3+
* Support for Curve25519 in middle-box decryption.
4+
* Support for loading all supported ephemeral keys.
5+
* Refactor common ETSI client test code.
6+
* Improved middle-box decryption to better handle concurrent keys of different formats.
7+
* Improved handling for not compiled in cases.
8+
* Fix for ./configure config summary.
9+
10+
# wolfKeyMgr v0.11 (Aug 4, 2021)
11+
* Fix to use fingerprint to find keys.
12+
* Improved the fingerprint calculation code and added hash.
13+
* Added multiple server support using `contextStr`.
14+
* Add unit test to `make check`.
15+
* Improve `src/wolfkeymgr` exit documentation.
16+
* Added example output for demo to `README.md`.
17+
18+
# wolfKeyMgr v0.10 (Jul 30, 2021)
19+
* Added secure vault for key storage using RSA and AES GCM.
20+
* Added support for multiple active key types.
21+
* Added key find support.
22+
* Added middlebox decrypt PCAP replay support.
23+
* Added key max use count to limit uses of an ephemeral key.
24+
* Added computed "name" based on public key for ETSI key.
25+
* Added API unit test framework.
26+
* Added `--enable-vault=clear` option to optionally disable vault encryption.
27+
* Fix to not start listeners until key/cert/vault setup.
28+
* Fixed issue with worker threads generating new keys and not using existing ones.
29+
* Fix for https example server listen error handling.
30+
* Fixed gets with newline.
31+
* Fix for middlebox/decrypt default loopback interface selection. Default to first interface (1).
32+
* Fix for request / response collision. Centralize the max buffer sizes.
33+
* Moved key gen into ETSI module.
34+
* Rename `wolfEtsiKeyGet` to `wolfEtsiKeyGetPtr`.
35+
* Refactor to support multiple active key types.
36+
* Improved printing of public key name in logs.
37+
* Improved error for key generation failure.
38+
* Improve libevent and browser issue documentation.
39+
* Improve middle-box decryption error handling for permissions issue.
40+
* Cleanups to remove `WOLFKM_ETSI_SERVICE` and `disableMutalAuth`.
41+
* Move the ETSI documentation into `docs/README.md`. Remove copies of specs and use links.
42+
* Cleanup ETSI service configuration and defaults.
43+
44+
# wolfKeyMgr v0.9 (Jun 15, 2021)
45+
* Added HTTPS server / client for local testing.
46+
* Added middle-box decryption example (uses the wolfSSL sniffer module).
47+
* Fixes for HTTP engine parsing.
48+
* Improve socket select error reporting for timeout vs. error.
49+
* Added ETSI client push support.
50+
* Added ability to specify default key type for Key Manager.
51+
* Added better debug printing for key used.
52+
53+
# wolfKeyMgr v0.8 (May 24, 2021)
54+
* Added DH key support.
55+
* Added HTTP support for fingerprints, groups and contextstr.
56+
* Added ETSI client key argument (`-K`).
57+
* Fixes for URI encoding.
58+
* Refactor of service to support more key types.
59+
* Refactor of internal structure names to leading upper case.
60+
* Removed the "noTLS" build option.
61+
62+
# wolfKeyMgr v0.7 (May 17, 2021)
63+
* Fix for HTTP header encode/decode conflict with variable `i`.
64+
* Fix for HTTP server response parsing with no null termination issue.
65+
* Added expires data to HTTP response.
66+
* Added ETSI client GET caching.
67+
* Added etsi_client `-r` support for GET (test caching).
68+
69+
# wolfKeyMgr v0.6 (May 12, 2021)
70+
* Fix for ETSI client to properly detect socket error with non-blocking connect.
71+
* Added EtsiKey struct and modified the wolfEtsiClientGet() API.
72+
* Implemented some ETSI key helpers.
73+
* Added stub API's for future push/find with callbacks.
74+
* Progress with handling key expiration data and other key types.
75+
76+
# wolfKeyMgr v0.5 (May 10, 2021)
77+
* Fix for missing "make dist" files.
78+
* Fix possible seg fault if pid creation failed.
79+
* Fixed issue with forcful close of listen socket causing loop.
80+
* Added missing files for cert generation.
81+
* Added fingerprint to push syntax.
82+
* Added TODO item for key expires.
83+
* Remove certservice requirement.
84+
* Cleanup unused `KeyManager_t`.
85+
* Do not track and ignore options.h.
86+
* Spelling fixes.
87+
88+
# wolfKeyMgr v0.4 (Mar 1, 2021)
89+
* Fix for stray `wolfSSL_CTX_free`.
90+
* Added mutex protection on ETSI client.
91+
* Added URL decoding to HTTP module.
92+
* Added SIGPIPE ignore to ETSI client.
93+
* Added test key/certificate for Apache HTTPD.
94+
* Added "-r" argument for key manager for the key update interval.
95+
96+
# wolfKeyMgr v0.3 (Feb 24, 2021)
97+
* Added TLS mutual authentication.
98+
* Improved logging and flushing of logging on SIGINT/SIGTERM.
99+
* Added SIGTERM support.
100+
* Improved README.md example steps.
101+
* Fixes for libwolfkeymgr headers for shared use.
102+
* Fix for missing shared library header files. Stop tracking options.h.
103+
104+
# wolfKeyMgr v0.2 (Feb 19, 2021)
105+
* Fixes for threading.
106+
* Added libwolfkeymgr for general use API's.
107+
* Added ETSI client API's.
108+
* Added full HTTP server/client support.
109+
* Abstraction of all modules to library for generic socket, TLS, HTTP and ETSI functions.
110+
* Added non-blocking support for client.
111+
* Added version header.
112+
* Improvement to performance.
113+
114+
# wolfKeyMgr v0.1 - Initial version (Feb 15, 2021)
115+
* Supports ETSI (Enterprise Transport Security) key manager for Get and Push of TLS static ephemeral keys.
116+
* Supports Certificate Signing (enabled with `--enable-certsvc`) disabled by default.

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ DISTCLEANFILES+= aminclude.am
2424

2525
ACLOCAL_AMFLAGS = -I m4
2626
EXTRA_DIST += README.md
27+
EXTRA_DIST += ChangeLog.md
2728
EXTRA_DIST += LICENSE
2829

2930
include src/include.am

examples/https/client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int https_client_test(int argc, char** argv)
4040
wolfSSL_Init();
4141

4242
/* log setup */
43-
//wolfSSL_Debugging_ON();
43+
/* wolfSSL_Debugging_ON(); */
4444
wolfKeyMgr_SetLogFile(NULL, 0, WOLFKM_LOG_DEBUG);
4545

4646
ctx = wolfTlsClientNew();

examples/https/server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ int https_server_test(int argc, char** argv)
7171
wolfSSL_Init();
7272

7373
/* log setup */
74-
//wolfSSL_Debugging_ON();
74+
/* wolfSSL_Debugging_ON(); */
7575
wolfKeyMgr_SetLogFile(NULL, 0, WOLFKM_LOG_DEBUG);
7676

7777
ctx = wolfTlsServerNew();

examples/test_config.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ extern "C" {
3535
#define ETSI_TEST_TIMEOUT_MS 2
3636
#define ETSI_TEST_KEY_TYPE ETSI_KEY_TYPE_SECP256R1
3737

38-
/* example certificate and key for mutual authentication to key manager */
39-
/* see ./certs/test-cert.sh for generation and signing */
38+
/* Example certificate and key for mutual authentication to key manager.
39+
* See ./certs/test-cert.sh for generation and signing. */
4040
#define ETSI_TEST_CLIENT_CA "certs/ca-cert.pem"
4141
#define ETSI_TEST_CLIENT_KEY "certs/client-key.pem"
4242
#define ETSI_TEST_CLIENT_PASS "wolfssl"
@@ -48,8 +48,8 @@ extern "C" {
4848
#define HTTPS_TEST_TIMEOUT_SEC 30
4949
#define HTTPS_TEST_MAX_DATA 512
5050

51-
/* see ./certs/test-cert.sh for generation and signing */
52-
/* this is a self signed test cert server presents */
51+
/* See ./certs/test-cert.sh for generation and signing.
52+
* This is a self signed test cert the server can present. */
5353
#define HTTPS_TEST_CA "certs/test-cert.pem"
5454
#define HTTPS_TEST_CERT "certs/test-cert.pem"
5555
#define HTTPS_TEST_KEY "certs/test-key.pem"

src/sock_mgr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ static void OurListenerError(struct evconnlistener* listener, void* ptr)
164164
}
165165
/* for invalid argument disable listener */
166166
if (err == EINVAL) {
167-
/* this can happen if ss -kill socket is run */
168-
/* otherwise causes libevent error callback loop */
167+
/* this can happen if ss -kill socket is run,
168+
* otherwise causes libevent error callback loop */
169169
evconnlistener_disable(listener);
170170
}
171171
}
@@ -390,7 +390,7 @@ static void WorkerExit(void* arg)
390390

391391
/* put per thread stats into global stats */
392392
/* do this before closing active connections,
393-
so we can see how many were connected */
393+
* so we can see how many were connected */
394394
pthread_mutex_lock(&svc->globalStats.lock);
395395
svc->globalStats.totalConnections += threadStats.totalConnections;
396396
svc->globalStats.completedRequests += threadStats.completedRequests;

src/svc_etsi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ typedef struct EtsiSvcCtx {
5454
} EtsiSvcCtx;
5555
static EtsiSvcCtx gSvcCtx;
5656

57-
/* the top level service */
57+
/* The top level service */
5858
static SvcInfo gEtsiService = {
5959
.desc = "ETSI",
6060

@@ -347,7 +347,7 @@ static int wolfEtsiSvc_DoResponse(SvcConn* conn)
347347
return ret;
348348
}
349349

350-
/* the key request handler */
350+
/* The key request handler */
351351
int wolfEtsiSvc_DoRequest(SvcConn* conn)
352352
{
353353
int ret = 0;

tests/unit_tests.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* api.c
1+
/* unit_tests.c
22
*
33
* Copyright (C) 2006-2021 wolfSSL Inc.
44
*
@@ -62,7 +62,6 @@ static int vault_test(void)
6262
wolfVaultCtx* ctx = NULL;
6363
wolfVaultItem item;
6464
const char* testFile = "vault.bin";
65-
//const char* testPass = "password";
6665
struct vaultTestItems {
6766
word32 type;
6867
const char* name;

wolfkeymgr/mod_etsi.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ typedef struct EtsiKey {
124124
} EtsiKey;
125125

126126
/* Key callback Function */
127-
/* if return code is not zero then socket will be closed */
127+
/* If return code is not zero then socket will be closed */
128128
typedef int (*EtsiKeyCallbackFunc)(EtsiClientCtx* client, EtsiKey* key, void* cbCtx);
129129

130130
/* ETSI Client API's */
131-
/* allocate new ETSI client context */
131+
/* Allocate new ETSI client context */
132132
WOLFKM_API EtsiClientCtx* wolfEtsiClientNew(void);
133133

134134
/* Setup the TLS mutual authentication key/certificate for accessing the ETSI Key Manager */
@@ -160,8 +160,8 @@ WOLFKM_API int wolfEtsiClientGet(EtsiClientCtx* client, EtsiKey* key,
160160
EtsiKeyType keyType, const char* fingerprint, const char* contextStr,
161161
int timeoutSec);
162162

163-
/* this call will be blocking until socket failure or callback non-zero return */
164-
/* when server pushes new keys the callback will trigger with EtsiKey populated */
163+
/* This call will be blocking until socket failure or callback non-zero return
164+
* when server pushes new keys the callback will trigger with EtsiKey populated */
165165
WOLFKM_API int wolfEtsiClientPush(EtsiClientCtx* client, EtsiKeyType keyType,
166166
const char* fingerprint, const char* contextStr,
167167
EtsiKeyCallbackFunc cb, void* cbCtx);
@@ -178,8 +178,8 @@ WOLFKM_API int wolfEtsiClientClose(EtsiClientCtx* client);
178178
WOLFKM_API void wolfEtsiClientFree(EtsiClientCtx* client);
179179

180180
/* ETSI Key API's */
181-
/* allocate ETSI key dynamically from heap */
182-
/* The EtsiKey can come from stack, but must be memset to zero */
181+
/* Allocate ETSI key dynamically from heap.
182+
* The EtsiKey can come from stack, but must be memset to zero. */
183183
WOLFKM_API EtsiKey* wolfEtsiKeyNew(void);
184184
/* Returns the wolf PK type (enum wc_PkType) */
185185
WOLFKM_API int wolfEtsiKeyGetPkType(EtsiKey* key);
@@ -193,9 +193,9 @@ WOLFKM_API int wolfEtsiKeyLoadSSL(EtsiKey* key, WOLFSSL* ssl);
193193
WOLFKM_API int wolfEtsiKeyGetPtr(EtsiKey* key, byte** response, word32* responseSz);
194194
/* Generate a new key */
195195
WOLFKM_API int wolfEtsiKeyGen(EtsiKey* key, EtsiKeyType keyType, WC_RNG* rng);
196-
/* print ETSI key data - for debugging / testing */
196+
/* Print ETSI key data - for debugging / testing */
197197
WOLFKM_API void wolfEtsiKeyPrint(EtsiKey* key);
198-
/* release ETSI key resources */
198+
/* Release ETSI key resources */
199199
WOLFKM_API void wolfEtsiKeyFree(EtsiKey* key);
200200

201201
WOLFKM_API const char* wolfEtsiKeyNamedGroupStr(EtsiKey* key);
@@ -208,7 +208,8 @@ WOLFKM_API int wolfEtsiCalcTlsFingerprint(EtsiKeyType keyType,
208208
/* Build public name for key */
209209
WOLFKM_API int wolfEtsiKeyComputeName(EtsiKey* key);
210210

211-
/* these are required if using multiple threads sharing the wolfSSL library for init mutex protection */
211+
/* These are required if using multiple threads sharing the wolfSSL library
212+
* for init mutex protection */
212213
WOLFKM_API int wolfEtsiClientInit(void);
213214
WOLFKM_API void wolfEtsiClientCleanup(void);
214215

wolfkeymgr/mod_vault.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,31 @@ typedef struct wolfVaultItem {
5454
word32 dataSz;
5555
time_t timestamp;
5656
byte* data; /* always dynamic - free using wolfVaultFreeItem */
57-
byte name[WOLFKM_VAULT_NAME_MAX_SZ]; /* name is hash of public key or leading bits from it */
57+
byte name[WOLFKM_VAULT_NAME_MAX_SZ]; /* name is hash of public key or
58+
* leading bits from it */
5859
} wolfVaultItem;
5960

6061
/* open vault file */
6162
WOLFKM_API int wolfVaultOpen(wolfVaultCtx** ctx, const char* file);
6263

63-
/* key: the AES key to use for encryption/decryption, keyEnc: optional data to store in vault header */
64-
typedef int (*VaultAuthCbFunc)(wolfVaultCtx* ctx, byte* key, word32 keySz, byte* keyEnc, word32 keyEncSz, void* cbCtx);
64+
/* key: the AES key to use for encryption/decryption, keyEnc: optional data to
65+
* store in vault header */
66+
typedef int (*VaultAuthCbFunc)(wolfVaultCtx* ctx, byte* key, word32 keySz,
67+
byte* keyEnc, word32 keyEncSz, void* cbCtx);
6568
/* setup authentication callback to get encryption key */
6669
WOLFKM_API int wolfVaultAuth(wolfVaultCtx* ctx, VaultAuthCbFunc cb, void* cbCtx);
6770

6871
/* add item to vault */
69-
WOLFKM_API int wolfVaultAdd(wolfVaultCtx* ctx, word32 type, const byte* name, word32 nameSz, const byte* data, word32 dataSz);
72+
WOLFKM_API int wolfVaultAdd(wolfVaultCtx* ctx, word32 type, const byte* name,
73+
word32 nameSz, const byte* data, word32 dataSz);
7074
/* get copy of item from vault */
71-
WOLFKM_API int wolfVaultGet(wolfVaultCtx* ctx, wolfVaultItem* item, word32 type, const byte* name, word32 nameSz);
75+
WOLFKM_API int wolfVaultGet(wolfVaultCtx* ctx, wolfVaultItem* item, word32 type,
76+
const byte* name, word32 nameSz);
7277
/* free a wolfVaultItem structure */
7378
WOLFKM_API int wolfVaultFreeItem(wolfVaultItem* item);
7479
/* delete a single item from the vault */
75-
WOLFKM_API int wolfVaultDelete(wolfVaultCtx* ctx, word32 type, const byte* name, word32 nameSz);
80+
WOLFKM_API int wolfVaultDelete(wolfVaultCtx* ctx, word32 type, const byte* name,
81+
word32 nameSz);
7682
/* archive items older than specified date from vault */
7783
WOLFKM_API int wolfVaultArchive(wolfVaultCtx* ctx, word32 timestamp);
7884
/* close vault file */

0 commit comments

Comments
 (0)