fix spelling and remove dead else statement

This commit is contained in:
JacobBarthelmeh
2022-06-03 09:21:27 -07:00
parent ad49aea17d
commit fdaf418fe0
2 changed files with 22 additions and 23 deletions

View File

@ -9626,7 +9626,8 @@ int wc_ecc_export_ex(ecc_key* key, byte* qx, word32* qxLen,
return BUFFER_E; return BUFFER_E;
} }
err = wc_export_int(&key->k, d, dLen, keySz + WC_CAAM_MAC_SZ, encType); err = wc_export_int(&key->k, d, dLen, keySz + WC_CAAM_MAC_SZ,
encType);
*dLen = keySz + WC_CAAM_MAC_SZ; *dLen = keySz + WC_CAAM_MAC_SZ;
} }
else if (encType == WC_TYPE_BLACK_KEY && else if (encType == WC_TYPE_BLACK_KEY &&
@ -9641,8 +9642,6 @@ int wc_ecc_export_ex(ecc_key* key, byte* qx, word32* qxLen,
if (caamReadPartition(key->blackKey, d, keySz + WC_CAAM_MAC_SZ) != 0) if (caamReadPartition(key->blackKey, d, keySz + WC_CAAM_MAC_SZ) != 0)
return WC_HW_E; return WC_HW_E;
} }
else {
}
*dLen = keySz + WC_CAAM_MAC_SZ; *dLen = keySz + WC_CAAM_MAC_SZ;
} }

View File

@ -299,7 +299,7 @@ int caamFindUnusedPartition()
} }
/* flag contains how the parition is set i.e CSP flag and read/write access /* flag contains how the partition is set i.e CSP flag and read/write access
* it also contains if locked * it also contains if locked
*/ */
static Error caamCreatePartition(unsigned int* page, unsigned int par, static Error caamCreatePartition(unsigned int* page, unsigned int par,
@ -371,7 +371,7 @@ CAAM_ADDRESS caamGetPartition(unsigned int part, int partSz, unsigned int flag)
err = caamCreatePartition(&part, part, CAAM_SM_CSP | CAAM_SM_SMAP_LOCK | err = caamCreatePartition(&part, part, CAAM_SM_CSP | CAAM_SM_SMAP_LOCK |
CAAM_SM_CSP | CAAM_SM_ALL_RW); CAAM_SM_CSP | CAAM_SM_ALL_RW);
if (err != Success) { if (err != Success) {
WOLFSSL_MSG("Error creating partiions for secure ecc key"); WOLFSSL_MSG("Error creating partitions for secure ecc key");
return 0; return 0;
} }
@ -529,7 +529,7 @@ int caamInitRng(struct CAAM_DEVICE* dev)
} }
if (reg & (1U << 30)) { if (reg & (1U << 30)) {
WOLFSSL_MSG("JKDKEK rng was setup using a non determinstic key"); WOLFSSL_MSG("JKDKEK rng was setup using a non deterministic key");
return 0; return 0;
} }