3 * Copyright (c) 2006-2007, Jouni Malinen <j@w1.fi>
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
12 struct tlsv1_credentials {
13 struct x509_certificate *trusted_certs;
14 struct x509_certificate *cert;
15 struct crypto_private_key *key;
17 unsigned int cert_probe:1;
18 unsigned int ca_cert_verify:1;
19 unsigned int server_cert_only:1;
22 /* Diffie-Hellman parameters */
25 u8 *dh_g; /* generator */
30 struct tlsv1_credentials * tlsv1_cred_alloc(void);
31 void tlsv1_cred_free(struct tlsv1_credentials *cred);
32 int tlsv1_set_ca_cert(struct tlsv1_credentials *cred, const char *cert,
33 const u8 *cert_blob, size_t cert_blob_len,
35 int tlsv1_set_cert(struct tlsv1_credentials *cred, const char *cert,
36 const u8 *cert_blob, size_t cert_blob_len);
37 int tlsv1_set_private_key(struct tlsv1_credentials *cred,
38 const char *private_key,
39 const char *private_key_passwd,
40 const u8 *private_key_blob,
41 size_t private_key_blob_len);
42 int tlsv1_set_dhparams(struct tlsv1_credentials *cred, const char *dh_file,
43 const u8 *dh_blob, size_t dh_blob_len);
45 #endif /* TLSV1_CRED_H */