Navigation Menu

Skip to content

Commit

Permalink
Added delay on exit for client-server example. Also added an addition…
Browse files Browse the repository at this point in the history
…al check for max cmd for eccx08_ctrl() function
  • Loading branch information
Alex Gostrer authored and Alex Gostrer committed Jan 15, 2016
1 parent 41b51f3 commit 5c7d9b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions client-server/exchange-tls12.c
Expand Up @@ -248,8 +248,10 @@ int main(int argc, char *argv[])
err = connect_client(engine_id, ca_path, chain_file, cert_file, key_file, cipher_list,
ip_address, port_number);
}
sleep(2);
return (err);
done:
sleep(2);
cleanup_openssl();
return (err);
}
2 changes: 1 addition & 1 deletion engine_atecc/engine_atecc_binder.c
Expand Up @@ -239,7 +239,7 @@ int eccx08_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
{
int rc = 0;
eccx08_debug("eccx08_ctrl()\n");
if (cmd < ENGINE_CMD_BASE) {
if ((cmd < ENGINE_CMD_BASE) || (cmd >= ECCX08_CMD_MAX)) {
// if cmd < ENGINE_CMD_BASE this is being called by OpenSSL.
// In this case no work to do so just return.
return (1);
Expand Down
1 change: 1 addition & 0 deletions engine_atecc/engine_meth/ecc_meth.h
Expand Up @@ -66,6 +66,7 @@
#define ECCX08_CMD_GET_ROOT_CERT (ENGINE_CMD_BASE + 6)
#define ECCX08_CMD_EXTRACT_ALL_CERTS (ENGINE_CMD_BASE + 7)
#define ECCX08_CMD_GET_PRIV_KEY (ENGINE_CMD_BASE + 8)
#define ECCX08_CMD_MAX (ENGINE_CMD_BASE + 9)

#define ECCX08_SLOT8_ENC_STORE_LEN (416)

Expand Down

0 comments on commit 5c7d9b1

Please sign in to comment.