Functions | Variables
tlsv1_cred.c File Reference
#include "includes.h"
#include "common.h"
#include "base64.h"
#include "crypto/crypto.h"
#include "x509v3.h"
#include "tlsv1_cred.h"
Include dependency graph for tlsv1_cred.c:

Go to the source code of this file.

Functions

static const u8 * search_tag (const char *tag, const u8 *buf, size_t len)
static int tlsv1_add_cert (struct x509_certificate **chain, const u8 *buf, size_t len)
static int tlsv1_add_cert_der (struct x509_certificate **chain, const u8 *buf, size_t len)
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)
int tlsv1_set_cert (struct tlsv1_credentials *cred, const char *cert, const u8 *cert_blob, size_t cert_blob_len)
static int tlsv1_set_cert_chain (struct x509_certificate **chain, const char *cert, const u8 *cert_blob, size_t cert_blob_len)
int tlsv1_set_dhparams (struct tlsv1_credentials *cred, const char *dh_file, const u8 *dh_blob, size_t dh_blob_len)
static int tlsv1_set_dhparams_blob (struct tlsv1_credentials *cred, const u8 *buf, size_t len)
static int tlsv1_set_dhparams_der (struct tlsv1_credentials *cred, const u8 *dh, size_t len)
static int tlsv1_set_key (struct tlsv1_credentials *cred, const u8 *key, size_t len, const char *passwd)
static struct crypto_private_keytlsv1_set_key_enc_pem (const u8 *key, size_t len, const char *passwd)
static struct crypto_private_keytlsv1_set_key_pem (const u8 *key, size_t len)
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)

Variables

static const char * pem_cert_begin = "-----BEGIN CERTIFICATE-----"
static const char * pem_cert_end = "-----END CERTIFICATE-----"
static const char * pem_dhparams_begin = "-----BEGIN DH PARAMETERS-----"
static const char * pem_dhparams_end = "-----END DH PARAMETERS-----"
static const char * pem_key2_begin = "-----BEGIN PRIVATE KEY-----"
static const char * pem_key2_end = "-----END PRIVATE KEY-----"
static const char * pem_key_begin = "-----BEGIN RSA PRIVATE KEY-----"
static const char * pem_key_enc_begin = "-----BEGIN ENCRYPTED PRIVATE KEY-----"
static const char * pem_key_enc_end = "-----END ENCRYPTED PRIVATE KEY-----"
static const char * pem_key_end = "-----END RSA PRIVATE KEY-----"

Function Documentation

static const u8* search_tag ( const char *  tag,
const u8 *  buf,
size_t  len 
) [static]

Definition at line 79 of file tlsv1_cred.c.

static int tlsv1_add_cert ( struct x509_certificate **  chain,
const u8 *  buf,
size_t  len 
) [static]

Definition at line 96 of file tlsv1_cred.c.

static int tlsv1_add_cert_der ( struct x509_certificate **  chain,
const u8 *  buf,
size_t  len 
) [static]

Definition at line 46 of file tlsv1_cred.c.

struct tlsv1_credentials* tlsv1_cred_alloc ( void  ) [read]

Definition at line 24 of file tlsv1_cred.c.

void tlsv1_cred_free ( struct tlsv1_credentials cred)

Definition at line 32 of file tlsv1_cred.c.

int tlsv1_set_ca_cert ( struct tlsv1_credentials cred,
const char *  cert,
const u8 *  cert_blob,
size_t  cert_blob_len,
const char *  path 
)

tlsv1_set_ca_cert - Set trusted CA certificate(s) : TLSv1 credentials from tlsv1_cred_alloc() : File or reference name for X.509 certificate in PEM or DER format : cert as inlined data or NULL if not used : ca_cert_blob length : Path to CA certificates (not yet supported) Returns: 0 on success, -1 on failure

Definition at line 183 of file tlsv1_cred.c.

int tlsv1_set_cert ( struct tlsv1_credentials cred,
const char *  cert,
const u8 *  cert_blob,
size_t  cert_blob_len 
)

