summaryrefslogtreecommitdiffstats
path: root/src/openvpn/ssl_verify_polarssl.h
diff options
context:
space:
mode:
authorSteffan Karger <steffan.karger@fox-it.com>2013-03-22 09:54:20 +0100
committerGert Doering <gert@greenie.muc.de>2013-03-22 16:53:23 +0100
commit4a56d19fc3aa59d0eebd99f102ecaaa3665c5088 (patch)
tree72a5f13e994bc2303b58d146524d728d61b8ab67 /src/openvpn/ssl_verify_polarssl.h
parent58fbb8046b203ca23708c1765ee84330d8809266 (diff)
downloadopenvpn-4a56d19fc3aa59d0eebd99f102ecaaa3665c5088.tar.gz
openvpn-4a56d19fc3aa59d0eebd99f102ecaaa3665c5088.tar.xz
openvpn-4a56d19fc3aa59d0eebd99f102ecaaa3665c5088.zip
PolarSSL-1.2 support
Add support for PolarSSL-1.2, which has changed the API in several places. This is a minimal port, new features have not been enabled. Only PolarSSL 1.2.5 and newer are accepted, as earlier versions contain unresolved (security) issues. Signed-off-by: Joachim Schipper <joachim.schipper@fox-it.com> Signed-off-by: Steffan Karger <steffan.karger@fox-it.com> Acked-by: Adriaan de Jong <dejong@fox-it.com> Message-Id: <1363942465-3251-2-git-send-email-steffan.karger@fox-it.com> URL: http://article.gmane.org/gmane.network.openvpn.devel/7436 Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/ssl_verify_polarssl.h')
-rw-r--r--src/openvpn/ssl_verify_polarssl.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/openvpn/ssl_verify_polarssl.h b/src/openvpn/ssl_verify_polarssl.h
index fceee66..b259081 100644
--- a/src/openvpn/ssl_verify_polarssl.h
+++ b/src/openvpn/ssl_verify_polarssl.h
@@ -55,27 +55,25 @@ typedef x509_cert openvpn_x509_cert_t;
* calls the PolarSSL library's \c ssl_set_verify_callback() function with \c
* verify_callback() as its callback argument.
*
- * It checks preverify_ok, and registers the certificate hash. If these steps
- * succeed, it calls the \c verify_cert() function, which performs
- * OpenVPN-specific verification.
+ * It checks *flags and registers the certificate hash. If these steps succeed,
+ * it calls the \c verify_cert() function, which performs OpenVPN-specific
+ * verification.
*
* @param session_obj - The OpenVPN \c tls_session associated with this object,
* as set during SSL session setup.
* @param cert - The certificate used by PolarSSL.
* @param cert_depth - The depth of the current certificate in the chain, with
* 0 being the actual certificate.
- * @param preverify_ok - Whether the remote OpenVPN peer's certificate
- * past verification. A value of 1 means it
- * verified successfully, 0 means it failed.
+ * @param flags - Whether the remote OpenVPN peer's certificate
+ * passed verification. A value of 0 means it
+ * verified successfully, any other value means it
+ * failed. \c verify_callback() is considered to have
+ * ok'ed this certificate if flags is 0 when it returns.
*
- * @return The return value indicates whether the supplied certificate is
- * allowed to set up a VPN tunnel. The following values can be
- * returned:
- * - \c 0: failure, this certificate is not allowed to connect.
- * - \c 1: success, this certificate is allowed to connect.
+ * @return The return value is 0 unless a fatal error occurred.
*/
int verify_callback (void *session_obj, x509_cert *cert, int cert_depth,
- int preverify_ok);
+ int *flags);
/** @} name Function for authenticating a new connection from a remote OpenVPN peer */