2
* Copyright (C) 2004-2014 Savoir-Faire Linux Inc.
4
* Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
5
* Vittorio Giovara <vittorio.giovara@savoirfairelinux.com>
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 3 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22
#ifndef SECURITY_EVALUATOR_H
23
#define SECURITY_EVALUATOR_H
32
* Check if the given .pem contains a valid private key.
34
* @return 0 if success, -1 otherwise
36
int containsPrivateKey(const char *pemPath);
39
* Check if the given .pem contains a valid certificate.
41
* @return 0 if success, -1 otherwise
43
int certificateIsValid(const char *caPath,
47
* Verify that the local hostname points to a valid SSL server by
48
* establishing a connection to it and by validating its certificate.
50
* @param host the DNS domain address that the certificate should feature
51
* @return 0 if success, -1 otherwise
53
int verifyHostnameCertificate(const char *host,