summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--ssh-pkcs11-client.c6
-rw-r--r--ssh-pkcs11-helper.c9
-rw-r--r--ssh-pkcs11.c12
4 files changed, 23 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ce4ef1343..f56dad3ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,8 @@
40 - (djm) [INSTALL Makefile.in README.smartcard configure.ac scard-opensc.c] 40 - (djm) [INSTALL Makefile.in README.smartcard configure.ac scard-opensc.c]
41 [scard.c scard.h pkcs11.h scard/Makefile.in scard/Ssh.bin.uu scard/Ssh.java] 41 [scard.c scard.h pkcs11.h scard/Makefile.in scard/Ssh.bin.uu scard/Ssh.java]
42 Remove obsolete smartcard support 42 Remove obsolete smartcard support
43 - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
44 Make it compile on OSX
43 45
4420100210 4620100210
45 - (djm) add -lselinux to LIBS before calling AC_CHECK_FUNCS for 47 - (djm) add -lselinux to LIBS before calling AC_CHECK_FUNCS for
diff --git a/ssh-pkcs11-client.c b/ssh-pkcs11-client.c
index 6ffdd9364..d376153fa 100644
--- a/ssh-pkcs11-client.c
+++ b/ssh-pkcs11-client.c
@@ -14,8 +14,12 @@
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 15 */
16 16
17#include "includes.h"
18
17#include <sys/types.h> 19#include <sys/types.h>
18#include <sys/time.h> 20#ifdef HAVE_SYS_TIME_H
21# include <sys/time.h>
22#endif
19#include <sys/socket.h> 23#include <sys/socket.h>
20 24
21#include <stdarg.h> 25#include <stdarg.h>
diff --git a/ssh-pkcs11-helper.c b/ssh-pkcs11-helper.c
index f9962709b..464209641 100644
--- a/ssh-pkcs11-helper.c
+++ b/ssh-pkcs11-helper.c
@@ -14,9 +14,14 @@
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 15 */
16 16
17#include <sys/queue.h> 17#include "includes.h"
18
18#include <sys/types.h> 19#include <sys/types.h>
19#include <sys/time.h> 20#ifdef HAVE_SYS_TIME_H
21# include <sys/time.h>
22#endif
23
24#include "openbsd-compat/sys-queue.h"
20 25
21#include <stdarg.h> 26#include <stdarg.h>
22#include <string.h> 27#include <string.h>
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index f82454329..2f6c9cec8 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -14,14 +14,20 @@
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 15 */
16 16
17#include "includes.h"
18
17#include <sys/types.h> 19#include <sys/types.h>
18#include <sys/queue.h> 20#ifdef HAVE_SYS_TIME_H
21# include <sys/time.h>
22#endif
19#include <stdarg.h> 23#include <stdarg.h>
20#include <stdio.h> 24#include <stdio.h>
21 25
22#include <string.h> 26#include <string.h>
23#include <dlfcn.h> 27#include <dlfcn.h>
24 28
29#include "openbsd-compat/sys-queue.h"
30
25#define CRYPTOKI_COMPAT 31#define CRYPTOKI_COMPAT
26#include "pkcs11.h" 32#include "pkcs11.h"
27 33
@@ -190,14 +196,14 @@ pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa,
190 CK_ULONG tlen = 0, nfound = 0; 196 CK_ULONG tlen = 0, nfound = 0;
191 CK_RV rv; 197 CK_RV rv;
192 CK_OBJECT_CLASS private_key_class = CKO_PRIVATE_KEY; 198 CK_OBJECT_CLASS private_key_class = CKO_PRIVATE_KEY;
193 CK_BBOOL true = CK_TRUE; 199 CK_BBOOL true_val = CK_TRUE;
194 CK_MECHANISM mech = { 200 CK_MECHANISM mech = {
195 CKM_RSA_PKCS, NULL_PTR, 0 201 CKM_RSA_PKCS, NULL_PTR, 0
196 }; 202 };
197 CK_ATTRIBUTE key_filter[] = { 203 CK_ATTRIBUTE key_filter[] = {
198 {CKA_CLASS, &private_key_class, sizeof(private_key_class) }, 204 {CKA_CLASS, &private_key_class, sizeof(private_key_class) },
199 {CKA_ID, NULL, 0}, 205 {CKA_ID, NULL, 0},
200 {CKA_SIGN, &true, sizeof(true) } 206 {CKA_SIGN, &true_val, sizeof(true_val) }
201 }; 207 };
202 char *pin, prompt[1024]; 208 char *pin, prompt[1024];
203 int rval = -1; 209 int rval = -1;