Section: C Library Functions (3)Updated: Wed Dec 8 2010Local indexUp
NAME
Cipher, Identity and Protection Mechanisms -
Eet allows one to protect entries of an Eet_File individually.
Typedefs
typedef struct _Eet_Key Eet_Key Opaque handle that defines an identity (also known as key) in Eet's cipher system.
typedef int(* Eet_Key_Password_Callback )(char *buffer, int size, int rwflag, void *data)
Callback used to request if needed the password of a private key.
Functions
EAPI Eet_Key * eet_identity_open (const char *certificate_file, const char *private_key_file, Eet_Key_Password_Callback cb)
Create an Eet_Key needed for signing an eet file.
EAPI void eet_identity_close (Eet_Key *key)
Close and release all ressource used by an Eet_Key.
EAPI Eet_Erroreet_identity_set (Eet_File *ef, Eet_Key *key)
Set a key to sign a file.
EAPI void eet_identity_print (Eet_Key *key, FILE *out)
Display both private and public key of an Eet_Key.
EAPI const void * eet_identity_x509 (Eet_File *ef, int *der_length)
Get the x509 der certificate associated with an Eet_File.
EAPI const void * eet_identity_signature (Eet_File *ef, int *signature_length)
Get the raw signature associated with an Eet_File.
EAPI const void * eet_identity_sha1 (Eet_File *ef, int *sha1_length)
Get the SHA1 associated with a file.
EAPI void eet_identity_certificate_print (const unsigned char *certificate, int der_length, FILE *out)
Display the x509 der certificate to out.
Detailed Description
Eet allows one to protect entries of an Eet_File individually.
This may be used to ensure data was not tampered or that third party does not read your data.
See also:
Eet File Ciphered Main Functions
Image Store and Load using a Cipher
Typedef Documentation
typedef int(* Eet_Key_Password_Callback)(char *buffer, int size, int rwflag, void *data)
Callback used to request if needed the password of a private key. Parameters:
buffer the buffer where to store the password.
size the maximum password size (size of buffer, including '\0').
rwflag if the buffer is also readable or just writable.
data currently unused, may contain some context in future.
Returns:
1 on success and password was set to buffer, 0 on failure.
Create an Eet_Key needed for signing an eet file. The certificate should provide the public that match the private key. No verification is done to ensure that.
Parameters:
certificate_file The file where to find the certificate.
private_key_file The file that contains the private key.
cb Function to callback if password is required to unlock private key.