"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/h235/h235support.cxx" between
h323plus-1_27_0.tar.gz and h323plus-1_27_1.tar.gz

About: H.323 Plus offers libraries for voice (VoIP) and videoconferencing using H.323.

h235support.cxx  (h323plus-1_27_0):h235support.cxx  (h323plus-1_27_1)
skipping to change at line 57 skipping to change at line 57
#include <ptclib/cypher.h> #include <ptclib/cypher.h>
extern "C" { extern "C" {
#include <openssl/opensslv.h> #include <openssl/opensslv.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/dh.h> #include <openssl/dh.h>
#include <openssl/pem.h> #include <openssl/pem.h>
#include <openssl/bn.h> #include <openssl/bn.h>
}; };
#if OPENSSL_VERSION_NUMBER < 0x10100000L #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
inline void DH_get0_pqg(const DH *dh, inline void DH_get0_pqg(const DH *dh,
const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
{ {
if (p != NULL) if (p != NULL)
*p = dh->p; *p = dh->p;
if (q != NULL) if (q != NULL)
*q = dh->q; *q = dh->q;
if (g != NULL) if (g != NULL)
*g = dh->g; *g = dh->g;
skipping to change at line 614 skipping to change at line 614
PBoolean H235_DiffieHellman::ComputeSessionKey(PBYTEArray & SessionKey) PBoolean H235_DiffieHellman::ComputeSessionKey(PBYTEArray & SessionKey)
{ {
SessionKey.SetSize(0); SessionKey.SetSize(0);
if (!m_remKey) { if (!m_remKey) {
PTRACE(2, "H235_DH\tERROR Generating Shared DH: No remote key!"); PTRACE(2, "H235_DH\tERROR Generating Shared DH: No remote key!");
return false; return false;
} }
int len = DH_size(dh); int len = DH_size(dh);
unsigned char * buf = (unsigned char *)OPENSSL_malloc(len); unsigned char * buf = (unsigned char *)OPENSSL_malloc(len);
if (buf == NULL) {
PTRACE(2, "H235_DH\tERROR allocating memory!");
return false;
}
int out = DH_compute_key(buf, m_remKey, dh); int out = DH_compute_key(buf, m_remKey, dh);
if (out <= 0) { if (out <= 0) {
PTRACE(2,"H235_DH\tERROR Generating Shared DH!"); PTRACE(2,"H235_DH\tERROR Generating Shared DH!");
OPENSSL_free(buf); OPENSSL_free(buf);
return false; return false;
} }
SessionKey.SetSize(out); SessionKey.SetSize(out);
memcpy(SessionKey.GetPointer(), (void *)buf, out); memcpy(SessionKey.GetPointer(), (void *)buf, out);
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)