summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-02-12 09:49:06 +1100
committerDamien Miller <djm@mindrot.org>2010-02-12 09:49:06 +1100
commit8ad0fbd98e5ffd98c25f88881981336508ae90d7 (patch)
treeb5819c4170a242ac70fec9488869e9bb22508175
parentd8f60022727f1d57efe7261b856d5e84a4b28cbe (diff)
- (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
Make it compile on OSX
-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 ce4ef134..f56dad3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,8 @@
- (djm) [INSTALL Makefile.in README.smartcard configure.ac scard-opensc.c]
[scard.c scard.h pkcs11.h scard/Makefile.in scard/Ssh.bin.uu scard/Ssh.java]
Remove obsolete smartcard support
+ - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
+ Make it compile on OSX
20100210
- (djm) add -lselinux to LIBS before calling AC_CHECK_FUNCS for
diff --git a/ssh-pkcs11-client.c b/ssh-pkcs11-client.c
index 6ffdd936..d376153f 100644
--- a/ssh-pkcs11-client.c
+++ b/ssh-pkcs11-client.c
@@ -14,8 +14,12 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "includes.h"
+
#include <sys/types.h>
-#include <sys/time.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
#include <sys/socket.h>
#include <stdarg.h>
diff --git a/ssh-pkcs11-helper.c b/ssh-pkcs11-helper.c
index f9962709..46420964 100644
--- a/ssh-pkcs11-helper.c
+++ b/ssh-pkcs11-helper.c
@@ -14,9 +14,14 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/queue.h>
+#include "includes.h"
+
#include <sys/types.h>
-#include <sys/time.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+
+#include "openbsd-compat/sys-queue.h"
#include <stdarg.h>
#include <string.h>
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index f8245432..2f6c9cec 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -14,14 +14,20 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "includes.h"
+
#include <sys/types.h>
-#include <sys/queue.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <dlfcn.h>
+#include "openbsd-compat/sys-queue.h"
+
#define CRYPTOKI_COMPAT
#include "pkcs11.h"
@@ -190,14 +196,14 @@ pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa,
CK_ULONG tlen = 0, nfound = 0;
CK_RV rv;
CK_OBJECT_CLASS private_key_class = CKO_PRIVATE_KEY;
- CK_BBOOL true = CK_TRUE;
+ CK_BBOOL true_val = CK_TRUE;
CK_MECHANISM mech = {
CKM_RSA_PKCS, NULL_PTR, 0
};
CK_ATTRIBUTE key_filter[] = {
{CKA_CLASS, &private_key_class, sizeof(private_key_class) },
{CKA_ID, NULL, 0},
- {CKA_SIGN, &true, sizeof(true) }
+ {CKA_SIGN, &true_val, sizeof(true_val) }
};
char *pin, prompt[1024];
int rval = -1;