diff options
author | kris <kris@FreeBSD.org> | 2000-06-03 07:31:44 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-06-03 07:31:44 +0000 |
commit | 66c0eb5d8c98eb6176669c57e89a3c3f604a6009 (patch) | |
tree | c37ff30e27d86e62bb0f2d8105e68d4cbc532264 /crypto/openssh/key.c | |
parent | 88a84bd92e99b88721d69ddd8e17c6a1f3f78fbf (diff) | |
download | FreeBSD-src-66c0eb5d8c98eb6176669c57e89a3c3f604a6009.zip FreeBSD-src-66c0eb5d8c98eb6176669c57e89a3c3f604a6009.tar.gz |
Bring vendor patches onto the main branch, and resolve conflicts.
Diffstat (limited to 'crypto/openssh/key.c')
-rw-r--r-- | crypto/openssh/key.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/crypto/openssh/key.c b/crypto/openssh/key.c index 47720b2..b91bd21 100644 --- a/crypto/openssh/key.c +++ b/crypto/openssh/key.c @@ -258,12 +258,14 @@ key_read(Key *ret, char **cpp) blob = xmalloc(len); n = uudecode(cp, blob, len); if (n < 0) { - error("uudecode %s failed", cp); + error("key_read: uudecode %s failed", cp); return 0; } k = dsa_key_from_blob(blob, n); - if (k == NULL) - return 0; + if (k == NULL) { + error("key_read: dsa_key_from_blob %s failed", cp); + return 0; + } xfree(blob); if (ret->dsa != NULL) DSA_free(ret->dsa); @@ -271,10 +273,12 @@ key_read(Key *ret, char **cpp) k->dsa = NULL; key_free(k); bits = BN_num_bits(ret->dsa->p); - cp = strchr(cp, '='); - if (cp == NULL) - return 0; - *cpp = cp + 1; + /* advance cp: skip whitespace and data */ + while (*cp == ' ' || *cp == '\t') + cp++; + while (*cp != '\0' && *cp != ' ' && *cp != '\t') + cp++; + *cpp = cp; break; default: fatal("key_read: bad key type: %d", ret->type); |