|
Packit Service |
4684c1 |
/*
|
|
Packit Service |
4684c1 |
* Copyright (C) 2018 Free Software Foundation, Inc.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* Author: Nikos Mavrogiannopoulos
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* This file is part of GnuTLS.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* The GnuTLS is free software; you can redistribute it and/or
|
|
Packit Service |
4684c1 |
* modify it under the terms of the GNU Lesser General Public License
|
|
Packit Service |
4684c1 |
* as published by the Free Software Foundation; either version 2.1 of
|
|
Packit Service |
4684c1 |
* the License, or (at your option) any later version.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* This library is distributed in the hope that it will be useful, but
|
|
Packit Service |
4684c1 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
4684c1 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
4684c1 |
* Lesser General Public License for more details.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* You should have received a copy of the GNU Lesser General Public License
|
|
Packit Service |
4684c1 |
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
*/
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#ifndef GNUTLS_LIB_CERT_CRED_H
|
|
Packit Service |
4684c1 |
#define GNUTLS_LIB_CERT_CRED_H
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#include <gnutls/abstract.h>
|
|
Packit Service |
4684c1 |
#include "str_array.h"
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int
|
|
Packit Service |
4684c1 |
_gnutls_certificate_credential_append_keypair(gnutls_certificate_credentials_t res,
|
|
Packit Service |
4684c1 |
gnutls_privkey_t key,
|
|
Packit Service |
4684c1 |
gnutls_str_array_t names,
|
|
Packit Service |
4684c1 |
gnutls_pcert_st * crt, int nr);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int
|
|
Packit Service |
4684c1 |
_gnutls_read_key_mem(gnutls_certificate_credentials_t res,
|
|
Packit Service |
4684c1 |
const void *key, int key_size, gnutls_x509_crt_fmt_t type,
|
|
Packit Service |
4684c1 |
const char *pass, unsigned int flags,
|
|
Packit Service |
4684c1 |
gnutls_privkey_t *rkey);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int
|
|
Packit Service |
4684c1 |
_gnutls_read_key_file(gnutls_certificate_credentials_t res,
|
|
Packit Service |
4684c1 |
const char *keyfile, gnutls_x509_crt_fmt_t type,
|
|
Packit Service |
4684c1 |
const char *pass, unsigned int flags,
|
|
Packit Service |
4684c1 |
gnutls_privkey_t *rkey);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int
|
|
Packit Service |
4684c1 |
_gnutls_get_x509_name(gnutls_x509_crt_t crt, gnutls_str_array_t * names);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#define CRED_RET_SUCCESS(cred) \
|
|
Packit Service |
4684c1 |
if (cred->flags & GNUTLS_CERTIFICATE_API_V2) { \
|
|
Packit Service |
4684c1 |
return cred->ncerts-1; \
|
|
Packit Service |
4684c1 |
} else { \
|
|
Packit Service |
4684c1 |
return 0; \
|
|
Packit Service |
4684c1 |
}
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#endif /* GNUTLS_LIB_CERT_CRED_H */
|