summaryrefslogtreecommitdiffstats
path: root/tdeio/kssl/ksslutils.h
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2013-03-02 15:57:34 -0600
committerDarrell Anderson <humanreadable@yahoo.com>2013-03-02 15:57:34 -0600
commit7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f (patch)
treec76702a7f6310fbe9d437e347535422e836e94e9 /tdeio/kssl/ksslutils.h
parenta2a38be7600e2a2c2b49c66902d912ca036a2c0f (diff)
parent27bbee9a5f9dcda53d8eb23863ee670ad1360e41 (diff)
downloadtdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.tar.gz
tdelibs-7c0b0c9dc9fcbe9c198925bdc7ee18ac6be49f4f.zip
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdelibs
Diffstat (limited to 'tdeio/kssl/ksslutils.h')
-rw-r--r--tdeio/kssl/ksslutils.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/tdeio/kssl/ksslutils.h b/tdeio/kssl/ksslutils.h
new file mode 100644
index 000000000..58a817e83
--- /dev/null
+++ b/tdeio/kssl/ksslutils.h
@@ -0,0 +1,77 @@
+/* This file is part of the KDE project
+ *
+ * Copyright (C) 2000-2003 George Staikos <staikos@kde.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#ifndef _INCLUDE_KSSLUTILS_H
+#define _INCLUDE_KSSLUTILS_H
+
+#include <kdemacros.h>
+
+#ifdef Q_WS_WIN
+#include "ksslconfig_win.h"
+#else
+#include "ksslconfig.h"
+#endif
+
+#include <unistd.h>
+#ifdef KSSL_HAVE_SSL
+#define crypt _openssl_crypt
+#include <openssl/x509.h>
+#undef crypt
+#endif
+class TQString;
+class TQDateTime;
+
+
+#ifdef KSSL_HAVE_SSL
+// This functionality is missing in OpenSSL
+/**
+ * Convert an ASN1 UTCTIME value to a string. Uses TDELocale settings.
+ *
+ * @param tm the OpenSSL ASN1_UTCTIME pointer
+ *
+ * @return the date formatted in a QString
+ * @see ASN1_UTCTIME_QDateTime
+ */
+KDE_EXPORT TQString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm);
+
+/**
+ * Convert an ASN1 UTCTIME value to a TQDateTime. Uses TDELocale settings.
+ *
+ * @param tm the OpenSSL ASN1_UTCTIME pointer
+ * @param isGmt set to 1 if the date is set to GMT
+ *
+ * @return the date formatted in a QDateTime
+ */
+KDE_EXPORT TQDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt);
+
+
+/**
+ * Convert an ASN1 INTEGER value to a string.
+ *
+ * @param aint the OpenSSL ASN1_INTEGER pointer
+ *
+ * @return the number formatted in a QString
+ */
+KDE_EXPORT TQString ASN1_INTEGER_QString(ASN1_INTEGER *aint);
+#endif
+
+
+
+
+#endif