summaryrefslogtreecommitdiff
path: root/ssh-pkcs11.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-07-18 16:13:02 +1000
committerDamien Miller <djm@mindrot.org>2013-07-18 16:13:02 +1000
commit746d1a6c524d2e90ebe98cc29e42573a3e1c3c1b (patch)
treecd2b6afe877d10ed89f10417570dd31905c71dcb /ssh-pkcs11.c
parentce98654674648fb7d58f73edf6aa398656a2dba4 (diff)
- djm@cvs.openbsd.org 2013/07/12 00:20:00
[sftp.c ssh-keygen.c ssh-pkcs11.c] fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@
Diffstat (limited to 'ssh-pkcs11.c')
-rw-r--r--ssh-pkcs11.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index a17326baa..618c07526 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-pkcs11.c,v 1.7 2013/05/17 00:13:14 djm Exp $ */ 1/* $OpenBSD: ssh-pkcs11.c,v 1.8 2013/07/12 00:20:00 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2010 Markus Friedl. All rights reserved. 3 * Copyright (c) 2010 Markus Friedl. All rights reserved.
4 * 4 *
@@ -263,8 +263,8 @@ pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa,
263 pin = read_passphrase(prompt, RP_ALLOW_EOF); 263 pin = read_passphrase(prompt, RP_ALLOW_EOF);
264 if (pin == NULL) 264 if (pin == NULL)
265 return (-1); /* bail out */ 265 return (-1); /* bail out */
266 if ((rv = f->C_Login(si->session, CKU_USER, pin, strlen(pin))) 266 if ((rv = f->C_Login(si->session, CKU_USER,
267 != CKR_OK) { 267 (u_char *)pin, strlen(pin))) != CKR_OK) {
268 free(pin); 268 free(pin);
269 error("C_Login failed: %lu", rv); 269 error("C_Login failed: %lu", rv);
270 return (-1); 270 return (-1);
@@ -328,7 +328,7 @@ pkcs11_rsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx,
328 328
329/* remove trailing spaces */ 329/* remove trailing spaces */
330static void 330static void
331rmspace(char *buf, size_t len) 331rmspace(u_char *buf, size_t len)
332{ 332{
333 size_t i; 333 size_t i;
334 334
@@ -366,8 +366,8 @@ pkcs11_open_session(struct pkcs11_provider *p, CK_ULONG slotidx, char *pin)
366 return (-1); 366 return (-1);
367 } 367 }
368 if (login_required && pin) { 368 if (login_required && pin) {
369 if ((rv = f->C_Login(session, CKU_USER, pin, strlen(pin))) 369 if ((rv = f->C_Login(session, CKU_USER,
370 != CKR_OK) { 370 (u_char *)pin, strlen(pin))) != CKR_OK) {
371 error("C_Login failed: %lu", rv); 371 error("C_Login failed: %lu", rv);
372 if ((rv = f->C_CloseSession(session)) != CKR_OK) 372 if ((rv = f->C_CloseSession(session)) != CKR_OK)
373 error("C_CloseSession failed: %lu", rv); 373 error("C_CloseSession failed: %lu", rv);