-
- BlackBerry Dynamics
- Runtime library for iOS applications
- 12.0.1.79
Go to the documentation of this file.
17 # define GD_C_API __attribute__((visibility("default")))
40 struct GD_C_API GDX509;
47 GD_C_API
struct GDX509*
GDX509_copy(
const struct GDX509* cert);
59 struct GD_C_API GDX509List;
70 struct GD_C_API GDDigestContext;
79 struct GD_C_API GDX509List*
GDX509List_read(
const char* pem,
int pem_length);
87 struct GD_C_API GDX509List*
GDX509List_copy(
const struct GDX509List* certs);
104 GD_C_API
const struct GDX509*
GDX509List_value(
const struct GDX509List* certs,
int index);
113 GD_C_API
void GDX509List_insert(
const struct GDX509List* certs,
int index,
const struct GDX509* cert);
129 GD_C_API
bool GDX509List_evaluate(
const struct GDX509List* certs,
const struct GDX509List* not_used,
const char* hostname,
char** reason);
189 struct GD_C_API GDKey;
194 struct GD_C_API GDKeyContext;
220 GD_C_API
struct GDKey*
GDKey_public(
const struct GDX509* cert);
229 GD_C_API
struct GDKey*
GDKey_private(
const struct GDX509* cert);
245 GD_C_API
int GDKey_compare(
const struct GDKey* a,
const struct GDKey* b);
254 GD_C_API
int GDKey_size(
const struct GDKey* key);
262 GD_C_API
int GDKey_bits(
const struct GDKey* key);
270 GD_C_API
int GDKey_type(
const struct GDKey* key);
278 GD_C_API
const char*
GDKey_name(
const struct GDKey* key);
323 GD_C_API
int GDKey_sign(
struct GDKeyContext* ctx,
void* signature,
size_t* signature_length,
const void* message,
size_t message_length);
344 GD_C_API
int GDKey_verify(
struct GDKeyContext* ctx,
const void* signature,
size_t signature_length,
const void* message,
size_t message_length);
364 GD_C_API
int GDKey_encrypt(
struct GDKeyContext* ctx,
void* encrypted,
size_t* encrypted_length,
const void* clear,
size_t clear_length);
384 GD_C_API
int GDKey_decrypt(
struct GDKeyContext* ctx,
void* clear,
size_t* clear_length,
const void* encrypted,
size_t encrypted_length);
395 GD_C_API
int GDKey_sign_final(
struct GDDigestContext* digest,
void* signature,
unsigned int* signature_length,
struct GDKey* key);
407 GD_C_API
int GDKey_verify_final(
struct GDDigestContext* digest,
const void* signature,
unsigned int signature_length,
struct GDKey* key);
int GDKey_sign_init(struct GDKeyContext *ctx)
Initialize a key context for signing.
int GDKey_encrypt_init(struct GDKeyContext *ctx)
Initialize a key context for encryption.
int GDKey_decrypt(struct GDKeyContext *ctx, void *clear, size_t *clear_length, const void *encrypted, size_t encrypted_length)
Decrypt data.
void GDX509List_insert(const struct GDX509List *certs, int index, const struct GDX509 *cert)
Insert a certificate into the list.
int GDKey_encrypt(struct GDKeyContext *ctx, void *encrypted, size_t *encrypted_length, const void *clear, size_t clear_length)
Encrypt data.
struct GDKey * GDKey_public(const struct GDX509 *cert)
Retrieve the public key.
struct GDX509List * GDX509List_valid_user_signing_certs(void)
Retrieve all valid user certificates managed by Dynamics.
struct GDX509 * GDX509_copy(const struct GDX509 *cert)
Copy a X509 structure.
int GDKey_set_signature_md(struct GDKeyContext *ctx, const struct GDDigest *digest)
Sets the message digest type used in a signature.
int GDKey_type(const struct GDKey *key)
Key type.
bool GDX509List_evaluate(const struct GDX509List *certs, const struct GDX509List *not_used, const char *hostname, char **reason)
Evaluate a certificate chain.
struct GDX509List * GDX509List_all_user_encryption_certs(void)
Retrieve all user encryption certificates managed by Dynamics.
struct GDX509List * GDX509List_trusted_authorities(void)
Retrieve a list of trusted X509 certificate authorities.
struct GDX509List * GDX509List_aux_certs(const struct GDX509 *cert)
Retrieve a certificate chain for a user certificate.
struct GDKey * GDKey_private(const struct GDX509 *cert)
Retrieve an opaque private key corresponding to a user certificate.
int GDKey_get_signature_md(struct GDKeyContext *ctx, const struct GDDigest **digest)
Returns the message digest type.
int GDKey_compare(const struct GDKey *a, const struct GDKey *b)
Compare two keys.
int GDKey_bits(const struct GDKey *key)
Key size.
int GDKey_sign_final(struct GDDigestContext *digest, void *signature, unsigned int *signature_length, struct GDKey *key)
Sign a digest.
int GDKey_verify_init(struct GDKeyContext *ctx)
Initialize a key context for verification.
const struct GDX509 * GDX509List_value(const struct GDX509List *certs, int index)
Retrieve an X509 certificate from a list.
struct GDX509List * GDX509List_read(const char *pem, int pem_length)
Retrieve a list of X509 certificates within a PEM container.
int GDKey_decrypt_init(struct GDKeyContext *ctx)
Initialize a key context for decryption.
int GDDigest(const void *data, size_t data_sz, void *md, unsigned int *md_sz, const struct GDDigest *type)
Calculate a digest.
int GDX509List_num(const struct GDX509List *certs)
Count the number of X509 certificates.
void GDKey_free(struct GDKey *key)
Free a key structure.
void GDX509List_free(struct GDX509List *certs)
Free a X509 list structure.
int GDFIPS_mode(void)
Retrieve the current FIPS 140-2 mode of operation.
const int GDKEY_TYPE_DSA
DSA key type.
struct GDX509List * GDX509List_all_user_certs(void)
Retrieve all user certificates managed by Dynamics.
int GDKey_verify_final(struct GDDigestContext *digest, const void *signature, unsigned int signature_length, struct GDKey *key)
Verify a digest.
struct GDX509List * GDX509List_copy(const struct GDX509List *certs)
Copy a list of X509 certificates.
const char * GDKey_name(const struct GDKey *key)
Return the key algorithm name.
void GDX509_free(struct GDX509 *cert)
Free a X509 structure.
int GDKey_verify(struct GDKeyContext *ctx, const void *signature, size_t signature_length, const void *message, size_t message_length)
Verify a signed message.
int GDKey_size(const struct GDKey *key)
Signature size.
const int GDKEY_TYPE_RSA
RSA key type.
struct GDKeyContext * GDKeyContext_copy(struct GDKeyContext *ctx)
Copy a key context.
void GDKeyContext_free(struct GDKeyContext *ctx)
Free a key context.
struct GDX509List * GDX509List_valid_user_encryption_certs(void)
Retrieve all valid user encryption certificates managed by Dynamics.
struct GDKeyContext * GDKeyContext_new(struct GDKey *key)
Create a new key context.
const int GDKEY_TYPE_EC
EC key type.
int GDKey_sign(struct GDKeyContext *ctx, void *signature, size_t *signature_length, const void *message, size_t message_length)
Sign a message.