diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-09-19 13:23:30 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-09-19 13:23:30 +0000 |
commit | 2a303517017b170aa9799ebf55bcfa1b06a8f77c (patch) | |
tree | 44b290da74e5117ab6c97172c73867d02e1331b7 | |
parent | da231eb3fbafc2ed237757c0af027b53eae6cd27 (diff) |
key_read() now returns -1 on type mismatch, too
-rw-r--r-- | usr.bin/ssh/key.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c index b382f36cf2b..5c711b9d797 100644 --- a/usr.bin/ssh/key.c +++ b/usr.bin/ssh/key.c @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: key.c,v 1.31 2001/09/17 20:50:22 markus Exp $"); +RCSID("$OpenBSD: key.c,v 1.32 2001/09/19 13:23:29 markus Exp $"); #include <openssl/evp.h> @@ -358,7 +358,7 @@ write_bignum(FILE *f, BIGNUM *num) return 1; } -/* returns 1 ok, -1 error, 0 type mismatch */ +/* returns 1 ok, -1 error */ int key_read(Key *ret, char **cpp) { @@ -413,7 +413,7 @@ key_read(Key *ret, char **cpp) } else if (ret->type != type) { /* is a key, but different type */ debug3("key_read: type mismatch"); - return 0; + return -1; } len = 2*strlen(cp); blob = xmalloc(len); |