Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:00:17

0001 /*
0002  * Copyright (C) 2014 Red Hat, Inc.
0003  *
0004  * Author: Nikos Mavrogiannopoulos
0005  *
0006  * This file is part of GnuTLS.
0007  *
0008  * The GnuTLS is free software; you can redistribute it and/or
0009  * modify it under the terms of the GNU Lesser General Public License
0010  * as published by the Free Software Foundation; either version 2.1 of
0011  * the License, or (at your option) any later version.
0012  *
0013  * This library is distributed in the hope that it will be useful, but
0014  * WITHOUT ANY WARRANTY; without even the implied warranty of
0015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0016  * Lesser General Public License for more details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public License
0019  * along with this program.  If not, see <https://www.gnu.org/licenses/>
0020  *
0021  */
0022 
0023 #ifndef GNUTLS_SYSTEM_KEYS_H
0024 #define GNUTLS_SYSTEM_KEYS_H
0025 
0026 #include <gnutls/gnutls.h>
0027 #include <gnutls/x509.h>
0028 
0029 /* This API allows to access user key and certificate pairs that are
0030  * available in the current system. If any passwords are required,
0031  * they will be requested through the pin callbacks.
0032  */
0033 
0034 #ifdef __cplusplus
0035 extern "C" {
0036 #endif
0037 
0038 struct system_key_iter_st;
0039 typedef struct system_key_iter_st *gnutls_system_key_iter_t;
0040 
0041 void gnutls_system_key_iter_deinit(gnutls_system_key_iter_t iter);
0042 int gnutls_system_key_iter_get_info(gnutls_system_key_iter_t *iter,
0043                     unsigned cert_type
0044                     /* gnutls_certificate_type_t */,
0045                     char **cert_url, char **key_url,
0046                     char **label, gnutls_datum_t *der,
0047                     unsigned int flags);
0048 
0049 int gnutls_system_key_delete(const char *cert_url, const char *key_url);
0050 
0051 int gnutls_system_key_add_x509(gnutls_x509_crt_t crt,
0052                    gnutls_x509_privkey_t privkey, const char *label,
0053                    char **cert_url, char **key_url);
0054 
0055 #ifdef __cplusplus
0056 }
0057 #endif
0058 
0059 #endif /* GNUTLS_SYSTEM_KEYS_H */