Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Codespell test

# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: Checkout wolfProvider
uses: actions/checkout@v4

- name: Create exclude file if needed
run: |
if [ ! -f .codespellexcludelines ]; then
touch .codespellexcludelines
fi

- name: Run codespell
uses: codespell-project/actions-codespell@v2.1
with:
check_filenames: true
check_hidden: true
# Add comma separated list of words that occur multiple times that should be ignored (sorted alphabetically, case sensitive)
ignore_words_list: adin,addIn,aNULL,brunch,carryIn,chainG,ciph,cLen,cliKs,dout,emac,haveA,inCreated,inOut,inout,larg,LEAPYEAR,Merget,optionA,parm,parms,repid,rIn,userA,ser,siz,te,Te,toLen
# The exclude_file contains lines of code that should be ignored. This is useful for individual lines which have non-words that can safely be ignored.
exclude_file: '.codespellexcludelines'
# To skip files entirely from being processed, add it to the following list:
skip: '*.cproject,*.der,*.mtpj,*.pem,*.vcxproj,.git,*.launch,*.scfg,*.revoked,*.txt'

- name: Print errors
if: ${{ failure() }}
run: |
if [ -f test-suite.log ] ; then
cat test-suite.log
fi
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The quickest method is to use the `scripts/build-wolfprovider.sh` script as foll
./scripts/build-wolfprovider.sh
```

It will retreive the dependencies and compile them as necessary. To use other than the default (such as different releases) you can set various environment variables prior to calling the script:
It will retrieve the dependencies and compile them as necessary. To use other than the default (such as different releases) you can set various environment variables prior to calling the script:

```
OPENSSL_TAG=openssl-3.2.0 WOLFSSL_TAG=v5.7.2-stable WOLFPROV_DEBUG=1 scripts/build-wolfprovider.sh
Expand Down
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# autogen.sh
#
# Create configure and makfile stuff...
# Create configure and makefile stuff...
#

autoreconf --install --force --verbose
Expand Down
2 changes: 1 addition & 1 deletion include/wolfprovider/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
#define WP_RSA_DEFAULT_SALT_LEN 20

