aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-14 08:09:44 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-14 08:09:44 +0000
commit3d423bbe963306259dac4e85a76e687292c72fc5 (patch)
treee8bdb455727a9788aa01791f2cced4be4ea4cce6
parentadded *.orig to .svnignore (diff)
downloadopenvpn-3d423bbe963306259dac4e85a76e687292c72fc5.tar.xz
Minor PKCS#11 changes.
pre-2.1_beta3 git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@607 e7ae566f-a301-0410-adde-c780ea21d3b5
-rw-r--r--ChangeLog4
-rw-r--r--openvpn.810
-rw-r--r--options.c1
-rw-r--r--pkcs11.c10
-rw-r--r--pkcs11.h4
5 files changed, 10 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 521f348..0658da6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,7 +3,7 @@ Copyright (C) 2002-2005 OpenVPN Solutions LLC <info@openvpn.net>
$Id$
-2005.10.14 -- Version 2.1-beta3
+2005.10.xx -- Version 2.1-beta3
* Added PKCS#11 support (Alon Bar-Lev).
* NOTE TO PACKAGE MAINTAINERS: Moved "plugin"
@@ -15,8 +15,6 @@ $Id$
2005.10.13 -- Version 2.1-beta2
-* Added --socket-flags directive with TCP_NODELAY
- flag (pushable).
* Made --sndbuf and --rcvbuf pushable.
2005.10.01 -- Version 2.1-beta1
diff --git a/openvpn.8 b/openvpn.8
index 7609324..4e4c81c 100644
--- a/openvpn.8
+++ b/openvpn.8
@@ -254,7 +254,6 @@ openvpn \- secure IP tunnel daemon.
[\ \fB\-\-show\-valid\-subnets\fR\ ]
[\ \fB\-\-single\-session\fR\ ]
[\ \fB\-\-sndbuf\fR\ \fIsize\fR\ ]
-[\ \fB\-\-socket\-flags\fR\ \fI[flags,\ ...]\fR\ ]
[\ \fB\-\-socks\-proxy\-retry\fR\ ]
[\ \fB\-\-socks\-proxy\fR\ \fIserver\ [port]\fR\ ]
[\ \fB\-\-status\fR\ \fIfile\ [n]\fR\ ]
@@ -1319,15 +1318,6 @@ Set the TCP/UDP socket receive buffer size.
Currently defaults to 65536 bytes.
.\"*********************************************************
.TP
-.B --socket-flags [flags, ...]
-Set one or more of the following socket flags:
-
-.B TCP_NODELAY --
-Optimize latency in TCP mode tunnels.
-
-This directive is pushable.
-.\"*********************************************************
-.TP
.B --txqueuelen n
(Linux only) Set the TX queue length on the TUN/TAP interface.
Currently defaults to 100.
diff --git a/options.c b/options.c
index eccb63e..c7e788f 100644
--- a/options.c
+++ b/options.c
@@ -207,7 +207,6 @@ static const char usage_message[] =
" or --fragment max value, whichever is lower.\n"
"--sndbuf size : Set the TCP/UDP send buffer size.\n"
"--rcvbuf size : Set the TCP/UDP receive buffer size.\n"
- "--socket-flags f: Set socket flags, currently 'TCP_NODELAY' supported.\n"
"--txqueuelen n : Set the tun/tap TX queue length to n (Linux only).\n"
"--mlock : Disable Paging -- ensures key material and tunnel\n"
" data will never be written to disk.\n"
diff --git a/pkcs11.c b/pkcs11.c
index 25ad525..d0bdbbe 100644
--- a/pkcs11.c
+++ b/pkcs11.c
@@ -1068,8 +1068,8 @@ pkcs11_createSession (
if (rv == CKR_OK) {
pkcs11_session->fLoginFailed = false;
- pkcs11_session->key = -1;
- pkcs11_session->session = -1;
+ pkcs11_session->key = (CK_OBJECT_HANDLE)-1;
+ pkcs11_session->session = (CK_SESSION_HANDLE)-1;
if (!strcmp (szSlotType, "id")) {
rv = _pkcs11_getSlotById (pkcs11_session, szSlot);
@@ -1210,11 +1210,11 @@ pkcs11_logout (
) {
ASSERT (pkcs11_session!=NULL);
- if (pkcs11_session->session != (unsigned int)-1) {
+ if (pkcs11_session->session != (CK_SESSION_HANDLE)-1) {
pkcs11_session->provider->f->C_Logout (pkcs11_session->session);
pkcs11_session->provider->f->C_CloseSession (pkcs11_session->session);
- pkcs11_session->key = -1;
- pkcs11_session->session = -1;
+ pkcs11_session->key = (CK_OBJECT_HANDLE)-1;
+ pkcs11_session->session = (CK_SESSION_HANDLE)-1;
}
return CKR_OK;
diff --git a/pkcs11.h b/pkcs11.h
index 488a591..7f44e1b 100644
--- a/pkcs11.h
+++ b/pkcs11.h
@@ -25,6 +25,8 @@
#ifndef OPENVPN_PKCS11_H
#define OPENVPN_PKCS11_H
+#if defined(USE_CRYPTO) && defined(USE_SSL) && defined(ENABLE_PKCS11)
+
int
SSL_CTX_use_pkcs11 (
SSL_CTX * const ssl_ctx,
@@ -62,3 +64,5 @@ show_pkcs11_objects (
);
#endif
+
+#endif