diff options
Diffstat (limited to 'ssh-pkcs11.c')
-rw-r--r-- | ssh-pkcs11.c | 12 |
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 */ |
330 | static void | 330 | static void |
331 | rmspace(char *buf, size_t len) | 331 | rmspace(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); |