Skip to content

Commit 2ad6723

Browse files
committed
Update to correct startup logic bug.
1 parent 77f5846 commit 2ad6723

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ccb_vaultic/ccb_vaultic.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ static int translateError(int vlt_rc)
161161
{
162162
/* vlt return codes are defined in src/common/vaultic_err.h */
163163
switch (vlt_rc) {
164+
case 0: /* returned on successful init */
164165
case VLT_OK:
165166
return 0;
166167
default:
@@ -935,13 +936,15 @@ static int HandleCipherCallback(int devId, wc_CryptoInfo* info,
935936
XMEMSET(ts, 0, sizeof(ts));
936937
#endif
937938
/* Invalid incoming context? Return error*/
938-
if (aes == NULL)
939+
if (aes == NULL) {
939940
rc = BAD_FUNC_ARG;
940941
break;
942+
}
941943

942944
/* Only support AES128 */
943-
if (aes->keylen != AES_128_KEY_SIZE)
945+
if (aes->keylen != AES_128_KEY_SIZE) {
944946
break;
947+
}
945948

946949
/* Check number of blocks */
947950
blocks = info->cipher.aescbc.sz / AES_BLOCK_SIZE;

0 commit comments

Comments
 (0)