diff options
author | Damien Miller <djm@mindrot.org> | 2001-12-21 14:45:46 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-12-21 14:45:46 +1100 |
commit | 9f0f5c64bc4b6144e3fed6a7f538f7c21819a492 (patch) | |
tree | f79317ab211f59181a61b526f566e9c8cfe70c73 /authfile.c | |
parent | 89681214ca2f50a1b1ed6164c3afe1ce14995ffc (diff) |
- deraadt@cvs.openbsd.org 2001/12/19 07:18:56
[auth1.c auth2.c auth2-chall.c auth-bsdauth.c auth.c authfile.c auth.h]
[auth-krb4.c auth-rhosts.c auth-skey.c bufaux.c canohost.c channels.c]
[cipher.c clientloop.c compat.c compress.c deattack.c key.c log.c mac.c]
[match.c misc.c nchan.c packet.c readconf.c rijndael.c rijndael.h scard.c]
[servconf.c servconf.h serverloop.c session.c sftp.c sftp-client.c]
[sftp-glob.c sftp-int.c sftp-server.c ssh-add.c ssh-agent.c ssh.c]
[sshconnect1.c sshconnect2.c sshconnect.c sshd.8 sshd.c sshd_config]
[ssh-keygen.c sshlogin.c sshpty.c sshtty.c ttymodes.c uidswap.c]
basic KNF done while i was looking for something else
Diffstat (limited to 'authfile.c')
-rw-r--r-- | authfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/authfile.c b/authfile.c index 8a6021fc6..abf2877f5 100644 --- a/authfile.c +++ b/authfile.c | |||
@@ -36,7 +36,7 @@ | |||
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include "includes.h" | 38 | #include "includes.h" |
39 | RCSID("$OpenBSD: authfile.c,v 1.40 2001/12/05 10:06:12 deraadt Exp $"); | 39 | RCSID("$OpenBSD: authfile.c,v 1.41 2001/12/19 07:18:56 deraadt Exp $"); |
40 | 40 | ||
41 | #include <openssl/err.h> | 41 | #include <openssl/err.h> |
42 | #include <openssl/evp.h> | 42 | #include <openssl/evp.h> |
@@ -147,7 +147,7 @@ key_save_private_rsa1(Key *key, const char *filename, const char *passphrase, | |||
147 | if (write(fd, buffer_ptr(&encrypted), buffer_len(&encrypted)) != | 147 | if (write(fd, buffer_ptr(&encrypted), buffer_len(&encrypted)) != |
148 | buffer_len(&encrypted)) { | 148 | buffer_len(&encrypted)) { |
149 | error("write to key file %s failed: %s", filename, | 149 | error("write to key file %s failed: %s", filename, |
150 | strerror(errno)); | 150 | strerror(errno)); |
151 | buffer_free(&encrypted); | 151 | buffer_free(&encrypted); |
152 | close(fd); | 152 | close(fd); |
153 | unlink(filename); | 153 | unlink(filename); |
@@ -450,7 +450,7 @@ key_load_private_pem(int fd, int type, const char *passphrase, | |||
450 | debug("PEM_read_PrivateKey failed"); | 450 | debug("PEM_read_PrivateKey failed"); |
451 | (void)ERR_get_error(); | 451 | (void)ERR_get_error(); |
452 | } else if (pk->type == EVP_PKEY_RSA && | 452 | } else if (pk->type == EVP_PKEY_RSA && |
453 | (type == KEY_UNSPEC||type==KEY_RSA)) { | 453 | (type == KEY_UNSPEC||type==KEY_RSA)) { |
454 | prv = key_new(KEY_UNSPEC); | 454 | prv = key_new(KEY_UNSPEC); |
455 | prv->rsa = EVP_PKEY_get1_RSA(pk); | 455 | prv->rsa = EVP_PKEY_get1_RSA(pk); |
456 | prv->type = KEY_RSA; | 456 | prv->type = KEY_RSA; |
@@ -459,7 +459,7 @@ key_load_private_pem(int fd, int type, const char *passphrase, | |||
459 | RSA_print_fp(stderr, prv->rsa, 8); | 459 | RSA_print_fp(stderr, prv->rsa, 8); |
460 | #endif | 460 | #endif |
461 | } else if (pk->type == EVP_PKEY_DSA && | 461 | } else if (pk->type == EVP_PKEY_DSA && |
462 | (type == KEY_UNSPEC||type==KEY_DSA)) { | 462 | (type == KEY_UNSPEC||type==KEY_DSA)) { |
463 | prv = key_new(KEY_UNSPEC); | 463 | prv = key_new(KEY_UNSPEC); |
464 | prv->dsa = EVP_PKEY_get1_DSA(pk); | 464 | prv->dsa = EVP_PKEY_get1_DSA(pk); |
465 | prv->type = KEY_DSA; | 465 | prv->type = KEY_DSA; |