diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-09-20 00:55:53 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-09-20 00:55:53 +0000 |
commit | 309f3d1d9c6a8f480de33a21f61809c14da97bdd (patch) | |
tree | 0e10c70437858f40d4f94149ca292412b5a938a4 | |
parent | 20daef753ddc7b1139d88532580ef40267f66d26 (diff) |
- markus@cvs.openbsd.org 2001/09/19 13:23:29
[key.c]
key_read() now returns -1 on type mismatch, too
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | key.c | 6 |
2 files changed, 7 insertions, 4 deletions
@@ -3,6 +3,9 @@ | |||
3 | - markus@cvs.openbsd.org 2001/09/19 10:08:51 | 3 | - markus@cvs.openbsd.org 2001/09/19 10:08:51 |
4 | [sshd.8] | 4 | [sshd.8] |
5 | command=xxx applies to subsystem now, too | 5 | command=xxx applies to subsystem now, too |
6 | - markus@cvs.openbsd.org 2001/09/19 13:23:29 | ||
7 | [key.c] | ||
8 | key_read() now returns -1 on type mismatch, too | ||
6 | 9 | ||
7 | 20010918 | 10 | 20010918 |
8 | - (djm) Configure support for smartcards. Based on Ben's work. | 11 | - (djm) Configure support for smartcards. Based on Ben's work. |
@@ -6510,4 +6513,4 @@ | |||
6510 | - Wrote replacements for strlcpy and mkdtemp | 6513 | - Wrote replacements for strlcpy and mkdtemp |
6511 | - Released 1.0pre1 | 6514 | - Released 1.0pre1 |
6512 | 6515 | ||
6513 | $Id: ChangeLog,v 1.1542 2001/09/20 00:54:01 mouring Exp $ | 6516 | $Id: ChangeLog,v 1.1543 2001/09/20 00:55:53 mouring Exp $ |
@@ -32,7 +32,7 @@ | |||
32 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
33 | */ | 33 | */ |
34 | #include "includes.h" | 34 | #include "includes.h" |
35 | RCSID("$OpenBSD: key.c,v 1.31 2001/09/17 20:50:22 markus Exp $"); | 35 | RCSID("$OpenBSD: key.c,v 1.32 2001/09/19 13:23:29 markus Exp $"); |
36 | 36 | ||
37 | #include <openssl/evp.h> | 37 | #include <openssl/evp.h> |
38 | 38 | ||
@@ -358,7 +358,7 @@ write_bignum(FILE *f, BIGNUM *num) | |||
358 | return 1; | 358 | return 1; |
359 | } | 359 | } |
360 | 360 | ||
361 | /* returns 1 ok, -1 error, 0 type mismatch */ | 361 | /* returns 1 ok, -1 error */ |
362 | int | 362 | int |
363 | key_read(Key *ret, char **cpp) | 363 | key_read(Key *ret, char **cpp) |
364 | { | 364 | { |
@@ -413,7 +413,7 @@ key_read(Key *ret, char **cpp) | |||
413 | } else if (ret->type != type) { | 413 | } else if (ret->type != type) { |
414 | /* is a key, but different type */ | 414 | /* is a key, but different type */ |
415 | debug3("key_read: type mismatch"); | 415 | debug3("key_read: type mismatch"); |
416 | return 0; | 416 | return -1; |
417 | } | 417 | } |
418 | len = 2*strlen(cp); | 418 | len = 2*strlen(cp); |
419 | blob = xmalloc(len); | 419 | blob = xmalloc(len); |