From d035cd239c9bfa10c3cd8588a3f091aee060dbf2 Mon Sep 17 00:00:00 2001 From: David Garske Date: Tue, 7 Dec 2021 11:10:50 -0800 Subject: [PATCH] Fix for a few spelling errors. Whitespace cleanup. --- examples/attestation/make_credential.c | 2 +- examples/csr/csr.c | 4 +- examples/gpio/gpio_config.c | 2 +- examples/keygen/keygen.c | 2 +- examples/nvram/include.am | 2 +- examples/nvram/{store.h => nvram.h} | 8 ++-- examples/nvram/read.c | 2 +- examples/nvram/store.c | 2 +- examples/tls/tls_client.c | 4 +- examples/tls/tls_client_notpm.c | 22 +++++----- examples/tls/tls_common.h | 16 +++---- examples/tls/tls_server.c | 4 +- examples/tpm_test_keys.c | 2 +- src/tpm2.c | 2 +- src/tpm2_param_enc.c | 2 +- src/tpm2_wrap.c | 58 +++++++++++++------------- tests/unit_tests.c | 2 +- wolftpm/tpm2.h | 8 ++-- wolftpm/tpm2_socket.h | 2 +- wolftpm/tpm2_types.h | 8 ++-- wolftpm/tpm2_wrap.h | 4 +- 21 files changed, 79 insertions(+), 79 deletions(-) rename examples/nvram/{store.h => nvram.h} (91%) diff --git a/examples/attestation/make_credential.c b/examples/attestation/make_credential.c index 26c3171..2aa952b 100644 --- a/examples/attestation/make_credential.c +++ b/examples/attestation/make_credential.c @@ -147,7 +147,7 @@ int TPM2_MakeCredential_Example(void* userCtx, int argc, char *argv[]) if (fp != XBADFILE) { size_t nameReadSz = XFREAD((BYTE*)&name, 1, sizeof(name), fp); printf("Read AK Name digest %s\n", - nameReadSz == sizeof(name) ? "success" : "failed"); + nameReadSz == sizeof(name) ? "success" : "failed"); XFCLOSE(fp); } #endif diff --git a/examples/csr/csr.c b/examples/csr/csr.c index eb2e5b8..e39a9fe 100644 --- a/examples/csr/csr.c +++ b/examples/csr/csr.c @@ -24,8 +24,8 @@ #include #if !defined(WOLFTPM2_NO_WRAPPER) && !defined(WOLFTPM2_NO_WOLFCRYPT) && \ - defined(WOLFSSL_CERT_REQ) && \ - (defined(WOLF_CRYPTO_DEV) || defined(WOLF_CRYPTO_CB)) + defined(WOLFSSL_CERT_REQ) && \ + (defined(WOLF_CRYPTO_DEV) || defined(WOLF_CRYPTO_CB)) #include #include diff --git a/examples/gpio/gpio_config.c b/examples/gpio/gpio_config.c index 1e68158..2d2741f 100644 --- a/examples/gpio/gpio_config.c +++ b/examples/gpio/gpio_config.c @@ -105,7 +105,7 @@ int TPM2_GPIO_Config_Example(void* userCtx, int argc, char *argv[]) goto exit_badargs; } /* Check if mode is for GPIO Input to perform extra config step */ - if (gpioMode >= TPM_GPIO_MODE_INPUT_MIN && + if (gpioMode >= TPM_GPIO_MODE_INPUT_MIN && gpioMode <= TPM_GPIO_MODE_INPUT_MAX) { /* GPIO Input mode */ gpioInput = 1; diff --git a/examples/keygen/keygen.c b/examples/keygen/keygen.c index 7e57364..ff6ac69 100644 --- a/examples/keygen/keygen.c +++ b/examples/keygen/keygen.c @@ -47,7 +47,7 @@ static void usage(void) { printf("Expected usage:\n"); printf("./examples/keygen/keygen [keyblob.bin] [-ecc/-rsa/-sym] [-t] [-aes/xor] [-eh] [-pem]\n"); - printf("* -pem: Store the primary and child public keys as PEM formated files\n"); + printf("* -pem: Store the primary and child public keys as PEM formatted files\n"); printf("\t child public key filename: ak.pem or key.pem\n"); printf("\t primary public key filename: ek.pem or srk.pem\n"); printf("* -eh: Create keys under the Endorsement Hierarchy (EK)\n"); diff --git a/examples/nvram/include.am b/examples/nvram/include.am index 7de6dcd..29bae1c 100644 --- a/examples/nvram/include.am +++ b/examples/nvram/include.am @@ -2,7 +2,7 @@ # All paths should be given relative to the root if BUILD_EXAMPLES -noinst_HEADERS += examples/nvram/store.h +noinst_HEADERS += examples/nvram/nvram.h noinst_PROGRAMS += examples/nvram/store examples_nvram_store_SOURCES = examples/nvram/store.c \ diff --git a/examples/nvram/store.h b/examples/nvram/nvram.h similarity index 91% rename from examples/nvram/store.h rename to examples/nvram/nvram.h index 7a14a9f..07ae335 100644 --- a/examples/nvram/store.h +++ b/examples/nvram/nvram.h @@ -1,4 +1,4 @@ -/* store.h +/* nvram.h * * Copyright (C) 2006-2021 wolfSSL Inc. * @@ -19,8 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef _STORE_H_ -#define _STORE_H_ +#ifndef _NVRAM_EXAMPLE_H_ +#define _NVRAM_EXAMPLE_H_ #ifdef __cplusplus extern "C" { @@ -33,4 +33,4 @@ int TPM2_NVRAM_Read_Example(void* userCtx, int argc, char *argv[]); } /* extern "C" */ #endif -#endif /* _Store_H_ */ +#endif /* _NVRAM_EXAMPLE_H_ */ diff --git a/examples/nvram/read.c b/examples/nvram/read.c index ec2c286..56125c7 100644 --- a/examples/nvram/read.c +++ b/examples/nvram/read.c @@ -28,7 +28,7 @@ #include -#include +#include #include #include #include diff --git a/examples/nvram/store.c b/examples/nvram/store.c index 5be80ed..e37ad33 100644 --- a/examples/nvram/store.c +++ b/examples/nvram/store.c @@ -28,7 +28,7 @@ #include -#include +#include #include #include #include diff --git a/examples/tls/tls_client.c b/examples/tls/tls_client.c index f5dcb72..81e6a68 100644 --- a/examples/tls/tls_client.c +++ b/examples/tls/tls_client.c @@ -24,8 +24,8 @@ #include #if !defined(WOLFTPM2_NO_WRAPPER) && !defined(WOLFTPM2_NO_WOLFCRYPT) && \ - !defined(NO_WOLFSSL_CLIENT) && \ - (defined(WOLF_CRYPTO_DEV) || defined(WOLF_CRYPTO_CB)) + !defined(NO_WOLFSSL_CLIENT) && \ + (defined(WOLF_CRYPTO_DEV) || defined(WOLF_CRYPTO_CB)) #include #include diff --git a/examples/tls/tls_client_notpm.c b/examples/tls/tls_client_notpm.c index 948e6d9..5277d33 100644 --- a/examples/tls/tls_client_notpm.c +++ b/examples/tls/tls_client_notpm.c @@ -122,21 +122,21 @@ int TLS_ClientArgs(int argc, char *argv[]) wolfSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_PEER, myVerify); /* Load CA Certificates from Buffer */ - #if !defined(NO_RSA) && !defined(TLS_USE_ECC) - if (wolfSSL_CTX_load_verify_buffer(ctx, + #if !defined(NO_RSA) && !defined(TLS_USE_ECC) + if (wolfSSL_CTX_load_verify_buffer(ctx, ca_cert_der_2048, sizeof_ca_cert_der_2048, WOLFSSL_FILETYPE_ASN1) != WOLFSSL_SUCCESS) { - printf("Error loading ca_cert_der_2048 DER cert\n"); - goto exit; - } - #elif defined(HAVE_ECC) - if (wolfSSL_CTX_load_verify_buffer(ctx, + printf("Error loading ca_cert_der_2048 DER cert\n"); + goto exit; + } + #elif defined(HAVE_ECC) + if (wolfSSL_CTX_load_verify_buffer(ctx, ca_ecc_cert_der_256, sizeof_ca_ecc_cert_der_256, WOLFSSL_FILETYPE_ASN1) != WOLFSSL_SUCCESS) { - printf("Error loading ca_ecc_cert_der_256 DER cert\n"); - goto exit; - } - #endif + printf("Error loading ca_ecc_cert_der_256 DER cert\n"); + goto exit; + } + #endif #endif #ifndef NO_TLS_MUTUAL_AUTH diff --git a/examples/tls/tls_common.h b/examples/tls/tls_common.h index b07336d..e2beb6c 100644 --- a/examples/tls/tls_common.h +++ b/examples/tls/tls_common.h @@ -321,15 +321,15 @@ static inline void CloseAndCleanupSocket(SockIoCbCtx* sockIoCtx) } } #else - /* Provide you own socket implementation code */ - int SockIORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx); - int SockIOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx); - int SetupSocketAndConnect(SockIoCbCtx* sockIoCtx, const char* host, - word32 port); - void CloseAndCleanupSocket(SockIoCbCtx* sockIoCtx); + /* Provide you own socket implementation code */ + int SockIORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx); + int SockIOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx); + int SetupSocketAndConnect(SockIoCbCtx* sockIoCtx, const char* host, + word32 port); + void CloseAndCleanupSocket(SockIoCbCtx* sockIoCtx); - int SetupSocketAndListen(SockIoCbCtx* sockIoCtx, word32 port); - int SocketWaitClient(SockIoCbCtx* sockIoCtx); + int SetupSocketAndListen(SockIoCbCtx* sockIoCtx, word32 port); + int SocketWaitClient(SockIoCbCtx* sockIoCtx); #endif /* !WOLFSSL_USER_IO */ /******************************************************************************/ diff --git a/examples/tls/tls_server.c b/examples/tls/tls_server.c index 75628bb..1b9f198 100644 --- a/examples/tls/tls_server.c +++ b/examples/tls/tls_server.c @@ -24,8 +24,8 @@ #include #if !defined(WOLFTPM2_NO_WRAPPER) && !defined(WOLFTPM2_NO_WOLFCRYPT) && \ - !defined(NO_WOLFSSL_SERVER) && \ - (defined(WOLF_CRYPTO_DEV) || defined(WOLF_CRYPTO_CB)) + !defined(NO_WOLFSSL_SERVER) && \ + (defined(WOLF_CRYPTO_DEV) || defined(WOLF_CRYPTO_CB)) #include #include diff --git a/examples/tpm_test_keys.c b/examples/tpm_test_keys.c index 4f224fb..b893201 100644 --- a/examples/tpm_test_keys.c +++ b/examples/tpm_test_keys.c @@ -206,7 +206,7 @@ int createAndLoadKey(WOLFTPM2_DEV* pDev, return rc; } /* read failed, so let's create a new key */ - + /* if a public template was not provided we cannot create */ if (publicTemplate == NULL) { return BUFFER_E; diff --git a/src/tpm2.c b/src/tpm2.c index 123af32..b9e80cc 100644 --- a/src/tpm2.c +++ b/src/tpm2.c @@ -6057,7 +6057,7 @@ void TPM2_PrintPublicArea(const TPM2B_PUBLIC* pub) printf(" RSA: sym algorithm: %s (0x%X), sym keyBits: %d, sym mode: %s (0x%X)\n", TPM2_GetAlgName(pub->publicArea.parameters.rsaDetail.symmetric.algorithm), pub->publicArea.parameters.rsaDetail.symmetric.algorithm, - pub->publicArea.parameters.rsaDetail.symmetric.keyBits.sym, + pub->publicArea.parameters.rsaDetail.symmetric.keyBits.sym, TPM2_GetAlgName(pub->publicArea.parameters.rsaDetail.symmetric.mode.sym), pub->publicArea.parameters.rsaDetail.symmetric.mode.sym); printf(" scheme: %s (0x%X), scheme hash: %s (0x%X)\n", diff --git a/src/tpm2_param_enc.c b/src/tpm2_param_enc.c index 9ad4f27..6c60a7a 100644 --- a/src/tpm2_param_enc.c +++ b/src/tpm2_param_enc.c @@ -583,7 +583,7 @@ TPM_RC TPM2_ParamDec_CmdResponse(TPM2_AUTH_SESSION *session, } else if (session->symmetric.algorithm == TPM_ALG_AES && session->symmetric.mode.aes == TPM_ALG_CFB) { - #if !defined(WOLFTPM2_NO_WOLFCRYPT) && defined(WOLFSSL_AES_CFB) + #if !defined(WOLFTPM2_NO_WOLFCRYPT) && defined(WOLFSSL_AES_CFB) rc = TPM2_ParamDec_AESCFB(session, &session->auth, &session->nonceCaller, &session->nonceTPM, paramData, paramSz); #else diff --git a/src/tpm2_wrap.c b/src/tpm2_wrap.c index f1094d6..020aacd 100644 --- a/src/tpm2_wrap.c +++ b/src/tpm2_wrap.c @@ -543,7 +543,7 @@ int wolfTPM2_Cleanup_ex(WOLFTPM2_DEV* dev, int doShutdown) /* make sure crypto dev callback is unregistered */ rc = wolfTPM2_ClearCryptoDevCb(dev, INVALID_DEVID); if (rc != 0) - return rc; + return rc; #endif if (doShutdown) { @@ -3464,7 +3464,7 @@ int wolfTPM2_LoadSymmetricKey(WOLFTPM2_DEV* dev, WOLFTPM2_KEY* key, int alg, LoadExternal_Out loadExtOut; int hashAlg, hashAlgDigSz; - if (dev == NULL || key == NULL || keyBuf == NULL || + if (dev == NULL || key == NULL || keyBuf == NULL || (keySz != 16 && keySz != 32)) { return BAD_FUNC_ARG; } @@ -4394,25 +4394,25 @@ static void wolfTPM2_CopyPubT(TPMT_PUBLIC* out, const TPMT_PUBLIC* in) out->objectAttributes = in->objectAttributes; out->authPolicy.size = in->authPolicy.size; if (out->authPolicy.size > 0) { - if (out->authPolicy.size > + if (out->authPolicy.size > (UINT16)sizeof(out->authPolicy.buffer)) - out->authPolicy.size = + out->authPolicy.size = (UINT16)sizeof(out->authPolicy.buffer); XMEMCPY(out->authPolicy.buffer, in->authPolicy.buffer, out->authPolicy.size); } - + switch (out->type) { case TPM_ALG_KEYEDHASH: - out->parameters.keyedHashDetail.scheme = + out->parameters.keyedHashDetail.scheme = in->parameters.keyedHashDetail.scheme; - - out->unique.keyedHash.size = + + out->unique.keyedHash.size = in->unique.keyedHash.size; - if (out->unique.keyedHash.size > + if (out->unique.keyedHash.size > (UINT16)sizeof(out->unique.keyedHash.buffer)) { - out->unique.keyedHash.size = + out->unique.keyedHash.size = (UINT16)sizeof(out->unique.keyedHash.buffer); } XMEMCPY(out->unique.keyedHash.buffer, @@ -4420,16 +4420,16 @@ static void wolfTPM2_CopyPubT(TPMT_PUBLIC* out, const TPMT_PUBLIC* in) out->unique.keyedHash.size); break; case TPM_ALG_SYMCIPHER: - out->parameters.symDetail.sym.algorithm = + out->parameters.symDetail.sym.algorithm = in->parameters.symDetail.sym.algorithm; - out->parameters.symDetail.sym.keyBits.sym = + out->parameters.symDetail.sym.keyBits.sym = in->parameters.symDetail.sym.keyBits.sym; - out->parameters.symDetail.sym.mode.sym = + out->parameters.symDetail.sym.mode.sym = in->parameters.symDetail.sym.mode.sym; - out->unique.sym.size = + out->unique.sym.size = in->unique.sym.size; - if (out->unique.sym.size > + if (out->unique.sym.size > (UINT16)sizeof(out->unique.sym.buffer)) { out->unique.sym.size = (UINT16)sizeof(out->unique.sym.buffer); @@ -4441,21 +4441,21 @@ static void wolfTPM2_CopyPubT(TPMT_PUBLIC* out, const TPMT_PUBLIC* in) case TPM_ALG_RSA: wolfTPM2_CopySymmetric(&out->parameters.rsaDetail.symmetric, &in->parameters.rsaDetail.symmetric); - out->parameters.rsaDetail.scheme.scheme = + out->parameters.rsaDetail.scheme.scheme = in->parameters.rsaDetail.scheme.scheme; if (out->parameters.rsaDetail.scheme.scheme != TPM_ALG_NULL) - out->parameters.rsaDetail.scheme.details.anySig.hashAlg = + out->parameters.rsaDetail.scheme.details.anySig.hashAlg = in->parameters.rsaDetail.scheme.details.anySig.hashAlg; - out->parameters.rsaDetail.keyBits = + out->parameters.rsaDetail.keyBits = in->parameters.rsaDetail.keyBits; - out->parameters.rsaDetail.exponent = + out->parameters.rsaDetail.exponent = in->parameters.rsaDetail.exponent; - out->unique.rsa.size = + out->unique.rsa.size = in->unique.rsa.size; - if (out->unique.rsa.size > + if (out->unique.rsa.size > (UINT16)sizeof(out->unique.rsa.buffer)) { - out->unique.rsa.size = + out->unique.rsa.size = (UINT16)sizeof(out->unique.rsa.buffer); } XMEMCPY(out->unique.rsa.buffer, @@ -4465,14 +4465,14 @@ static void wolfTPM2_CopyPubT(TPMT_PUBLIC* out, const TPMT_PUBLIC* in) case TPM_ALG_ECC: wolfTPM2_CopySymmetric(&out->parameters.eccDetail.symmetric, &in->parameters.eccDetail.symmetric); - out->parameters.eccDetail.scheme.scheme = + out->parameters.eccDetail.scheme.scheme = in->parameters.eccDetail.scheme.scheme; if (out->parameters.eccDetail.scheme.scheme != TPM_ALG_NULL) - out->parameters.eccDetail.scheme.details.any.hashAlg = + out->parameters.eccDetail.scheme.details.any.hashAlg = in->parameters.eccDetail.scheme.details.any.hashAlg; - out->parameters.eccDetail.curveID = + out->parameters.eccDetail.curveID = in->parameters.eccDetail.curveID; - out->parameters.eccDetail.kdf = + out->parameters.eccDetail.kdf = in->parameters.eccDetail.kdf; wolfTPM2_CopyEccParam(&out->unique.ecc.x, @@ -4483,10 +4483,10 @@ static void wolfTPM2_CopyPubT(TPMT_PUBLIC* out, const TPMT_PUBLIC* in) default: wolfTPM2_CopySymmetric(&out->parameters.asymDetail.symmetric, &in->parameters.asymDetail.symmetric); - out->parameters.asymDetail.scheme.scheme = + out->parameters.asymDetail.scheme.scheme = in->parameters.asymDetail.scheme.scheme; if (out->parameters.asymDetail.scheme.scheme != TPM_ALG_NULL) - out->parameters.asymDetail.scheme.details.anySig.hashAlg = + out->parameters.asymDetail.scheme.details.anySig.hashAlg = in->parameters.asymDetail.scheme.details.anySig.hashAlg; break; } @@ -4818,7 +4818,7 @@ int wolfTPM2_CryptoDevCb(int devId, wc_CryptoInfo* info, void* ctx) /* Make sure an ECDH key has been set */ if (tlsCtx->ecdhKey == NULL || tlsCtx->eccKey == NULL || - tlsCtx->ecdhKey->handle.hndl == TPM_RH_NULL) { + tlsCtx->ecdhKey->handle.hndl == TPM_RH_NULL) { return exit_rc; } diff --git a/tests/unit_tests.c b/tests/unit_tests.c index 7d928ba..9ac71ff 100644 --- a/tests/unit_tests.c +++ b/tests/unit_tests.c @@ -263,7 +263,7 @@ static void test_TPM2_KDFa(void) TPM2B_DATA keyIn = { .size = TEST_KDFA_KEYSZ, .buffer = {0x27, 0x1F, 0xA0, 0x8B, 0xBD, 0xC5, 0x06, 0x0E, 0xC3, 0xDF, - 0xA9, 0x28, 0xFF, 0x9B, 0x73, 0x12, 0x3A, 0x12, 0xDA, 0x0C} + 0xA9, 0x28, 0xFF, 0x9B, 0x73, 0x12, 0x3A, 0x12, 0xDA, 0x0C} }; const char label[] = "KDFSELFTESTLABEL"; TPM2B_NONCE contextU = { diff --git a/wolftpm/tpm2.h b/wolftpm/tpm2.h index a027346..216c4f7 100644 --- a/wolftpm/tpm2.h +++ b/wolftpm/tpm2.h @@ -3209,7 +3209,7 @@ WOLFTPM_API int TPM2_GetHashDigestSize(TPMI_ALG_HASH hashAlg); /*! \ingroup TPM2_Proprietary - \brief Translate a TPM2 hash type to its coresponding wolfcrypt hash type + \brief Translate a TPM2 hash type to its corresponding wolfcrypt hash type \return a value specifying a hash type to use with wolfcrypt \return 0 if hash type is invalid @@ -3341,7 +3341,7 @@ WOLFTPM_API int TPM2_GetCurveSize(TPM_ECC_CURVE curveID); /*! \ingroup TPM2_Proprietary - \brief Translate a wolfcrypt curve type to its coresponding TPM curve type + \brief Translate a wolfcrypt curve type to its corresponding TPM curve type \return integer value representing a wolfcrypt curve type \return ECC_CURVE_OID_E in case of invalid curve type @@ -3366,7 +3366,7 @@ WOLFTPM_API int TPM2_GetTpmCurve(int curveID); /*! \ingroup TPM2_Proprietary - \brief Translate a TPM curve type to its coresponding wolfcrypt curve type + \brief Translate a TPM curve type to its corresponding wolfcrypt curve type \return integer value representing a TPM curve type \return -1 or ECC_CURVE_OID_E in case of invalid curve type @@ -3570,7 +3570,7 @@ WOLFTPM_API UINT16 TPM2_GetVendorID(void); #ifdef DEBUG_WOLFTPM /*! \ingroup TPM2_Proprietary - \brief Helper function to print a binary buffer in a formated way + \brief Helper function to print a binary buffer in a formatted way \note Requires DEBUG_WOLFTPM to be defined \param buffer pointer to a buffer of BYTE type diff --git a/wolftpm/tpm2_socket.h b/wolftpm/tpm2_socket.h index 15ff7a2..1314857 100644 --- a/wolftpm/tpm2_socket.h +++ b/wolftpm/tpm2_socket.h @@ -84,6 +84,6 @@ #define SOCKET_ECONNABORTED ECONNABORTED #endif /* USE_WINDOWS_API */ -#endif /* ! USE_WOLFSSL_IO */ +#endif /* !USE_WOLFSSL_IO */ #endif /* _TPM2_SOCKET_H_ */ diff --git a/wolftpm/tpm2_types.h b/wolftpm/tpm2_types.h index 4fc8a6c..baa7b21 100644 --- a/wolftpm/tpm2_types.h +++ b/wolftpm/tpm2_types.h @@ -78,7 +78,7 @@ typedef int64_t INT64; #ifndef WOLFSSL_USER_SETTINGS #include #endif - #include + #include #include #include #include @@ -100,9 +100,9 @@ typedef int64_t INT64; #include /* for wolfSSL_ERR_reason_error_string */ #endif - #ifdef DEBUG_WOLFTPM - #include - #endif + #ifdef DEBUG_WOLFTPM + #include + #endif #include #if defined(LIBWOLFSSL_VERSION_HEX) && LIBWOLFSSL_VERSION_HEX < 0x03015004 diff --git a/wolftpm/tpm2_wrap.h b/wolftpm/tpm2_wrap.h index b46e516..6014712 100644 --- a/wolftpm/tpm2_wrap.h +++ b/wolftpm/tpm2_wrap.h @@ -642,7 +642,7 @@ WOLFTPM_API int wolfTPM2_CreateLoadedKey(WOLFTPM2_DEV* dev, WOLFTPM2_KEYBLOB* ke /*! \ingroup wolfTPM2_Wrappers \brief Wrapper to load the public part of an external key - \note The key must be formated to the format expected by the TPM, see the 'pub' argument and the alternative wrappers. + \note The key must be formatted to the format expected by the TPM, see the 'pub' argument and the alternative wrappers. \return TPM_RC_SUCCESS: successful \return TPM_RC_FAILURE: generic failure (check TPM IO and TPM return code) @@ -1097,7 +1097,7 @@ WOLFTPM_API int wolfTPM2_RsaKey_WolfToTpm_ex(WOLFTPM2_DEV* dev, \param dev pointer to a TPM2_DEV struct \param tpmKey pointer to an empty struct of WOLFTPM2_KEY type, to hold the imported TPM key - \param pem pointer to an array of byte type, containing a PEM formated public key material + \param pem pointer to an array of byte type, containing a PEM formatted public key material \param pemSz pointer to integer variable, specifying the size of PEM key data \sa wolfTPM2_RsaKey_WolfToTpm