diff options
author | Colin Watson <cjwatson@debian.org> | 2013-09-14 15:43:03 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-09-14 15:43:03 +0100 |
commit | 8faf8c84430cf3c19705b1d9f8889d256e7fd1fd (patch) | |
tree | e6cb74192adb00fda5e4d1457547851d7e0d86af /ssh-pkcs11-client.c | |
parent | 328b60656f29db6306994d7498dede386ec2d1c3 (diff) | |
parent | c41345ad7ee5a22689e2c009595e85fa27b4b39a (diff) |
merge 6.3p1
Diffstat (limited to 'ssh-pkcs11-client.c')
-rw-r--r-- | ssh-pkcs11-client.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ssh-pkcs11-client.c b/ssh-pkcs11-client.c index 82b11daf5..6c9f9d2c1 100644 --- a/ssh-pkcs11-client.c +++ b/ssh-pkcs11-client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-pkcs11-client.c,v 1.3 2012/01/16 20:34:09 miod Exp $ */ | 1 | /* $OpenBSD: ssh-pkcs11-client.c,v 1.4 2013/05/17 00:13:14 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2010 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2010 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -121,7 +121,7 @@ pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa, | |||
121 | buffer_put_string(&msg, blob, blen); | 121 | buffer_put_string(&msg, blob, blen); |
122 | buffer_put_string(&msg, from, flen); | 122 | buffer_put_string(&msg, from, flen); |
123 | buffer_put_int(&msg, 0); | 123 | buffer_put_int(&msg, 0); |
124 | xfree(blob); | 124 | free(blob); |
125 | send_msg(&msg); | 125 | send_msg(&msg); |
126 | buffer_clear(&msg); | 126 | buffer_clear(&msg); |
127 | 127 | ||
@@ -131,7 +131,7 @@ pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa, | |||
131 | memcpy(to, signature, slen); | 131 | memcpy(to, signature, slen); |
132 | ret = slen; | 132 | ret = slen; |
133 | } | 133 | } |
134 | xfree(signature); | 134 | free(signature); |
135 | } | 135 | } |
136 | buffer_free(&msg); | 136 | buffer_free(&msg); |
137 | return (ret); | 137 | return (ret); |
@@ -205,11 +205,11 @@ pkcs11_add_provider(char *name, char *pin, Key ***keysp) | |||
205 | *keysp = xcalloc(nkeys, sizeof(Key *)); | 205 | *keysp = xcalloc(nkeys, sizeof(Key *)); |
206 | for (i = 0; i < nkeys; i++) { | 206 | for (i = 0; i < nkeys; i++) { |
207 | blob = buffer_get_string(&msg, &blen); | 207 | blob = buffer_get_string(&msg, &blen); |
208 | xfree(buffer_get_string(&msg, NULL)); | 208 | free(buffer_get_string(&msg, NULL)); |
209 | k = key_from_blob(blob, blen); | 209 | k = key_from_blob(blob, blen); |
210 | wrap_key(k->rsa); | 210 | wrap_key(k->rsa); |
211 | (*keysp)[i] = k; | 211 | (*keysp)[i] = k; |
212 | xfree(blob); | 212 | free(blob); |
213 | } | 213 | } |
214 | } else { | 214 | } else { |
215 | nkeys = -1; | 215 | nkeys = -1; |