r2681 - trunk/libmcrypto/source/openssl
werner at minisip.org
werner at minisip.org
Sun Jul 2 21:20:31 CEST 2006
Author: werner
Date: 2006-07-02 21:20:30 +0200 (Sun, 02 Jul 2006)
New Revision: 2681
Modified:
trunk/libmcrypto/source/openssl/ZrtpDH.cxx
Log:
Fix a small DH problem
Modified: trunk/libmcrypto/source/openssl/ZrtpDH.cxx
===================================================================
--- trunk/libmcrypto/source/openssl/ZrtpDH.cxx 2006-07-02 19:18:37 UTC (rev 2680)
+++ trunk/libmcrypto/source/openssl/ZrtpDH.cxx 2006-07-02 19:20:30 UTC (rev 2681)
@@ -163,10 +163,11 @@
int32_t result;
- BIGNUM *pubKeyPeer = BN_bin2bn(pubKeyBytes, length, NULL);
+ if (ctx->pub_key != NULL) {
+ BN_free(ctx->pub_key);
+ }
+ ctx->pub_key = BN_bin2bn(pubKeyBytes, length, NULL);
+ result = DH_compute_key(secret, ctx->pub_key, ctx);
- result = DH_compute_key(secret, pubKeyPeer, ctx);
-
- BN_free(pubKeyPeer);
return result;
}
More information about the Minisip-devel
mailing list