3 * Copyright (c) 2006-2007, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
18 struct tlsv1_credentials
{
19 struct x509_certificate
*trusted_certs
;
20 struct x509_certificate
*cert
;
21 struct crypto_private_key
*key
;
23 /* Diffie-Hellman parameters */
26 u8
*dh_g
; /* generator */
31 struct tlsv1_credentials
* tlsv1_cred_alloc(void);
32 void tlsv1_cred_free(struct tlsv1_credentials
*cred
);
33 int tlsv1_set_ca_cert(struct tlsv1_credentials
*cred
, const char *cert
,
34 const u8
*cert_blob
, size_t cert_blob_len
,
36 int tlsv1_set_cert(struct tlsv1_credentials
*cred
, const char *cert
,
37 const u8
*cert_blob
, size_t cert_blob_len
);
38 int tlsv1_set_private_key(struct tlsv1_credentials
*cred
,
39 const char *private_key
,
40 const char *private_key_passwd
,
41 const u8
*private_key_blob
,
42 size_t private_key_blob_len
);
43 int tlsv1_set_dhparams(struct tlsv1_credentials
*cred
, const char *dh_file
,
44 const u8
*dh_blob
, size_t dh_blob_len
);
46 #endif /* TLSV1_CRED_H */