Deleted Added
full compact
sshconnect2.c (99063) sshconnect2.c (106130)
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 9 unchanged lines hidden (view full) ---

18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 9 unchanged lines hidden (view full) ---

18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
26RCSID("$OpenBSD: sshconnect2.c,v 1.105 2002/06/23 03:30:17 deraadt Exp $");
27RCSID("$FreeBSD: head/crypto/openssh/sshconnect2.c 99063 2002-06-29 11:48:59Z des $");
26RCSID("$OpenBSD: sshconnect2.c,v 1.107 2002/07/01 19:48:46 markus Exp $");
27RCSID("$FreeBSD: head/crypto/openssh/sshconnect2.c 106130 2002-10-29 10:16:02Z des $");
28
29#include "ssh.h"
30#include "ssh2.h"
31#include "xmalloc.h"
32#include "buffer.h"
33#include "packet.h"
34#include "compat.h"
35#include "bufaux.h"

--- 55 unchanged lines hidden (view full) ---

91 myproposal[PROPOSAL_ENC_ALGS_STOC] = options.ciphers;
92 }
93 myproposal[PROPOSAL_ENC_ALGS_CTOS] =
94 compat_cipher_proposal(myproposal[PROPOSAL_ENC_ALGS_CTOS]);
95 myproposal[PROPOSAL_ENC_ALGS_STOC] =
96 compat_cipher_proposal(myproposal[PROPOSAL_ENC_ALGS_STOC]);
97 if (options.compression) {
98 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
28
29#include "ssh.h"
30#include "ssh2.h"
31#include "xmalloc.h"
32#include "buffer.h"
33#include "packet.h"
34#include "compat.h"
35#include "bufaux.h"

--- 55 unchanged lines hidden (view full) ---

91 myproposal[PROPOSAL_ENC_ALGS_STOC] = options.ciphers;
92 }
93 myproposal[PROPOSAL_ENC_ALGS_CTOS] =
94 compat_cipher_proposal(myproposal[PROPOSAL_ENC_ALGS_CTOS]);
95 myproposal[PROPOSAL_ENC_ALGS_STOC] =
96 compat_cipher_proposal(myproposal[PROPOSAL_ENC_ALGS_STOC]);
97 if (options.compression) {
98 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
99 myproposal[PROPOSAL_COMP_ALGS_STOC] = "zlib";
99 myproposal[PROPOSAL_COMP_ALGS_STOC] = "zlib,none";
100 } else {
101 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
100 } else {
101 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
102 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none";
102 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none,zlib";
103 }
104 if (options.macs != NULL) {
105 myproposal[PROPOSAL_MAC_ALGS_CTOS] =
106 myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;
107 }
108 if (options.hostkeyalgorithms != NULL)
109 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] =
110 options.hostkeyalgorithms;

--- 307 unchanged lines hidden (view full) ---

418 key_free(key);
419 xfree(pkalg);
420 xfree(pkblob);
421
422 /* unregister */
423 clear_auth_state(authctxt);
424 dispatch_set(SSH2_MSG_USERAUTH_PK_OK, NULL);
425
103 }
104 if (options.macs != NULL) {
105 myproposal[PROPOSAL_MAC_ALGS_CTOS] =
106 myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;
107 }
108 if (options.hostkeyalgorithms != NULL)
109 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] =
110 options.hostkeyalgorithms;

--- 307 unchanged lines hidden (view full) ---

418 key_free(key);
419 xfree(pkalg);
420 xfree(pkblob);
421
422 /* unregister */
423 clear_auth_state(authctxt);
424 dispatch_set(SSH2_MSG_USERAUTH_PK_OK, NULL);
425
426 /* try another method if we did not send a packet*/
426 /* try another method if we did not send a packet */
427 if (sent == 0)
428 userauth(authctxt, NULL);
429
430}
431
432int
433userauth_none(Authctxt *authctxt)
434{

--- 508 unchanged lines hidden (view full) ---

943 strerror(errno));
944 }
945 close(from[1]);
946 close(to[0]);
947
948 buffer_init(&b);
949 buffer_put_int(&b, packet_get_connection_in()); /* send # of socket */
950 buffer_put_string(&b, data, datalen);
427 if (sent == 0)
428 userauth(authctxt, NULL);
429
430}
431
432int
433userauth_none(Authctxt *authctxt)
434{

--- 508 unchanged lines hidden (view full) ---

943 strerror(errno));
944 }
945 close(from[1]);
946 close(to[0]);
947
948 buffer_init(&b);
949 buffer_put_int(&b, packet_get_connection_in()); /* send # of socket */
950 buffer_put_string(&b, data, datalen);
951 msg_send(to[1], version, &b);
951 ssh_msg_send(to[1], version, &b);
952
952
953 if (msg_recv(from[0], &b) < 0) {
953 if (ssh_msg_recv(from[0], &b) < 0) {
954 error("ssh_keysign: no reply");
955 buffer_clear(&b);
956 return -1;
957 }
958 close(from[0]);
959 close(to[1]);
960
961 while (waitpid(pid, &status, 0) < 0)

--- 208 unchanged lines hidden ---
954 error("ssh_keysign: no reply");
955 buffer_clear(&b);
956 return -1;
957 }
958 close(from[0]);
959 close(to[1]);
960
961 while (waitpid(pid, &status, 0) < 0)

--- 208 unchanged lines hidden ---