aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/plugins/eap_tls/tls/tls_crypto.h
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-01-25 11:21:57 +0000
committerMartin Willi <martin@revosec.ch>2010-08-03 15:39:24 +0200
commit536dbc00b94d73de59f6ecad16c90370efc95d63 (patch)
tree6d06a698cb1fd0e0f4a08c8423c0bf2bdff5ddce /src/charon/plugins/eap_tls/tls/tls_crypto.h
parent9dc73cd21c5fe42d95ee9991d4bf962d9876f6c4 (diff)
downloadstrongswan-536dbc00b94d73de59f6ecad16c90370efc95d63.tar.bz2
strongswan-536dbc00b94d73de59f6ecad16c90370efc95d63.tar.xz
Added TLS crypto helper, currently supports cipher suite selection
Diffstat (limited to 'src/charon/plugins/eap_tls/tls/tls_crypto.h')
-rw-r--r--src/charon/plugins/eap_tls/tls/tls_crypto.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/charon/plugins/eap_tls/tls/tls_crypto.h b/src/charon/plugins/eap_tls/tls/tls_crypto.h
new file mode 100644
index 000000000..538ab1de0
--- /dev/null
+++ b/src/charon/plugins/eap_tls/tls/tls_crypto.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2010 Martin Willi
+ * Copyright (C) 2010 revosec AG
+ *
+ * This program 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. See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program 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.
+ */
+
+/**
+ * @defgroup tls_crypto tls_crypto
+ * @{ @ingroup tls
+ */
+
+#ifndef TLS_CRYPTO_H_
+#define TLS_CRYPTO_H_
+
+typedef struct tls_crypto_t tls_crypto_t;
+
+#include "tls.h"
+
+/**
+ * TLS crypto helper functions.
+ */
+struct tls_crypto_t {
+
+ /**
+ * Get a list of supported TLS cipher suites.
+ *
+ * @param suites allocated list of suites
+ * @return number of suites returned
+ */
+ int (*get_cipher_suites)(tls_crypto_t *this, tls_cipher_suite_t **suites);
+
+ /**
+ * Destroy a tls_crypto_t.
+ */
+ void (*destroy)(tls_crypto_t *this);
+};
+
+/**
+ * Create a tls_crypto instance.
+ */
+tls_crypto_t *tls_crypto_create();
+
+#endif /** TLS_CRYPTO_H_ @}*/