|
OpenSSL ECC Engine
1.0
OpenSSL Engine implementation using ATECC508 for ECC key storage and ECDSA, ECDH, and RNG.
|
Implementation of OpenSSL ENGINE callback functions for certificate handling. More...
#include <stdio.h>#include <string.h>#include <stdlib.h>#include <openssl/crypto.h>#include <stdint.h>#include <limits.h>#include <assert.h>#include <openssl/engine.h>#include <openssl/pem.h>#include <openssl/x509v3.h>#include <crypto/ec/ec_lcl.h>#include <crypto/ecdh/ech_locl.h>#include <crypto/ecdsa/ecs_locl.h>#include <err.h>#include "ecc_meth.h"#include "platform.h"Functions | |
| int | get_device_cert (char *path) |
| Retrieves pre-programmed certificates from ATECCX08 chip and saves them into temporary files as defined in the dev_cert_fname, signer_cert_fname, and root_cert_fname variables. More... | |
| int | get_public_key (void) |
| Retrieves the signer public key from ATECCX08 chip and saves them into a global signerPubkey buffer. More... | |
| int | get_signer_cert (char *path) |
| Retrieves pre-programmed signer certificate from ATECCX08 chip and saves it into a global signerCert buffer. More... | |
| int | verify_signer_cert (void) |
| Verifies the signer certificate using the ATECCX08 chip hardware and data in caPubkey buffer (CA root key). More... | |
| int | verify_device_cert (void) |
| Verifies the device certificate using the ATECCX08 chip hardware and data in signerPubkey buffer. More... | |
| int | get_root_cert (char *path) |
| Retrieves pre-programmed CA certificate (the root) from ATECCX08 chip and saves it into a global rootCert buffer. More... | |
| int | extract_all_certs (char *path) |
| Retrieves all pre-programmed certificates from ATECCX08 chip and saves it into a global buffers. Calls functions to verify them. More... | |
| int | eccx08_cmd_ctrl (ENGINE *e, int cmd, long i, void *p, void(*f)(void)) |
| Call a function of the ateccx08 engine depending on provided command. This is an extension of OpenSSL: there is no openssl cli command to call this function. See run_engine_cmds() function from the tlsutils.c file for details. More... | |
| int | eccx08_cmd_defn_init (ENGINE *e) |
| Initialize the CMD method for ateccx08 engine. More... | |
Implementation of OpenSSL ENGINE callback functions for certificate handling.
Copyright (c) 2015 Atmel Corporation. All rights reserved.
| int eccx08_cmd_ctrl | ( | ENGINE * | e, |
| int | cmd, | ||
| long | i, | ||
| void * | p, | ||
| void(*)(void) | f | ||
| ) |
Call a function of the ateccx08 engine depending on provided command. This is an extension of OpenSSL: there is no openssl cli command to call this function. See run_engine_cmds() function from the tlsutils.c file for details.
| [in] | e | a pointer to the ENGINE structure |
| [in] | cmd | a command to execute. For the full list of commands see ECCX08_CMD_* defines in the ecc_meth.h file |
| [in] | i | an integer parameter of the command |
| [in,out] | p | a string parameter of the command |
| [in] | f | a function pointer parameter of the command |
| int eccx08_cmd_defn_init | ( | ENGINE * | e | ) |
Initialize the CMD method for ateccx08 engine.
| [in] | e | a pointer to the ENGINE structure |
| int extract_all_certs | ( | char * | path | ) |
Retrieves all pre-programmed certificates from ATECCX08 chip and saves it into a global buffers. Calls functions to verify them.
| [in] | path | a pointer to a buffer with a path to the certstore |
| int get_device_cert | ( | char * | path | ) |
Retrieves pre-programmed certificates from ATECCX08 chip and saves them into temporary files as defined in the dev_cert_fname, signer_cert_fname, and root_cert_fname variables.
| [in] | path | a pointer to a buffer with a path to the certstore |
| int get_public_key | ( | void | ) |
Retrieves the signer public key from ATECCX08 chip and saves them into a global signerPubkey buffer.
| int get_root_cert | ( | char * | path | ) |
Retrieves pre-programmed CA certificate (the root) from ATECCX08 chip and saves it into a global rootCert buffer.
| [in] | path | a pointer to a buffer with a path to the certstore |
| int get_signer_cert | ( | char * | path | ) |
Retrieves pre-programmed signer certificate from ATECCX08 chip and saves it into a global signerCert buffer.
| [in] | path | a pointer to a buffer with a path to the certstore |
| int verify_device_cert | ( | void | ) |
Verifies the device certificate using the ATECCX08 chip hardware and data in signerPubkey buffer.
| int verify_signer_cert | ( | void | ) |
Verifies the signer certificate using the ATECCX08 chip hardware and data in caPubkey buffer (CA root key).
1.8.10