EGEE
Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

eds-simple.h File Reference

#include <openssl/evp.h>

Go to the source code of this file.

Functions

char ** glite_eds_get_catalog_endpoints (int *count, char **error)
 Get endpoints of default catalog service and all associated services.
int glite_eds_register (char *id, char *cipher, int keysize, char **error)
 Register a new file in Hydra: create key entries (key/iv/...).
EVP_CIPHER_CTX * glite_eds_register_encrypt_init (char *id, char *cipher, int keysize, char **error)
 Register a new file in Hydra: create key entries (key/iv/...), initalizes encryption context.
EVP_CIPHER_CTX * glite_eds_encrypt_init (char *id, char **error)
 Initialize encryption context for a file.
EVP_CIPHER_CTX * glite_eds_decrypt_init (char *id, char **error)
 Initialize decryption context for a file.
int glite_eds_encrypt_block (EVP_CIPHER_CTX *ectx, char *mem_in, int mem_in_size, char **mem_out, int *mem_out_size, char **error)
 Encrypts a memory block using the encryption context.
int glite_eds_encrypt_final (EVP_CIPHER_CTX *ectx, char **mem_out, int *mem_out_size, char **error)
 Finalizes memory block encryption.
int glite_eds_decrypt_block (EVP_CIPHER_CTX *dctx, char *mem_in, int mem_in_size, char **mem_out, int *mem_out_size, char **error)
 Decrypts a memory block using the encryption context.
int glite_eds_decrypt_final (EVP_CIPHER_CTX *dctx, char **mem_out, int *mem_out_size, char **error)
 Finalizes memory block encryption.
int glite_eds_finalize (EVP_CIPHER_CTX *ctx, char **error)
 Finalize an encryption/decryption context.
int glite_eds_unregister (char *id, char **error)
 Unregister catalog entries in case of error (key/iv).


Function Documentation

int glite_eds_decrypt_block EVP_CIPHER_CTX *  dctx,
char *  mem_in,
int  mem_in_size,
char **  mem_out,
int *  mem_out_size,
char **  error
 

Decrypts a memory block using the encryption context.

Parameters:
dctx Decryption context
mem_in Memory block to decrypt
mem_in_size Memory block size
mem_out [OUT] Decrypted memory block's address
mem_out_size [OUT] Decrypted memory block's size
error [OUT] Pointer to the error string.
Returns:
0 in case of there was no error. In other cases, *error contains the error string. The caller is responsible for freeing the allocated string and the returned memory block in case of success

int glite_eds_decrypt_final EVP_CIPHER_CTX *  dctx,
char **  mem_out,
int *  mem_out_size,
char **  error
 

Finalizes memory block encryption.

Parameters:
dctx Decryption context
mem_out [OUT] Decrypted memory block's address
mem_out_size [OUT] Decrypted memory block's size
error [OUT] Pointer to the error string.
Returns:
0 in case of there was no error. In other cases, *error contains the error string. The caller is responsible for freeing the allocated string and the returned memory block in case of success

EVP_CIPHER_CTX* glite_eds_decrypt_init char *  id,
char **  error
 

Initialize decryption context for a file.

Query key/iv/... from key storage

Parameters:
id The ID by which the crypt key is stored (remote file name or GUID).
error [OUT] Pointer to the error string.
Returns:
Decryption context in case of no error. In other cases NULL is returned, and *error contains the error string. The caller is responsible for freeing the allocated error string.

int glite_eds_encrypt_block EVP_CIPHER_CTX *  ectx,
char *  mem_in,
int  mem_in_size,
char **  mem_out,
int *  mem_out_size,
char **  error
 

Encrypts a memory block using the encryption context.

Parameters:
ectx Encryption context
mem_in Memory block to encrypt
mem_in_size Memory block size
mem_out [OUT] Encrypted memory block's address
mem_out_size [OUT] Encrypted memory block's size
error [OUT] Pointer to the error string.
Returns:
0 in case of there was no error. In other cases, *error contains the error string. The caller is responsible for freeing the allocated string and the returned memory block in case of success

int glite_eds_encrypt_final EVP_CIPHER_CTX *  ectx,
char **  mem_out,
int *  mem_out_size,
char **  error
 

Finalizes memory block encryption.

Parameters:
ectx Encryption context
mem_out [OUT] Encrypted memory block's address
mem_out_size [OUT] Encrypted memory block's size
error [OUT] Pointer to the error string.
Returns:
0 in case of there was no error. In other cases, *error contains the error string. The caller is responsible for freeing the allocated string and the returned memory block in case of success

EVP_CIPHER_CTX* glite_eds_encrypt_init char *  id,
char **  error
 

Initialize encryption context for a file.

Query key/iv/... from key storage

Parameters:
id The ID by which the crypt key is stored (remote file name or GUID)
error [OUT] Pointer to the error string.
Returns:
Encryption context in case of no error. In other cases NULL is returned, and *error contains the error string. The caller is responsible for freeing the allocated error string.

int glite_eds_finalize EVP_CIPHER_CTX *  ctx,
char **  error
 

Finalize an encryption/decryption context.

Parameters:
ctx Encryption/decryption context
error [OUT] Pointer to the error string.
Returns:
0 in case of there was no error. In other cases, *error contains the error string. The caller is responsible for freeing the allocated string and the returned memory block in case of success

char** glite_eds_get_catalog_endpoints int *  count,
char **  error
 

Get endpoints of default catalog service and all associated services.

Parameters:
count [OUT] count of returned endpoints.
error [OUT] Pointer to the error string.
Returns:
list of endpoints. The caller is responsible for freeing the allocated structure. In error cases the NULL is returned and *error contains the error string. The caller is responsible for freeing the allocated error string.

int glite_eds_register char *  id,
char *  cipher,
int  keysize,
char **  error
 

Register a new file in Hydra: create key entries (key/iv/...).

Parameters:
id The SURL or GUID of the remote file.
cipher The cipher name to use.
keysize Key size to use in bits.
error [OUT] Pointer to the error string.
Returns:
0 in case of no error. In other cases *error contains the error string. The caller is responsible for freeing the allocated error string.

EVP_CIPHER_CTX* glite_eds_register_encrypt_init char *  id,
char *  cipher,
int  keysize,
char **  error
 

Register a new file in Hydra: create key entries (key/iv/...), initalizes encryption context.

Parameters:
id The ID by which the crypt will be registered (remote file name or GUID).
cipher The cipher name to use.
keysize Key size to use in bits.
error [OUT] Pointer to the error string.
Returns:
Encryption context in case of no error. In other cases NULL is returned, and *error contains the error string. The caller is responsible for freeing the allocated error string.

int glite_eds_unregister char *  id,
char **  error
 

Unregister catalog entries in case of error (key/iv).

Parameters:
id The ID by which the crypt key is stored (remote file name or GUID).
error [OUT] Pointer to the error string.
Returns:
0 in case of there was no error. In other cases, *error contains the error string. The caller is responsible for freeing the allocated string and the returned memory block in case of success
The GLite Project. All rights reserved.