2 * Copyright (C) 2012-2017 Tobias Brunner
4 * Copyright (C) secunet Security Networks AG
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 * @defgroup android_creds android_creds
19 * @{ @ingroup android_backend
22 #ifndef ANDROID_CREDS_H_
23 #define ANDROID_CREDS_H_
26 #include <credentials/credential_set.h>
28 typedef struct android_creds_t android_creds_t
;
31 * Android credential set that provides CA certificates via JNI and supplied
34 struct android_creds_t
{
37 * Implements credential_set_t
42 * Add user name and password for EAP authentication
44 * @param username user name
45 * @param password password
47 void (*add_username_password
)(android_creds_t
*this, char *username
,
51 * Load the user certificate and private key
53 * @return loaded client certificate, NULL on failure
55 certificate_t
*(*load_user_certificate
)(android_creds_t
*this);
58 * Clear the cached certificates and stored credentials.
60 void (*clear
)(android_creds_t
*this);
63 * Destroy a android_creds instance.
65 void (*destroy
)(android_creds_t
*this);
70 * Create an android_creds instance.
72 * @param crldir directory for cached CRLs
74 android_creds_t
*android_creds_create(char *crldir
);
76 #endif /** ANDROID_CREDS_H_ @}*/