/* dhparam.c: initial DH parameters for stunnel */ #include "prototypes.h" #ifndef OPENSSL_NO_DH #define DN_new DH_new DH *get_dh2048(void) { static unsigned char dhp_2048[] = { 0xe6, 0xb7, 0xf2, 0x02, 0x95, 0x0a, 0xe9, 0xa8, 0xa8, 0x85, 0x70, 0x2d, 0xde, 0xc5, 0x60, 0x31, 0x47, 0x88, 0x69, 0x85, 0x83, 0x2d, 0x6f, 0x06, 0x26, 0x29, 0x77, 0x26, 0x98, 0xf8, 0x2c, 0x64, 0x68, 0x04, 0xed, 0x07, 0x44, 0xe1, 0xe8, 0x44, 0xab, 0x29, 0xa6, 0x5f, 0x14, 0xf2, 0xbc, 0x1b, 0x45, 0x5a, 0x34, 0x20, 0x53, 0x84, 0x14, 0xa0, 0xfe, 0x02, 0xc1, 0x03, 0xd5, 0x77, 0xf8, 0xa6, 0x99, 0xe5, 0x3c, 0x6a, 0x34, 0x16, 0x29, 0xc5, 0xa3, 0x09, 0xc7, 0x0e, 0x58, 0xf6, 0xff, 0x6b, 0xbe, 0x2d, 0x7d, 0x36, 0x09, 0x1d, 0x00, 0x78, 0xcd, 0xce, 0x5e, 0xef, 0xef, 0x8f, 0x90, 0xb9, 0x44, 0x36, 0x25, 0x78, 0xee, 0xce, 0x24, 0xc4, 0xf4, 0xbd, 0x04, 0xa2, 0x39, 0x4e, 0xa2, 0xd1, 0x16, 0x74, 0x74, 0xd8, 0x6b, 0xe0, 0x04, 0x35, 0x58, 0x90, 0xa4, 0x18, 0x3a, 0x64, 0x78, 0xee, 0x67, 0x4d, 0x69, 0x23, 0x1a, 0xa5, 0xd6, 0x86, 0x13, 0x5a, 0xf9, 0x78, 0x64, 0xe9, 0xb7, 0x64, 0x52, 0x27, 0xd9, 0x27, 0x68, 0x2e, 0x03, 0xd4, 0x66, 0x1a, 0x37, 0x1d, 0xdc, 0x85, 0x14, 0x93, 0x51, 0x2b, 0xa2, 0x14, 0x93, 0x5d, 0x62, 0x2c, 0x76, 0xc4, 0x9c, 0xd7, 0x3a, 0xb2, 0xec, 0x11, 0x3b, 0xf2, 0xca, 0xf5, 0xe7, 0x96, 0x72, 0xe1, 0x99, 0x32, 0x82, 0x6d, 0x79, 0xf2, 0x15, 0xc2, 0x44, 0xa2, 0x59, 0x6f, 0xa8, 0x9f, 0x43, 0xbb, 0x98, 0xcd, 0x89, 0xd2, 0x59, 0xb0, 0x0f, 0x48, 0x88, 0xa7, 0xa0, 0x84, 0xab, 0xfa, 0x95, 0x4e, 0x6f, 0x77, 0x65, 0xe7, 0x95, 0x58, 0x12, 0x35, 0x5a, 0x09, 0x39, 0x0c, 0xe3, 0x39, 0x90, 0xf3, 0x4f, 0xf5, 0x70, 0x62, 0xcf, 0x97, 0xc6, 0x09, 0x7d, 0xee, 0x00, 0xff, 0x82, 0x5c, 0x4c, 0xfb, 0x7a, 0x2f, 0xb3, 0xe2, 0xa3, 0x2f, 0xcc, 0xc7 }; static unsigned char dhg_2048[] = { 0x02 }; DH *dh = DH_new(); BIGNUM *p, *g; if (dh == NULL) return NULL; p = BN_bin2bn(dhp_2048, sizeof(dhp_2048), NULL); g = BN_bin2bn(dhg_2048, sizeof(dhg_2048), NULL); if (p == NULL || g == NULL || !DH_set0_pqg(dh, p, NULL, g)) { DH_free(dh); BN_free(p); BN_free(g); return NULL; } return dh; } #endif /* OPENSSL_NO_DH */ /* built for stunnel 5.78 */