tlsv1_set_cert - Set certificate : TLSv1 credentials from tlsv1_cred_alloc() : File or reference name for X.509 certificate in PEM or DER format : cert as inlined data or NULL if not used : cert_blob length Returns: 0 on success, -1 on failure

Definition at line 210 of file tlsv1_cred.c.

static int tlsv1_set_cert_chain ( struct x509_certificate **  chain,
const char *  cert,
const u8 *  cert_blob,
size_t  cert_blob_len 
) [static]

Definition at line 146 of file tlsv1_cred.c.

int tlsv1_set_dhparams ( struct tlsv1_credentials cred,
const char *  dh_file,
const u8 *  dh_blob,
size_t  dh_blob_len 
)

tlsv1_set_dhparams - Set Diffie-Hellman parameters : TLSv1 credentials from tlsv1_cred_alloc() : File or reference name for the DH params in PEM or DER format : DH params as inlined data or NULL if not used : dh_blob length Returns: 0 on success, -1 on failure

Definition at line 469 of file tlsv1_cred.c.

static int tlsv1_set_dhparams_blob ( struct tlsv1_credentials cred,
const u8 *  buf,
size_t  len 
) [static]

Definition at line 417 of file tlsv1_cred.c.

static int tlsv1_set_dhparams_der ( struct tlsv1_credentials cred,
const u8 *  dh,
size_t  len 
) [static]

Definition at line 339 of file tlsv1_cred.c.

static int tlsv1_set_key ( struct tlsv1_credentials cred,
const u8 *  key,
size_t  len,
const char *  passwd 
) [static]

Definition at line 278 of file tlsv1_cred.c.

static struct crypto_private_key* tlsv1_set_key_enc_pem ( const u8 *  key,
size_t  len,
const char *  passwd 
) [static, read]

Definition at line 250 of file tlsv1_cred.c.

static struct crypto_private_key* tlsv1_set_key_pem ( const u8 *  key,
size_t  len 
) [static, read]

Definition at line 218 of file tlsv1_cred.c.

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 
)

tlsv1_set_private_key - Set private key : TLSv1 credentials from tlsv1_cred_alloc() : File or reference name for the key in PEM or DER format : Passphrase for decrypted private key, NULL if no passphrase is used. : private_key as inlined data or NULL if not used : private_key_blob length Returns: 0 on success, -1 on failure

Definition at line 304 of file tlsv1_cred.c.


Variable Documentation

const char* pem_cert_begin = "-----BEGIN CERTIFICATE-----" [static]

Definition at line 69 of file tlsv1_cred.c.

const char* pem_cert_end = "-----END CERTIFICATE-----" [static]

Definition at line 70 of file tlsv1_cred.c.

const char* pem_dhparams_begin = "-----BEGIN DH PARAMETERS-----" [static]

Definition at line 413 of file tlsv1_cred.c.

const char* pem_dhparams_end = "-----END DH PARAMETERS-----" [static]

Definition at line 414 of file tlsv1_cred.c.

const char* pem_key2_begin = "-----BEGIN PRIVATE KEY-----" [static]

Definition at line 73 of file tlsv1_cred.c.

const char* pem_key2_end = "-----END PRIVATE KEY-----" [static]

Definition at line 74 of file tlsv1_cred.c.

const char* pem_key_begin = "-----BEGIN RSA PRIVATE KEY-----" [static]

Definition at line 71 of file tlsv1_cred.c.

const char* pem_key_enc_begin = "-----BEGIN ENCRYPTED PRIVATE KEY-----" [static]

Definition at line 75 of file tlsv1_cred.c.

const char* pem_key_enc_end = "-----END ENCRYPTED PRIVATE KEY-----" [static]

Definition at line 76 of file tlsv1_cred.c.

const char* pem_key_end = "-----END RSA PRIVATE KEY-----" [static]

Definition at line 72 of file tlsv1_cred.c.



wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:26:43