kexgexc.c (261320) | kexgexc.c (263712) |
---|---|
1/* $OpenBSD: kexgexc.c,v 1.16 2014/01/25 10:12:50 dtucker Exp $ */ | 1/* $OpenBSD: kexgexc.c,v 1.17 2014/02/02 03:44:31 djm Exp $ */ |
2/* 3 * Copyright (c) 2000 Niels Provos. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 147 unchanged lines hidden (view full) --- 157 fatal("DH_compute_key: failed"); 158#ifdef DEBUG_KEXDH 159 dump_digest("shared secret", kbuf, kout); 160#endif 161 if ((shared_secret = BN_new()) == NULL) 162 fatal("kexgex_client: BN_new failed"); 163 if (BN_bin2bn(kbuf, kout, shared_secret) == NULL) 164 fatal("kexgex_client: BN_bin2bn failed"); | 2/* 3 * Copyright (c) 2000 Niels Provos. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 147 unchanged lines hidden (view full) --- 157 fatal("DH_compute_key: failed"); 158#ifdef DEBUG_KEXDH 159 dump_digest("shared secret", kbuf, kout); 160#endif 161 if ((shared_secret = BN_new()) == NULL) 162 fatal("kexgex_client: BN_new failed"); 163 if (BN_bin2bn(kbuf, kout, shared_secret) == NULL) 164 fatal("kexgex_client: BN_bin2bn failed"); |
165 memset(kbuf, 0, klen); | 165 explicit_bzero(kbuf, klen); |
166 free(kbuf); 167 168 if (datafellows & SSH_OLD_DHGEX) 169 min = max = -1; 170 171 /* calc and verify H */ 172 kexgex_hash( 173 kex->hash_alg, --- 34 unchanged lines hidden --- | 166 free(kbuf); 167 168 if (datafellows & SSH_OLD_DHGEX) 169 min = max = -1; 170 171 /* calc and verify H */ 172 kexgex_hash( 173 kex->hash_alg, --- 34 unchanged lines hidden --- |