group
group__libshare__syscert
Provides the ability to generate and manage authority certificates.

Authority Certification

function
int shesig_init
(shesig_t *cert, char *entity, int alg, int flags)
function
int shesig_ca_init
(shesig_t *cert, char *entity, int alg, int flags)
function
int shesig_sign
(shesig_t *cert, shesig_t *parent, unsigned char *key_data, size_t key_len)
function
int shesig_import
(shesig_t *cert, char *iss, shalg_t iss_pub)
Insert a certificate from an external origin.
function
void shesig_free
(shesig_t **cert_p)
function
char* shesig_id_hex
(shesig_t *cert)
function
char* shesig_flag_str
(int flags)
function
int shesig_id_verify
(shesig_t *cert)
function
void shesig_id_gen
(shesig_t *cert)
function
void shesig_print
(shesig_t *cert, shbuf_t *pr_buff)
function
const char* shesig_serialno
(shesig_t *cert)
function
int shesig_verify
(shesig_t *cert, shesig_t *parent)
function
void shesig_serial
(shesig_t *cert, unsigned char *ret_data, size_t *ret_len_p)
function
void shesig_serial_set
(shesig_t *cert, unsigned char *serial, size_t serial_len)
function
unsigned int shesig_version
(shesig_t *cert)
function
void shesig_version_set
(shesig_t *cert, unsigned int ver)
function
uint64_t shesig_uid
(shesig_t *cert)
function
shkey_t* shesig_ctx
(shesig_t *cert)
function
void shesig_ctx_name_set
(shesig_t *cert, char *label)
function
void shesig_ctx_set
(shesig_t *cert, shkey_t *ctx_name)
function
shtime_t shesig_expire
(shesig_t *cert)
function
void shesig_expire_set
(shesig_t *cert, shtime_t stamp)
function
shtime_t shesig_stamp
(shesig_t *cert)
function
void shesig_stamp_set
(shesig_t *cert, shtime_t stamp)
function
char* shesig_iss
(shesig_t *cert)
function
void shesig_iss_set
(shesig_t *cert, char *name)
function
char* shesig_ent
(shesig_t *cert)
function
void shesig_ent_set
(shesig_t *cert, char *name)
function
int shesig_load_alias
(char *label, shesig_t **cert_p)
function
int shesig_load
(shkey_t *id, shesig_t **cert_p)
function
int shesig_load_path
(char *fname, shesig_t **cert_p)
function
int shesig_save
(shesig_t *cert, shbuf_t *buff)
function
int shesig_remove_alias
(char *label)
function
int shesig_remove_label
(char *ref_path)
function
int shlic_apply
(SHFL *file, shesig_t *cert, unsigned char *key_data, size_t key_len)
[ ]
Apply a licensing certificate to a shfs file.
function
int shlic_validate
(SHFL *file)
[ ]
Validates authorized licensing of a file.
function
int shlic_sign
(shlic_t *lic, shesig_t *parent, unsigned char *key_data, size_t key_len)
function
int shlic_set
(SHFL *file, shlic_t *lic)
[ ]
function
int shlic_get
(SHFL *file, shlic_t *ret_lic)
[ ]
define
SHENCRYPT_BLOCK_SIZE
8
define
SHESIG_VERSION
htonl(3UL)
define
SHESIG_ALG_DEFAULT
SHALG_ECDSA384R
define
TXREF_SYMBOL
0
A symbolic reference of with no systematic use.
define
TXREF_TEST
1
A symbolic reference for testing-use only.
define
TXREF_TX
10
define
TXREF_SHCTX
20
define
TXREF_PUBADDR
30
define
TXREF_CERT
31
define
shesig_sub_pub
((_cert)->pub)
The subject's public key from a share certificate.
define
shesig_sub_sig
((_cert)->data_sig)
A signature of the parent certicate's public key.
define
shesig_sub_stamp
((_cert)->stamp)
The share time-stamp of when the certificate subject's signature becomes valid.
define
shesig_sub_expire
((_cert)->expire)
The share time-stamp of when the certificate subject's signature validicity expires.
define
shesig_sub_alg
(ntohl((_cert)->alg))
Obtain the subject's signature algorithm from a share certificate.
define
shesig_sub_alg_set
((_cert)->alg = htonl(_alg))
define
shesig_sub_ser
((_cert)->ser)
Obtain the serial number of the certificate.
define
shesig_sub_len
(shalg_size((_cert)->data_sig)/2)
Obtain the length of the context used to create the signature.