acorn.h: dynamic library interface for acorn. More...
#include <stdio.h>
Go to the source code of this file.
Data Structures | |
struct | acorn_buffer |
A byte array with length included. More... | |
struct | acorn_object_keyEntry |
Describes a key pair. More... | |
struct | acorn_request_getVersion |
Input parameters for acorn_command_getVersion. More... | |
struct | acorn_response_getVersion |
Output parameters for acorn_command_getVersion. More... | |
struct | acorn_request_list |
Input parameters for acorn_command_list. More... | |
struct | acorn_response_list |
Output parameters for acorn_command_list. More... | |
struct | acorn_request_getPublic |
Input parameters for acorn_command_getPublic. More... | |
struct | acorn_response_getPublic |
Output parameters for acorn_command_getPublic. More... | |
struct | acorn_request_getPublicHash |
Input parameters for acorn_command_getPublicHash. More... | |
struct | acorn_response_getPublicHash |
Output parameters for acorn_command_getPublicHash. More... | |
struct | acorn_request_getKeyInfo |
Input parameters for acorn_command_getKeyInfo. More... | |
struct | acorn_response_getKeyInfo |
Output parameters for acorn_command_getKeyInfo. More... | |
struct | acorn_request_generate |
Input parameters for acorn_command_generate. More... | |
struct | acorn_response_generate |
Output parameters for acorn_command_generate. More... | |
struct | acorn_request_importKeypair |
Input parameters for acorn_command_importKeypair. More... | |
struct | acorn_response_importKeypair |
Output parameters for acorn_command_importKeypair. More... | |
struct | acorn_request_sign |
Input parameters for acorn_command_sign. More... | |
struct | acorn_response_sign |
Output parameters for acorn_command_sign. More... | |
struct | acorn_request_verify |
Input parameters for acorn_command_verify. More... | |
struct | acorn_response_verify |
Output parameters for acorn_command_verify. More... | |
struct | acorn_request_signImmediate |
Input parameters for acorn_command_signImmediate. More... | |
struct | acorn_response_signImmediate |
Output parameters for acorn_command_signImmediate. More... | |
struct | acorn_request_verifyImmediate |
Input parameters for acorn_command_verifyImmediate. More... | |
struct | acorn_response_verifyImmediate |
Output parameters for acorn_command_verifyImmediate. More... | |
struct | acorn_request_see_getVersion |
Input parameters for acorn_command_see_getVersion. More... | |
struct | acorn_response_see_getVersion |
Output parameters for acorn_command_see_getVersion. More... | |
struct | acorn_commandlist |
struct | acorn_cmdlist |
Typedefs | |
typedef int(* | acorn_commandfn_getVersion) (const struct acorn_request_getVersion *request, struct acorn_response_getVersion *response, char **errstring) |
typedef int(* | acorn_cmdfn_getVersion) (struct acorn_response_getVersion *response, char **errstring) |
typedef void EXPORT | acorn_free_getVersion(struct acorn_request_getVersion *request, struct acorn_response_getVersion *response) |
Reclaim resources used by corresponding command. More... | |
typedef int(* | acorn_commandfn_list) (const struct acorn_request_list *request, struct acorn_response_list *response, char **errstring) |
typedef int(* | acorn_cmdfn_list) (struct acorn_response_list *response, char **errstring) |
typedef void EXPORT | acorn_free_list(struct acorn_request_list *request, struct acorn_response_list *response) |
Reclaim resources used by corresponding command. More... | |
typedef int(* | acorn_commandfn_getPublic) (const struct acorn_request_getPublic *request, struct acorn_response_getPublic *response, char **errstring) |
typedef int(* | acorn_cmdfn_getPublic) (const char *alias, struct acorn_response_getPublic *response, char **errstring) |
typedef void EXPORT | acorn_free_getPublic(struct acorn_request_getPublic *request, struct acorn_response_getPublic *response) |
Reclaim resources used by corresponding command. More... | |
typedef int(* | acorn_commandfn_getPublicHash) (const struct acorn_request_getPublicHash *request, struct acorn_response_getPublicHash *response, char **errstring) |
typedef int(* | acorn_cmdfn_getPublicHash) (const struct acorn_buffer publicKey, struct acorn_response_getPublicHash *response, char **errstring) |
typedef void EXPORT | acorn_free_getPublicHash(struct acorn_request_getPublicHash *request, struct acorn_response_getPublicHash *response) |
Reclaim resources used by corresponding command. More... | |
typedef int(* | acorn_commandfn_getKeyInfo) (const struct acorn_request_getKeyInfo *request, struct acorn_response_getKeyInfo *response, char **errstring) |
typedef int(* | acorn_cmdfn_getKeyInfo) (const char *alias, struct acorn_response_getKeyInfo *response, char **errstring) |
typedef void EXPORT | acorn_free_getKeyInfo(struct acorn_request_getKeyInfo *request, struct acorn_response_getKeyInfo *response) |
Reclaim resources used by corresponding command. More... | |
typedef int(* | acorn_commandfn_generate) (const struct acorn_request_generate *request, struct acorn_response_generate *response, char **errstring) |
typedef int(* | acorn_cmdfn_generate) (const char *alias, const char *algorithm, const char *token, unsigned flags, struct acorn_response_generate *response, char **errstring) |
typedef void EXPORT | acorn_free_generate(struct acorn_request_generate *request, struct acorn_response_generate *response) |
Reclaim resources used by corresponding command. More... | |
typedef int(* | acorn_commandfn_importKeypair) (const struct acorn_request_importKeypair *request, struct acorn_response_importKeypair *response, char **errstring) |
typedef int(* | acorn_cmdfn_importKeypair) (const char *alias, const char *algorithm, const struct acorn_buffer publicKey, const struct acorn_buffer privateKey, const char *token, unsigned overwrite, struct acorn_response_importKeypair *response, char **errstring) |
typedef void EXPORT | acorn_free_importKeypair(struct acorn_request_importKeypair *request, struct acorn_response_importKeypair *response) |
Reclaim resources used by corresponding command. More... | |
typedef int(* | acorn_commandfn_sign) (const struct acorn_request_sign *request, struct acorn_response_sign *response, char **errstring) |
typedef int(* | acorn_cmdfn_sign) (const char *alias, const char *keyhash, const struct acorn_buffer message, struct acorn_response_sign *response, char **errstring) |
typedef void EXPORT | acorn_free_sign(struct acorn_request_sign *request, struct acorn_response_sign *response) |
Reclaim resources used by corresponding command. More... | |
typedef int(* | acorn_commandfn_verify) (const struct acorn_request_verify *request, struct acorn_response_verify *response, char **errstring) |
typedef int(* | acorn_cmdfn_verify) (const char *alias, const char *keyhash, const struct acorn_buffer message, const struct acorn_buffer signature, struct acorn_response_verify *response, char **errstring) |
typedef void EXPORT | acorn_free_verify(struct acorn_request_verify *request, struct acorn_response_verify *response) |
Reclaim resources used by corresponding command. More... | |
typedef int(* | acorn_commandfn_signImmediate) (const struct acorn_request_signImmediate *request, struct acorn_response_signImmediate *response, char **errstring) |
typedef int(* | acorn_cmdfn_signImmediate) (const struct acorn_buffer privateBlob, const char *token, const struct acorn_buffer message, struct acorn_response_signImmediate *response, char **errstring) |
typedef void EXPORT | acorn_free_signImmediate(struct acorn_request_signImmediate *request, struct acorn_response_signImmediate *response) |
Reclaim resources used by corresponding command. More... | |
typedef int(* | acorn_commandfn_verifyImmediate) (const struct acorn_request_verifyImmediate *request, struct acorn_response_verifyImmediate *response, char **errstring) |
typedef int(* | acorn_cmdfn_verifyImmediate) (const struct acorn_buffer publicKey, const char *algorithm, const struct acorn_buffer message, const struct acorn_buffer signature, struct acorn_response_verifyImmediate *response, char **errstring) |
typedef void EXPORT | acorn_free_verifyImmediate(struct acorn_request_verifyImmediate *request, struct acorn_response_verifyImmediate *response) |
Reclaim resources used by corresponding command. More... | |
typedef int(* | acorn_commandfn_see_getVersion) (const struct acorn_request_see_getVersion *request, struct acorn_response_see_getVersion *response, char **errstring) |
typedef int(* | acorn_cmdfn_see_getVersion) (struct acorn_response_see_getVersion *response, char **errstring) |
typedef void EXPORT | acorn_free_see_getVersion(struct acorn_request_see_getVersion *request, struct acorn_response_see_getVersion *response) |
Reclaim resources used by corresponding command. More... | |
typedef int EXPORT | acorn_getcommandlist(struct acorn_commandlist *list, char **errstring) |
Populates a structure containing each command in request structure form. More... | |
typedef int EXPORT | acorn_getcmdlist(struct acorn_cmdlist *list, char **errstring) |
Populates a structure containing each command in request inline form. More... | |
Enumerations | |
enum | acorn_enum_generateFlags { acorn_enum_generateFlags_overwrite = 0 , acorn_enum_generateFlags_exportPrivate = 1 , acorn_enum_generateFlags__LIMIT = 2 } |
Functions | |
int EXPORT | acorn_init (void) |
Automatically called by dynamic library initialization. | |
void EXPORT | acorn_cleanup (void) |
Automatically called by dynamic library cleanup. | |
void EXPORT | acorn_errstream (FILE *out) |
int EXPORT | acorn_command_getVersion (const struct acorn_request_getVersion *request, struct acorn_response_getVersion *response, char **errstring) |
Returns information about the host software. More... | |
int EXPORT | acorn_cmd_getVersion (struct acorn_response_getVersion *response, char **errstring) |
Returns information about the host software. More... | |
int EXPORT | acorn_command_list (const struct acorn_request_list *request, struct acorn_response_list *response, char **errstring) |
Returns a list of available key aliases with algorithm names. More... | |
int EXPORT | acorn_cmd_list (struct acorn_response_list *response, char **errstring) |
Returns a list of available key aliases with algorithm names. More... | |
int EXPORT | acorn_command_getPublic (const struct acorn_request_getPublic *request, struct acorn_response_getPublic *response, char **errstring) |
Returns the public key associated with a given alias. More... | |
int EXPORT | acorn_cmd_getPublic (const char *alias, struct acorn_response_getPublic *response, char **errstring) |
Returns the public key associated with a given alias. More... | |
int EXPORT | acorn_command_getPublicHash (const struct acorn_request_getPublicHash *request, struct acorn_response_getPublicHash *response, char **errstring) |
Returns a hash value for a given public key. More... | |
int EXPORT | acorn_cmd_getPublicHash (const struct acorn_buffer publicKey, struct acorn_response_getPublicHash *response, char **errstring) |
Returns a hash value for a given public key. More... | |
int EXPORT | acorn_command_getKeyInfo (const struct acorn_request_getKeyInfo *request, struct acorn_response_getKeyInfo *response, char **errstring) |
Returns the hash, algorithm and public key associated with a given alias. More... | |
int EXPORT | acorn_cmd_getKeyInfo (const char *alias, struct acorn_response_getKeyInfo *response, char **errstring) |
Returns the hash, algorithm and public key associated with a given alias. More... | |
int EXPORT | acorn_command_generate (const struct acorn_request_generate *request, struct acorn_response_generate *response, char **errstring) |
Generates a key pair and saves it under the specified alias. More... | |
int EXPORT | acorn_cmd_generate (const char *alias, const char *algorithm, const char *token, unsigned flags, struct acorn_response_generate *response, char **errstring) |
Generates a key pair and saves it under the specified alias. More... | |
int EXPORT | acorn_command_importKeypair (const struct acorn_request_importKeypair *request, struct acorn_response_importKeypair *response, char **errstring) |
Imports a signature key pair and saves it under the specified alias. More... | |
int EXPORT | acorn_cmd_importKeypair (const char *alias, const char *algorithm, const struct acorn_buffer publicKey, const struct acorn_buffer privateKey, const char *token, unsigned overwrite, struct acorn_response_importKeypair *response, char **errstring) |
Imports a signature key pair and saves it under the specified alias. More... | |
int EXPORT | acorn_command_sign (const struct acorn_request_sign *request, struct acorn_response_sign *response, char **errstring) |
Creates a digital signature of the specified message. More... | |
int EXPORT | acorn_cmd_sign (const char *alias, const char *keyhash, const struct acorn_buffer message, struct acorn_response_sign *response, char **errstring) |
Creates a digital signature of the specified message. More... | |
int EXPORT | acorn_command_verify (const struct acorn_request_verify *request, struct acorn_response_verify *response, char **errstring) |
Determines whether a given signature is valid for a message and key pair. More... | |
int EXPORT | acorn_cmd_verify (const char *alias, const char *keyhash, const struct acorn_buffer message, const struct acorn_buffer signature, struct acorn_response_verify *response, char **errstring) |
Determines whether a given signature is valid for a message and key pair. More... | |
int EXPORT | acorn_command_signImmediate (const struct acorn_request_signImmediate *request, struct acorn_response_signImmediate *response, char **errstring) |
Creates a digital signature of the specified message. More... | |
int EXPORT | acorn_cmd_signImmediate (const struct acorn_buffer privateBlob, const char *token, const struct acorn_buffer message, struct acorn_response_signImmediate *response, char **errstring) |
Creates a digital signature of the specified message. More... | |
int EXPORT | acorn_command_verifyImmediate (const struct acorn_request_verifyImmediate *request, struct acorn_response_verifyImmediate *response, char **errstring) |
Determines whether a given signature is valid for a message and public key. More... | |
int EXPORT | acorn_cmd_verifyImmediate (const struct acorn_buffer publicKey, const char *algorithm, const struct acorn_buffer message, const struct acorn_buffer signature, struct acorn_response_verifyImmediate *response, char **errstring) |
Determines whether a given signature is valid for a message and public key. More... | |
int EXPORT | acorn_command_see_getVersion (const struct acorn_request_see_getVersion *request, struct acorn_response_see_getVersion *response, char **errstring) |
int EXPORT | acorn_cmd_see_getVersion (struct acorn_response_see_getVersion *response, char **errstring) |
acorn.h: dynamic library interface for acorn.
Copyright 2015-2024 Entrust, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Generated by interface.js – DO NOT EDIT
Definition in file acorn.h.
struct acorn_buffer |
struct acorn_object_keyEntry |
struct acorn_request_getVersion |
struct acorn_response_getVersion |
struct acorn_request_list |
struct acorn_response_list |
Output parameters for acorn_command_list.
Data Fields | ||
---|---|---|
struct acorn_object_keyEntry * | entries | Description of each key saved in the system. |
unsigned | n_entries | Number of entries in entries. |
struct acorn_request_getPublic |
struct acorn_response_getPublic |
Output parameters for acorn_command_getPublic.
Data Fields | ||
---|---|---|
struct acorn_buffer | publicKey | Public key material. |
struct acorn_request_getPublicHash |
Input parameters for acorn_command_getPublicHash.
Data Fields | ||
---|---|---|
struct acorn_buffer | publicKey | Public key material. |
struct acorn_response_getPublicHash |
struct acorn_request_getKeyInfo |
struct acorn_response_getKeyInfo |
Output parameters for acorn_command_getKeyInfo.
Data Fields | ||
---|---|---|
char * | algorithm | Cryptographic algorithm with which this key pair can be used. |
char * | hash | Uniquely idenfies a public key. |
struct acorn_buffer | privateBlob | Opaque and encrypted private key. |
struct acorn_buffer | publicKey | Public key material. |
struct acorn_request_generate |
Input parameters for acorn_command_generate.
struct acorn_response_generate |
Output parameters for acorn_command_generate.
Data Fields | ||
---|---|---|
char * | alias | Name of new key pair. |
char * | hash | Unique identifier for key pair. |
struct acorn_buffer | privateBlob | Opaque representation of encrypted private key material. |
struct acorn_buffer | privateKey | Exposed private key material (present only when exportPrivate flag is set). |
struct acorn_request_importKeypair |
Input parameters for acorn_command_importKeypair.
Data Fields | ||
---|---|---|
char * | algorithm | Cryptographic algorithm to use. |
char * | alias | Name for new key pair (optional) |
unsigned | overwrite | Delete existing alias key pair if one exists. |
struct acorn_buffer | privateKey | Private portion of key pair. |
struct acorn_buffer | publicKey | Public portion of key pair. |
char * | token |
Specifies the operator card set or softoken to use. Use the preload command to avoid console prompts |
struct acorn_response_importKeypair |
Output parameters for acorn_command_importKeypair.
Data Fields | ||
---|---|---|
char * | alias | Name of new key pair. |
char * | hash | Unique identifier for key pair. |
struct acorn_buffer | privateBlob | Opaque representation of encrypted private key material. |
struct acorn_request_sign |
Input parameters for acorn_command_sign.
Data Fields | ||
---|---|---|
char * | alias | Specifies key pair to sign with. |
char * | keyhash | Ignored unless alias is missing. |
struct acorn_buffer | message | Data to be signed. |
struct acorn_response_sign |
Output parameters for acorn_command_sign.
Data Fields | ||
---|---|---|
struct acorn_buffer | signature | Cryptographic signature of message. |
struct acorn_request_verify |
Input parameters for acorn_command_verify.
Data Fields | ||
---|---|---|
char * | alias | Specifies key pair used for signature. |
char * | keyhash | Ignored unless alias is missing. |
struct acorn_buffer | message | Data that has been signed. |
struct acorn_buffer | signature | Cryptographic signature of message. |
struct acorn_response_verify |
struct acorn_request_signImmediate |
Input parameters for acorn_command_signImmediate.
Data Fields | ||
---|---|---|
struct acorn_buffer | message | Data to be signed. |
struct acorn_buffer | privateBlob | Opaque representation of encrypted private key material. |
char * | token |
Specifies the operator card set or softoken to use. Use the preload command to avoid console prompts |
struct acorn_response_signImmediate |
Output parameters for acorn_command_signImmediate.
Data Fields | ||
---|---|---|
struct acorn_buffer | signature | Cryptographic signature of message. |
struct acorn_request_verifyImmediate |
Input parameters for acorn_command_verifyImmediate.
Data Fields | ||
---|---|---|
char * | algorithm | Cryptographic algorithm used to sign. |
struct acorn_buffer | message | Data that has been signed. |
struct acorn_buffer | publicKey | Public key of pair used to sign. |
struct acorn_buffer | signature | Cryptographic signature of message. |
struct acorn_response_verifyImmediate |
struct acorn_request_see_getVersion |
Input parameters for acorn_command_see_getVersion.
Data Fields | ||
---|---|---|
int | unused | Some C compilers reject empty structs. |
struct acorn_response_see_getVersion |
Output parameters for acorn_command_see_getVersion.
Data Fields | ||
---|---|---|
char * | version | Sementic version number of SEE machine. |
struct acorn_commandlist |
struct acorn_cmdlist |
typedef void EXPORT acorn_free_generate(struct acorn_request_generate *request, struct acorn_response_generate *response) |
Reclaim resources used by corresponding command.
request | (Optional) request data to free |
response | (Optional) response data to free |
typedef void EXPORT acorn_free_getKeyInfo(struct acorn_request_getKeyInfo *request, struct acorn_response_getKeyInfo *response) |
Reclaim resources used by corresponding command.
request | (Optional) request data to free |
response | (Optional) response data to free |
typedef void EXPORT acorn_free_getPublic(struct acorn_request_getPublic *request, struct acorn_response_getPublic *response) |
Reclaim resources used by corresponding command.
request | (Optional) request data to free |
response | (Optional) response data to free |
typedef void EXPORT acorn_free_getPublicHash(struct acorn_request_getPublicHash *request, struct acorn_response_getPublicHash *response) |
Reclaim resources used by corresponding command.
request | (Optional) request data to free |
response | (Optional) response data to free |
typedef void EXPORT acorn_free_getVersion(struct acorn_request_getVersion *request, struct acorn_response_getVersion *response) |
Reclaim resources used by corresponding command.
request | (Optional) request data to free |
response | (Optional) response data to free |
typedef void EXPORT acorn_free_importKeypair(struct acorn_request_importKeypair *request, struct acorn_response_importKeypair *response) |
Reclaim resources used by corresponding command.
request | (Optional) request data to free |
response | (Optional) response data to free |
typedef void EXPORT acorn_free_list(struct acorn_request_list *request, struct acorn_response_list *response) |
Reclaim resources used by corresponding command.
request | (Optional) request data to free |
response | (Optional) response data to free |
typedef void EXPORT acorn_free_see_getVersion(struct acorn_request_see_getVersion *request, struct acorn_response_see_getVersion *response) |
typedef void EXPORT acorn_free_sign(struct acorn_request_sign *request, struct acorn_response_sign *response) |
Reclaim resources used by corresponding command.
request | (Optional) request data to free |
response | (Optional) response data to free |
typedef void EXPORT acorn_free_signImmediate(struct acorn_request_signImmediate *request, struct acorn_response_signImmediate *response) |
Reclaim resources used by corresponding command.
request | (Optional) request data to free |
response | (Optional) response data to free |
typedef void EXPORT acorn_free_verify(struct acorn_request_verify *request, struct acorn_response_verify *response) |
Reclaim resources used by corresponding command.
request | (Optional) request data to free |
response | (Optional) response data to free |
typedef void EXPORT acorn_free_verifyImmediate(struct acorn_request_verifyImmediate *request, struct acorn_response_verifyImmediate *response) |
Reclaim resources used by corresponding command.
request | (Optional) request data to free |
response | (Optional) response data to free |
typedef int EXPORT acorn_getcmdlist(struct acorn_cmdlist *list, char **errstring) |
typedef int EXPORT acorn_getcommandlist(struct acorn_commandlist *list, char **errstring) |
int EXPORT acorn_cmd_generate | ( | const char * | alias, |
const char * | algorithm, | ||
const char * | token, | ||
unsigned | flags, | ||
struct acorn_response_generate * | response, | ||
char ** | errstring | ||
) |
Generates a key pair and saves it under the specified alias.
The key pair can be used for subsequent commands and will be saved between instances of the application.
alias | Name for new key pair (optional) |
algorithm | Cryptographic algorithm to use |
token | Specifies the operator card set or softoken to use. Use the preload command to avoid console prompts |
flags | Set bit one to overwrite existing alias key pair if one exists. |
flags | Set bit two to provide private key without encryption in the response privateKey field (DANGEROUS). Setting this undermines the ability of the HSM to protect the key material, though the key still benefits from hardware random number generation. |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_cmd_getKeyInfo | ( | const char * | alias, |
struct acorn_response_getKeyInfo * | response, | ||
char ** | errstring | ||
) |
Returns the hash, algorithm and public key associated with a given alias.
alias | Specifies which key pair to describe |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_cmd_getPublic | ( | const char * | alias, |
struct acorn_response_getPublic * | response, | ||
char ** | errstring | ||
) |
Returns the public key associated with a given alias.
alias | Specifies which saved key pair for which to fetch the public component |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_cmd_getPublicHash | ( | const struct acorn_buffer | publicKey, |
struct acorn_response_getPublicHash * | response, | ||
char ** | errstring | ||
) |
Returns a hash value for a given public key.
publicKey | Public key material |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_cmd_getVersion | ( | struct acorn_response_getVersion * | response, |
char ** | errstring | ||
) |
Returns information about the host software.
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_cmd_importKeypair | ( | const char * | alias, |
const char * | algorithm, | ||
const struct acorn_buffer | publicKey, | ||
const struct acorn_buffer | privateKey, | ||
const char * | token, | ||
unsigned | overwrite, | ||
struct acorn_response_importKeypair * | response, | ||
char ** | errstring | ||
) |
Imports a signature key pair and saves it under the specified alias.
The key pair can be used for subsequent commands and will be saved between instances of the application.
alias | Name for new key pair (optional) |
algorithm | Cryptographic algorithm to use |
publicKey | Public portion of key pair |
privateKey | Private portion of key pair |
token | Specifies the operator card set or softoken to use. Use the preload command to avoid console prompts |
overwrite | Delete existing alias key pair if one exists |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_cmd_list | ( | struct acorn_response_list * | response, |
char ** | errstring | ||
) |
Returns a list of available key aliases with algorithm names.
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_cmd_sign | ( | const char * | alias, |
const char * | keyhash, | ||
const struct acorn_buffer | message, | ||
struct acorn_response_sign * | response, | ||
char ** | errstring | ||
) |
Creates a digital signature of the specified message.
The keyhash argument is ignored unless the alias is missing.
alias | Specifies key pair to sign with |
keyhash | Ignored unless alias is missing |
message | Data to be signed |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_cmd_signImmediate | ( | const struct acorn_buffer | privateBlob, |
const char * | token, | ||
const struct acorn_buffer | message, | ||
struct acorn_response_signImmediate * | response, | ||
char ** | errstring | ||
) |
Creates a digital signature of the specified message.
The keyhash argument is ignored unless the alias is missing.
privateBlob | Opaque representation of encrypted private key material |
token | Specifies the operator card set or softoken to use. Use the preload command to avoid console prompts |
message | Data to be signed |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_cmd_verify | ( | const char * | alias, |
const char * | keyhash, | ||
const struct acorn_buffer | message, | ||
const struct acorn_buffer | signature, | ||
struct acorn_response_verify * | response, | ||
char ** | errstring | ||
) |
Determines whether a given signature is valid for a message and key pair.
The keyhash argument is ignored unless the alias is missing.
alias | Specifies key pair used for signature |
keyhash | Ignored unless alias is missing |
message | Data that has been signed |
signature | Cryptographic signature of message |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_cmd_verifyImmediate | ( | const struct acorn_buffer | publicKey, |
const char * | algorithm, | ||
const struct acorn_buffer | message, | ||
const struct acorn_buffer | signature, | ||
struct acorn_response_verifyImmediate * | response, | ||
char ** | errstring | ||
) |
Determines whether a given signature is valid for a message and public key.
publicKey | Public key of pair used to sign |
algorithm | Cryptographic algorithm used to sign |
message | Data that has been signed |
signature | Cryptographic signature of message |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_command_generate | ( | const struct acorn_request_generate * | request, |
struct acorn_response_generate * | response, | ||
char ** | errstring | ||
) |
Generates a key pair and saves it under the specified alias.
The key pair can be used for subsequent commands and will be saved between instances of the application.
request | input data to process |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_command_getKeyInfo | ( | const struct acorn_request_getKeyInfo * | request, |
struct acorn_response_getKeyInfo * | response, | ||
char ** | errstring | ||
) |
Returns the hash, algorithm and public key associated with a given alias.
request | input data to process |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_command_getPublic | ( | const struct acorn_request_getPublic * | request, |
struct acorn_response_getPublic * | response, | ||
char ** | errstring | ||
) |
Returns the public key associated with a given alias.
request | input data to process |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_command_getPublicHash | ( | const struct acorn_request_getPublicHash * | request, |
struct acorn_response_getPublicHash * | response, | ||
char ** | errstring | ||
) |
Returns a hash value for a given public key.
request | input data to process |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_command_getVersion | ( | const struct acorn_request_getVersion * | request, |
struct acorn_response_getVersion * | response, | ||
char ** | errstring | ||
) |
Returns information about the host software.
request | input data to process |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_command_importKeypair | ( | const struct acorn_request_importKeypair * | request, |
struct acorn_response_importKeypair * | response, | ||
char ** | errstring | ||
) |
Imports a signature key pair and saves it under the specified alias.
The key pair can be used for subsequent commands and will be saved between instances of the application.
request | input data to process |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_command_list | ( | const struct acorn_request_list * | request, |
struct acorn_response_list * | response, | ||
char ** | errstring | ||
) |
Returns a list of available key aliases with algorithm names.
request | input data to process |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_command_sign | ( | const struct acorn_request_sign * | request, |
struct acorn_response_sign * | response, | ||
char ** | errstring | ||
) |
Creates a digital signature of the specified message.
The keyhash argument is ignored unless the alias is missing.
request | input data to process |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_command_signImmediate | ( | const struct acorn_request_signImmediate * | request, |
struct acorn_response_signImmediate * | response, | ||
char ** | errstring | ||
) |
Creates a digital signature of the specified message.
The keyhash argument is ignored unless the alias is missing.
request | input data to process |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_command_verify | ( | const struct acorn_request_verify * | request, |
struct acorn_response_verify * | response, | ||
char ** | errstring | ||
) |
Determines whether a given signature is valid for a message and key pair.
The keyhash argument is ignored unless the alias is missing.
request | input data to process |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |
int EXPORT acorn_command_verifyImmediate | ( | const struct acorn_request_verifyImmediate * | request, |
struct acorn_response_verifyImmediate * | response, | ||
char ** | errstring | ||
) |
Determines whether a given signature is valid for a message and public key.
request | input data to process |
response | output data to populate |
errstr | (Optional) when not NULL, error message is allocated and assogned to this instead of being printed. |