use FQDN host in certificates
[claws.git] / src / ssl_certificate.h
index b225e9e082360b787adaf6fc71b2ae072d8edd96..6e0c8bc92abe14369c2cd8b38ef6a645d98de1b3 100644 (file)
@@ -17,8 +17,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifndef __SSL_CHECK_H__
-#define __SSL_CHECK_H__
+#ifndef __SSL_CERTIFICATE_H__
+#define __SSL_CERTIFICATE_H__
 
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #if USE_SSL
 
 #include <openssl/ssl.h>
+#include <openssl/objects.h>
 #include <glib.h>
 
-typedef enum {
-       SSL_CERTIFICATE_OK,
-       SSL_CERTIFICATE_UNKNOWN,
-       SSL_CERTIFICATE_CHANGED
-} SSLCertificateStatus;
-
 typedef struct _SSLCertificate SSLCertificate;
 
 struct _SSLCertificate
 {
+       X509 *x509_cert;
        gchar *host;
-       gchar *issuer;
-       gchar *subject;
-       gchar *fingerprint;
+       gushort port;
 };
 
-gboolean ssl_certificate_check (X509 *x509_cert, gchar *host, gchar *issuer, 
-                               gchar *subject, gchar *md);
+gboolean ssl_certificate_check (X509 *x509_cert, gchar *host, gushort port);
+SSLCertificate *ssl_certificate_find (gchar *host, gushort port);
+char* ssl_certificate_to_string(SSLCertificate *cert);
 
 #endif /* USE_SSL */
-#endif /* SSL_CHECK_H */
+#endif /* SSL_CERTIFICATE_H */