00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TLSV1_CRED_H
00016 #define TLSV1_CRED_H
00017
00018 struct tlsv1_credentials {
00019 struct x509_certificate *trusted_certs;
00020 struct x509_certificate *cert;
00021 struct crypto_private_key *key;
00022
00023
00024 u8 *dh_p;
00025 size_t dh_p_len;
00026 u8 *dh_g;
00027 size_t dh_g_len;
00028 };
00029
00030
00031 struct tlsv1_credentials * tlsv1_cred_alloc(void);
00032 void tlsv1_cred_free(struct tlsv1_credentials *cred);
00033 int tlsv1_set_ca_cert(struct tlsv1_credentials *cred, const char *cert,
00034 const u8 *cert_blob, size_t cert_blob_len,
00035 const char *path);
00036 int tlsv1_set_cert(struct tlsv1_credentials *cred, const char *cert,
00037 const u8 *cert_blob, size_t cert_blob_len);
00038 int tlsv1_set_private_key(struct tlsv1_credentials *cred,
00039 const char *private_key,
00040 const char *private_key_passwd,
00041 const u8 *private_key_blob,
00042 size_t private_key_blob_len);
00043 int tlsv1_set_dhparams(struct tlsv1_credentials *cred, const char *dh_file,
00044 const u8 *dh_blob, size_t dh_blob_len);
00045
00046 #endif