35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
/*
|
|
* agent_ssl.h
|
|
*
|
|
* Copyright (C) 2018 by Bogomil Vasilev <b.vasilev@smirky.net>
|
|
*
|
|
* This file is part of Remote Management and Provisioning System (RMPS).
|
|
*
|
|
* RMPS is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* RMPS is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with RMPS. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef AGENT_SSL
|
|
#define AGENT_SSL
|
|
|
|
#include <openssl/ssl.h>
|
|
#include <openssl/err.h>
|
|
|
|
int connect_to_rmps(const char *hostname, int port);
|
|
SSL_CTX* init_ctx();
|
|
int verify_callback (int ok, X509_STORE_CTX *store);
|
|
void show_certs(SSL* ssl);
|
|
void load_certs(SSL_CTX *ctx, char *key, char *cert, char *ca);
|
|
|
|
#endif /* AGENT_SSL */
|