TLSv1 credentials.
More...
Go to the source code of this file.
|
struct tlsv1_credentials * | tlsv1_cred_alloc (void) |
|
void | tlsv1_cred_free (struct tlsv1_credentials *cred) |
|
int | tlsv1_set_ca_cert (struct tlsv1_credentials *cred, const char *cert, const u8 *cert_blob, size_t cert_blob_len, const char *path) |
| Set trusted CA certificate(s) More...
|
|
int | tlsv1_set_cert (struct tlsv1_credentials *cred, const char *cert, const u8 *cert_blob, size_t cert_blob_len) |
| Set certificate. More...
|
|
int | tlsv1_set_private_key (struct tlsv1_credentials *cred, const char *private_key, const char *private_key_passwd, const u8 *private_key_blob, size_t private_key_blob_len) |
| Set private key. More...
|
|
int | tlsv1_set_dhparams (struct tlsv1_credentials *cred, const char *dh_file, const u8 *dh_blob, size_t dh_blob_len) |
| Set Diffie-Hellman parameters. More...
|
|
int tlsv1_set_ca_cert |
( |
struct tlsv1_credentials * |
cred, |
|
|
const char * |
cert, |
|
|
const u8 * |
cert_blob, |
|
|
size_t |
cert_blob_len, |
|
|
const char * |
path |
|
) |
| |
Set trusted CA certificate(s)
- Parameters
-
cred | TLSv1 credentials from tlsv1_cred_alloc() |
cert | File or reference name for X.509 certificate in PEM or DER format |
cert_blob | cert as inlined data or NULL if not used |
cert_blob_len | ca_cert_blob length |
path | Path to CA certificates (not yet supported) |
- Returns
- 0 on success, -1 on failure
int tlsv1_set_cert |
( |
struct tlsv1_credentials * |
cred, |
|
|
const char * |
cert, |
|
|
const u8 * |
cert_blob, |
|
|
size_t |
cert_blob_len |
|
) |
| |
Set certificate.
- Parameters
-
cred | TLSv1 credentials from tlsv1_cred_alloc() |
cert | File or reference name for X.509 certificate in PEM or DER format |
cert_blob | cert as inlined data or NULL if not used |
cert_blob_len | cert_blob length |
- Returns
- 0 on success, -1 on failure
int tlsv1_set_dhparams |
( |
struct tlsv1_credentials * |
cred, |
|
|
const char * |
dh_file, |
|
|
const u8 * |
dh_blob, |
|
|
size_t |
dh_blob_len |
|
) |
| |
Set Diffie-Hellman parameters.
- Parameters
-
cred | TLSv1 credentials from tlsv1_cred_alloc() |
dh_file | File or reference name for the DH params in PEM or DER format |
dh_blob | DH params as inlined data or NULL if not used |
dh_blob_len | dh_blob length |
- Returns
- 0 on success, -1 on failure
int tlsv1_set_private_key |
( |
struct tlsv1_credentials * |
cred, |
|
|
const char * |
private_key, |
|
|
const char * |
private_key_passwd, |
|
|
const u8 * |
private_key_blob, |
|
|
size_t |
private_key_blob_len |
|
) |
| |
Set private key.
- Parameters
-
cred | TLSv1 credentials from tlsv1_cred_alloc() |
private_key | File or reference name for the key in PEM or DER format |
private_key_passwd | Passphrase for decrypted private key, NULL if no passphrase is used. |
private_key_blob | private_key as inlined data or NULL if not used |
private_key_blob_len | private_key_blob length |
- Returns
- 0 on success, -1 on failure