/* These values are taken from ssl.h.
* Can't include this header as it re-declares OpenSSL types.
* Can't include this header as it redeclares OpenSSL types.
*/
/* Named Groups */
enum {
Expand Down
6 changes: 3 additions & 3 deletions src/wp_aes_aead.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ typedef struct wp_AeadCtx {
/** Current state of IV/nonce. */
int ivState;

/** Initialized for encrpytion or decryption. */
/** Initialized for encryption or decryption. */
unsigned int enc:1;
/** IV/nonce has been generated. */
unsigned int ivGen:1;
Expand Down Expand Up @@ -263,7 +263,7 @@ static int wp_aead_tls_init(wp_AeadCtx* ctx, unsigned char* aad, size_t aadLen)
*
* @param [in, out] ctx AEAD context object.
* @param [in] in More AAD data.
* @parma [in] inLen Length of new AAD data.
* @param [in] inLen Length of new AAD data.
* @return 1 on success.
* @return 0 on failure.
*/
Expand Down Expand Up @@ -299,7 +299,7 @@ static int wp_aead_cache_aad(wp_AeadCtx *ctx, const unsigned char *in,
*
* @param [in, out] ctx AEAD context object.
* @param [in] in More AAD data.
* @parma [in] inLen Length of new AAD data.
* @param [in] inLen Length of new AAD data.
* @return 1 on success.
* @return 0 on failure.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/wp_aes_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ static int wp_aes_block_set_ctx_params(wp_AesBlockCtx *ctx,
* @param [in, out] ctx AES block context object.
* @param [in] kBits Number of bits in a valid key.
* @param [in] ivBits Number of bits in a valid IV. 0 indicates no IV.
* @parma [in] mode AES block mode: ECB or CBC.
* @param [in] mode AES block mode: ECB or CBC.
* @return 1 on success.
* @return 0 on failure.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/wp_aes_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ static int wp_aes_stream_doit(wp_AesStreamCtx *ctx, unsigned char *out,
#ifdef WP_HAVE_AESCFB
if (ctx->mode == EVP_CIPH_CFB_MODE) {
int rc;

XMEMCPY(&ctx->aes.reg, ctx->iv, ctx->ivLen);
if (ctx->enc) {
rc = wc_AesCfbEncrypt(&ctx->aes, out, in, (word32)inLen);
Expand Down Expand Up @@ -578,7 +578,7 @@ static int wp_aes_stream_set_ctx_params(wp_AesStreamCtx *ctx,
* @param [in, out] ctx AES stream context object.
* @param [in] kBits Number of bits in a valid key.
* @param [in] ivBits Number of bits in a valid IV. 0 indicates no IV.
* @parma [in] mode AES stream mode: CTR.
* @param [in] mode AES stream mode: CTR.
* @return 1 on success.
* @return 0 on failure.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/wp_cmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ static int wp_cmac_init(wp_CmacCtx* macCtx, const unsigned char* key,
* Update the MAC state with data.
*
* @param [in, out] macCtx CMAC context object to update.
* @parma [in] data Data to be MACed.
* @param [in] data Data to be MACed.
* @param [in] dataLen Length of data in bytes.
* @return 1 on success.
* @return 0 on failure.
Expand Down
2 changes: 1 addition & 1 deletion src/wp_des.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ static int wp_des3_block_set_ctx_params(wp_Des3BlockCtx *ctx,
* @param [in, out] ctx DES3 block context object.
* @param [in] kBits Number of bits in a valid key.
* @param [in] ivBits Number of bits in a valid IV. 0 indicates no IV.
* @parma [in] mode DES3 block mode: ECB or CBC.
* @param [in] mode DES3 block mode: ECB or CBC.
* @return 1 on success.
* @return 0 on failure.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/wp_dh_exch.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ static int wp_dh_derive_secret(wp_DhCtx* ctx, unsigned char* secret,
* Can put the DH secret through a KDF.
*
* @param [in] ctx DH key exchange context object.
* @param [out] secert Buffer to hold secret/key.
* @param [out] secret Buffer to hold secret/key.
* @param [out] secLen Length of secret/key data in bytes.
* @param [in] secSize Size of buffer in bytes.
* @return 1 on success.
Expand Down
8 changes: 4 additions & 4 deletions src/wp_dh_kmgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ static wp_Dh* wp_dh_dup(const wp_Dh *src, int selection)
* Return the DH key object taken out of the reference.
*
* @param [in, out] pDh Pointer to a DH key object.
* @parma [in] size Size of data structure that is the DH key object.
* @param [in] size Size of data structure that is the DH key object.
* Unused.
* @return NULL when no DH key object at reference.
* @return DH key object from reference on success.
Expand Down Expand Up @@ -790,8 +790,8 @@ static int wp_dh_has(const wp_Dh* dh, int selection)
/**
* Check that two DH key objects match for the components specified.
*
* @parma [in] dh1 First DH key object.
* @parma [in] dh2 Second DH key object.
* @param [in] dh1 First DH key object.
* @param [in] dh2 Second DH key object.
* @param [in] selection Parts of key to match.
* @return 1 on success.
* @return 0 on failure.
Expand Down Expand Up @@ -2565,7 +2565,7 @@ static int wp_dh_encode(wp_DhEncDecCtx* ctx, OSSL_CORE_BIO *cBio,
*
* @param [in] ctx DH encoder/decoder context object.
* @param [in] dh DH key object.
* @oaram [in] size Size of key object.
* @param [in] size Size of key object.
* @param [in] exportCb Callback to export key.
* @param [in] exportCbArg Argument to pass to callback.
* @return 1 on success.
Expand Down
8 changes: 4 additions & 4 deletions src/wp_ecc_kmgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ static wp_Ecc* wp_ecc_dup(const wp_Ecc *src, int selection)
* Return the ECC key object taken out of the reference.
*
* @param [in, out] pEcc Pointer to a ECC key object.
* @parma [in] size Size of data structure that is the ECC key object.
* @param [in] size Size of data structure that is the ECC key object.
* Unused.
* @return NULL when no ECC key object at reference.
* @return ECC key object from reference on success.
Expand Down Expand Up @@ -852,8 +852,8 @@ static int wp_ecc_has(const wp_Ecc* ecc, int selection)
/**
* Check that two ECC key objects match for the components specified.
*
* @parma [in] ecc1 First ECC key object.
* @parma [in] ecc2 Second ECC key object.
* @param [in] ecc1 First ECC key object.
* @param [in] ecc2 Second ECC key object.
* @param [in] selection Parts of key to match.
* @return 1 on success.
* @return 0 on failure.
Expand Down Expand Up @@ -2633,7 +2633,7 @@ static int wp_ecc_encode(wp_EccEncDecCtx* ctx, OSSL_CORE_BIO *cBio,
*
* @param [in] ctx ECC encoder/decoder context object.
* @param [in] ecc ECC key object.
* @oaram [in] size Size of key object.
* @param [in] size Size of key object.
* @param [in] exportCb Callback to export key.
* @param [in] exportCbArg Argument to pass to callback.
* @return 1 on success.
Expand Down
2 changes: 1 addition & 1 deletion src/wp_ecdh_exch.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static int wp_ecdh_derive_secret(wp_EcdhCtx* ctx, unsigned char* secret,
* Can put the ECDH secret through a KDF.
*
* @param [in] ctx ECDH key exchange context object.
* @param [out] secert Buffer to hold secret/key.
* @param [out] secret Buffer to hold secret/key.
* @param [out] secLen Length of secret/key data in bytes.
* @param [in] secSize Size of buffer in bytes.
* @return 1 on success.
Expand Down
2 changes: 1 addition & 1 deletion src/wp_ecdsa_sig.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ static int wp_ecdsa_verify_recover(wp_EcdsaSigCtx *ctx, const unsigned char *rou
*
* @param [in, out] ctx ECDSA signature context object.
* @param [in] mdName Name of digest.
* @param [in] mdProps Digest properites.
* @param [in] mdProps Digest properties.
* @param [in] op Signature operation being performed.
* @return 1 on success.
* @return 0 on failure.
Expand Down
4 changes: 2 additions & 2 deletions src/wp_ecx_exch.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const unsigned char wp_curve25519_order[] = {
* Can put the secret through a KDF.
*
* @param [in] ctx ECX key exchange context object.
* @param [out] secert Buffer to hold secret/key.
* @param [out] secret Buffer to hold secret/key.
* @param [out] secLen Length of secret/key data in bytes.
* @param [in] secSize Size of buffer in bytes.
* @return 1 on success.
Expand Down Expand Up @@ -295,7 +295,7 @@ const OSSL_DISPATCH wp_x25519_keyexch_functions[] = {
* Can put the secret through a KDF.
*
* @param [in] ctx ECX key exchange context object.
* @param [out] secert Buffer to hold secret/key.
* @param [out] secret Buffer to hold secret/key.
* @param [out] secLen Length of secret/key data in bytes.
* @param [in] secSize Size of buffer in bytes.
* @return 1 on success.
Expand Down
16 changes: 8 additions & 8 deletions src/wp_ecx_kmgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ static wp_Ecx* wp_ecx_dup(const wp_Ecx* src, int selection)
* Return the ECX key object taken out of the reference.
*
* @param [in, out] pEcx Pointer to a ECX key object.
* @parma [in] size Size of data structure that is the ECX key object.
* @param [in] size Size of data structure that is the ECX key object.
* Unused.
* @return NULL when no ECX key object at reference.
* @return ECX key object from reference on success.
Expand Down Expand Up @@ -610,8 +610,8 @@ static int wp_ecx_has(const wp_Ecx* ecx, int selection)
/**
* Check that two ECX key objects' private keys match.
*
* @parma [in] ecx1 First ECX key object.
* @parma [in] ecx2 Second ECX key object.
* @param [in] ecx1 First ECX key object.
* @param [in] ecx2 Second ECX key object.
* @return 1 on success.
* @return 0 on failure.
*/
Expand Down Expand Up @@ -655,8 +655,8 @@ static int wp_ecx_match_priv_key(const wp_Ecx* ecx1, const wp_Ecx* ecx2)
/**
* Check that two ECX key objects' public keys match.
*
* @parma [in] ecx1 First ECX key object.
* @parma [in] ecx2 Second ECX key object.
* @param [in] ecx1 First ECX key object.
* @param [in] ecx2 Second ECX key object.
* @return 1 on success.
* @return 0 on failure.
*/
Expand Down Expand Up @@ -702,8 +702,8 @@ static int wp_ecx_match_pub_key(const wp_Ecx* ecx1, const wp_Ecx* ecx2)
/**
* Check that two ECX key objects match for the components specified.
*
* @parma [in] ecx1 First ECX key object.
* @parma [in] ecx2 Second ECX key object.
* @param [in] ecx1 First ECX key object.
* @param [in] ecx2 Second ECX key object.
* @param [in] selection Parts of key to match.
* @return 1 on success.
* @return 0 on failure.
Expand Down Expand Up @@ -2081,7 +2081,7 @@ static int wp_ecx_encode(wp_EcxEncDecCtx* ctx, OSSL_CORE_BIO *cBio,
*
* @param [in] ctx ECX encoder/decoder context object.
* @param [in] ecx ECX key object.
* @oaram [in] size Size of key object.
* @param [in] size Size of key object.
* @param [in] exportCb Callback to export key.
* @param [in] exportCbArg Argument to pass to callback.
* @return 1 on success.
Expand Down
2 changes: 1 addition & 1 deletion src/wp_file_store.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ typedef struct wp_FileCtx {

/** Decoder context for processing the contents of the file. */
OSSL_DECODER_CTX* decCtx;
/** Properites query. */
/** Properties query. */
char* propQuery;
/** Type of data: key, certificate, CRL, ... */
int type;
Expand Down
2 changes: 1 addition & 1 deletion src/wp_gmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ static int wp_gmac_init(wp_GmacCtx* macCtx, const unsigned char* key,
* Update the MAC state with data.
*
* @param [in, out] macCtx GMAC context object to update.
* @parma [in] data Data to be MACed.
* @param [in] data Data to be MACed.
* @param [in] dataLen Length of data in bytes.
* @return 1 on success.
* @return 0 on failure.
Expand Down
2 changes: 1 addition & 1 deletion src/wp_hkdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ static int wp_hkdf_base_set_info(wp_HkdfCtx* ctx, const OSSL_PARAM params[])
unsigned char* q = ctx->info;

ctx->infoSz = 0;
/* Combine all the data in the info parametrs. */
/* Combine all the data in the info parameters. */
while (ok && ((p = OSSL_PARAM_locate_const(params,
OSSL_KDF_PARAM_INFO)) != NULL)) {
size_t sz = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/wp_hmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static int wp_hmac_init(wp_HmacCtx* macCtx, const unsigned char* key,
* Update the MAC state with data.
*
* @param [in, out] macCtx HMAC context object to update.
* @parma [in] data Data to be MACed.
* @param [in] data Data to be MACed.
* @param [in] dataLen Length of data in bytes.
* @return 1 on success.
* @return 0 on failure.
Expand Down
6 changes: 3 additions & 3 deletions src/wp_kdf_exch.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static int wp_kdf_init(wp_KdfCtx* ctx, wp_Kdf* kdf, const OSSL_PARAM params[])
* Can put the ECDH secret through a KDF.
*
* @param [in] ctx ECDH key exchange context object.
* @param [out] secert Buffer to hold secret/key.
* @param [out] secret Buffer to hold secret/key.
* @param [out] secLen Length of secret/key data in bytes.
* @param [in] secSize Size of buffer in bytes.
* @return 1 on success.
Expand Down Expand Up @@ -238,7 +238,7 @@ static const OSSL_PARAM* wp_hkdf_settable_ctx_params(wp_KdfCtx* ctx,
OSSL_PARAM_octet_string(OSSL_KDF_PARAM_SALT, NULL, 0),
OSSL_PARAM_octet_string(OSSL_KDF_PARAM_INFO, NULL, 0),
OSSL_PARAM_END
};
};
return settable_ctx_params;
}

Expand All @@ -260,7 +260,7 @@ static const OSSL_PARAM* wp_tls1_prf_settable_ctx_params(wp_KdfCtx* ctx,
OSSL_PARAM_octet_string(OSSL_KDF_PARAM_SECRET, NULL, 0),
OSSL_PARAM_octet_string(OSSL_KDF_PARAM_SEED, NULL, 0),
OSSL_PARAM_END
};
};
return settable_ctx_params;
}

Expand Down
2 changes: 1 addition & 1 deletion src/wp_logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void WOLFPROV_ENTER(int component, const char* msg)
* Log function used to record function exit. Extended for function name.
*
* @param component [IN] Component type, from wolfProv_LogComponents enum.
* @param func [IN] Name of function that exitting.
* @param func [IN] Name of function that exiting.
* @param msg [IN] Log message.
* @param ret [IN] Value that function will be returning.
*/
Expand Down
Loading