Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/net-im/climm/files/patch-src_io_io__openssl.c
16124 views
1
--- src/io/io_openssl.c.orig 2010-03-20 14:13:15 UTC
2
+++ src/io/io_openssl.c
3
@@ -96,10 +96,22 @@ static DH *get_dh512()
4
DH *dh;
5
6
if ((dh=DH_new()) == NULL) return(NULL);
7
+#if OPENSSL_VERSION_NUMBER >= 0x10100005L
8
+ BIGNUM *p, *g;
9
+
10
+ p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL);
11
+ g=BN_bin2bn(dh512_g,sizeof(dh512_g),NULL);
12
+ if (p == NULL || g == NULL) {
13
+ BN_free(p); BN_free(g);
14
+ DH_free(dh); return(NULL);
15
+ } else
16
+ DH_set0_pqg(dh, p, NULL, g);
17
+#else
18
dh->p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL);
19
dh->g=BN_bin2bn(dh512_g,sizeof(dh512_g),NULL);
20
if ((dh->p == NULL) || (dh->g == NULL))
21
{ DH_free(dh); return(NULL); }
22
+#endif
23
return(dh);
24
}
25
/* END AUTOGENERATED */
26
27