summaryrefslogtreecommitdiff
path: root/authfile.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2013-09-14 15:43:03 +0100
committerColin Watson <cjwatson@debian.org>2013-09-14 15:43:03 +0100
commit8faf8c84430cf3c19705b1d9f8889d256e7fd1fd (patch)
treee6cb74192adb00fda5e4d1457547851d7e0d86af /authfile.c
parent328b60656f29db6306994d7498dede386ec2d1c3 (diff)
parentc41345ad7ee5a22689e2c009595e85fa27b4b39a (diff)
merge 6.3p1
Diffstat (limited to 'authfile.c')
-rw-r--r--authfile.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/authfile.c b/authfile.c
index 3544d170b..63ae16bbd 100644
--- a/authfile.c
+++ b/authfile.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfile.c,v 1.95 2013/01/08 18:49:04 markus Exp $ */ 1/* $OpenBSD: authfile.c,v 1.97 2013/05/17 00:13:13 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -89,7 +89,7 @@ key_private_rsa1_to_blob(Key *key, Buffer *blob, const char *passphrase,
89 u_char buf[100], *cp; 89 u_char buf[100], *cp;
90 int i, cipher_num; 90 int i, cipher_num;
91 CipherContext ciphercontext; 91 CipherContext ciphercontext;
92 Cipher *cipher; 92 const Cipher *cipher;
93 u_int32_t rnd; 93 u_int32_t rnd;
94 94
95 /* 95 /*
@@ -421,7 +421,7 @@ key_parse_private_rsa1(Buffer *blob, const char *passphrase, char **commentp)
421 Buffer decrypted; 421 Buffer decrypted;
422 u_char *cp; 422 u_char *cp;
423 CipherContext ciphercontext; 423 CipherContext ciphercontext;
424 Cipher *cipher; 424 const Cipher *cipher;
425 Key *prv = NULL; 425 Key *prv = NULL;
426 Buffer copy; 426 Buffer copy;
427 427
@@ -509,8 +509,8 @@ key_parse_private_rsa1(Buffer *blob, const char *passphrase, char **commentp)
509 return prv; 509 return prv;
510 510
511fail: 511fail:
512 if (commentp) 512 if (commentp != NULL)
513 xfree(*commentp); 513 free(*commentp);
514 key_free(prv); 514 key_free(prv);
515 return NULL; 515 return NULL;
516} 516}
@@ -832,10 +832,10 @@ key_load_cert(const char *filename)
832 pub = key_new(KEY_UNSPEC); 832 pub = key_new(KEY_UNSPEC);
833 xasprintf(&file, "%s-cert.pub", filename); 833 xasprintf(&file, "%s-cert.pub", filename);
834 if (key_try_load_public(pub, file, NULL) == 1) { 834 if (key_try_load_public(pub, file, NULL) == 1) {
835 xfree(file); 835 free(file);
836 return pub; 836 return pub;
837 } 837 }
838 xfree(file); 838 free(file);
839 key_free(pub); 839 key_free(pub);
840 return NULL; 840 return NULL;
841} 841}