hostapd: Update vendor branch to 0.6.10
[dragonfly.git] / contrib / hostapd / src / tls / tlsv1_cred.h
blob8425fe4541266c34d05d920d5e0f509d43b5077a
1 /*
2 * TLSv1 credentials
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
10 * license.
12 * See README and COPYING for more details.
15 #ifndef TLSV1_CRED_H
16 #define TLSV1_CRED_H
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 */
24 u8 *dh_p; /* prime */
25 size_t dh_p_len;
26 u8 *dh_g; /* generator */
27 size_t dh_g_len;
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,
35 const char *path);
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 */