summaryrefslogtreecommitdiff
path: root/key.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-09-20 00:55:53 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-09-20 00:55:53 +0000
commit309f3d1d9c6a8f480de33a21f61809c14da97bdd (patch)
tree0e10c70437858f40d4f94149ca292412b5a938a4 /key.c
parent20daef753ddc7b1139d88532580ef40267f66d26 (diff)
- markus@cvs.openbsd.org 2001/09/19 13:23:29
[key.c] key_read() now returns -1 on type mismatch, too
Diffstat (limited to 'key.c')
-rw-r--r--key.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/key.c b/key.c
index b382f36c..5c711b9d 100644
--- a/key.c
+++ b/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);