wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Functions
tlsv1_cred.h File Reference

TLSv1 credentials. More...

Go to the source code of this file.

Data Structures

struct  tlsv1_credentials
 

Functions

struct tlsv1_credentialstlsv1_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...
 

Detailed Description

TLSv1 credentials.

Function Documentation

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
credTLSv1 credentials from tlsv1_cred_alloc()
certFile or reference name for X.509 certificate in PEM or DER format
cert_blobcert as inlined data or NULL if not used
cert_blob_lenca_cert_blob length
pathPath 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
credTLSv1 credentials from tlsv1_cred_alloc()
certFile or reference name for X.509 certificate in PEM or DER format
cert_blobcert as inlined data or NULL if not used
cert_blob_lencert_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
credTLSv1 credentials from tlsv1_cred_alloc()
dh_fileFile or reference name for the DH params in PEM or DER format
dh_blobDH params as inlined data or NULL if not used
dh_blob_lendh_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
credTLSv1 credentials from tlsv1_cred_alloc()
private_keyFile or reference name for the key in PEM or DER format
private_key_passwdPassphrase for decrypted private key, NULL if no passphrase is used.
private_key_blobprivate_key as inlined data or NULL if not used
private_key_blob_lenprivate_key_blob length
Returns
0 on success, -1 on failure