Deleted Added
full compact
kexdhs.c (261320) kexdhs.c (263712)
1/* $OpenBSD: kexdhs.c,v 1.17 2014/01/12 08:13:13 djm Exp $ */
1/* $OpenBSD: kexdhs.c,v 1.18 2014/02/02 03:44:31 djm Exp $ */
2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

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

105 fatal("DH_compute_key: failed");
106#ifdef DEBUG_KEXDH
107 dump_digest("shared secret", kbuf, kout);
108#endif
109 if ((shared_secret = BN_new()) == NULL)
110 fatal("kexdh_server: BN_new failed");
111 if (BN_bin2bn(kbuf, kout, shared_secret) == NULL)
112 fatal("kexdh_server: BN_bin2bn failed");
2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

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

105 fatal("DH_compute_key: failed");
106#ifdef DEBUG_KEXDH
107 dump_digest("shared secret", kbuf, kout);
108#endif
109 if ((shared_secret = BN_new()) == NULL)
110 fatal("kexdh_server: BN_new failed");
111 if (BN_bin2bn(kbuf, kout, shared_secret) == NULL)
112 fatal("kexdh_server: BN_bin2bn failed");
113 memset(kbuf, 0, klen);
113 explicit_bzero(kbuf, klen);
114 free(kbuf);
115
116 key_to_blob(server_host_public, &server_host_key_blob, &sbloblen);
117
118 /* calc H */
119 kex_dh_hash(
120 kex->client_version_string,
121 kex->server_version_string,

--- 39 unchanged lines hidden ---
114 free(kbuf);
115
116 key_to_blob(server_host_public, &server_host_key_blob, &sbloblen);
117
118 /* calc H */
119 kex_dh_hash(
120 kex->client_version_string,
121 kex->server_version_string,

--- 39 unchanged lines hidden ---