View | Details | Raw Unified | Return to bug 227178 | Differences between
and this patch

Collapse All | Expand All

(-)vio/viosslfactories.c (-4 / +11 lines)
Lines 68-80 static DH *get_dh2048(void) Link Here
68
  DH *dh;
68
  DH *dh;
69
  if ((dh=DH_new()))
69
  if ((dh=DH_new()))
70
  {
70
  {
71
    dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
71
    BIGNUM *p= BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
72
    dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL);
72
    BIGNUM *g= BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL);
73
    if (! dh->p || ! dh->g)
73
    if (!p || !g
74
    {
74
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
75
        || !DH_set0_pqg(dh, p, NULL, g)
76
#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
77
    ) {
75
      DH_free(dh);
78
      DH_free(dh);
76
      dh=0;
79
      dh=0;
77
    }
80
    }
81
#if OPENSSL_VERSION_NUMBER < 0x10100000L
82
    dh->p= p;
83
    dh->g= g;
84
#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
78
  }
85
  }
79
  return(dh);
86
  return(dh);
80
}
87
}

Return to bug 227178