MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / SetDH

Function SetDH

extra/yassl/src/yassl.cpp:87–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85
86
87void SetDH(Base& base)
88{
89 static unsigned char dh512_p[] =
90 {
91 0xDA,0x58,0x3C,0x16,0xD9,0x85,0x22,0x89,0xD0,0xE4,0xAF,0x75,
92 0x6F,0x4C,0xCA,0x92,0xDD,0x4B,0xE5,0x33,0xB8,0x04,0xFB,0x0F,
93 0xED,0x94,0xEF,0x9C,0x8A,0x44,0x03,0xED,0x57,0x46,0x50,0xD3,
94 0x69,0x99,0xDB,0x29,0xD7,0x76,0x27,0x6B,0xA2,0xD3,0xD4,0x12,
95 0xE2,0x18,0xF4,0xDD,0x1E,0x08,0x4C,0xF6,0xD8,0x00,0x3E,0x7C,
96 0x47,0x74,0xE8,0x33,
97 };
98
99 static unsigned char dh512_g[] =
100 {
101 0x02,
102 };
103
104 if ( (base.dh_ = DH_new()) ) {
105 base.dh_->p = BN_bin2bn(dh512_p, sizeof(dh512_p), 0);
106 base.dh_->g = BN_bin2bn(dh512_g, sizeof(dh512_g), 0);
107 }
108 if (!base.dh_->p || !base.dh_->g) {
109 DH_free(base.dh_);
110 base.dh_ = 0;
111 }
112 SSL_CTX_set_tmp_dh(base.ctx_, base.dh_);
113}
114
115
116void NewCopy(char*& dst, const char* src)

Callers 1

SetUpBaseFunction · 0.85

Calls 4

DH_newFunction · 0.85
BN_bin2bnFunction · 0.85
DH_freeFunction · 0.85
SSL_CTX_set_tmp_dhFunction · 0.85

Tested by

no test coverage detected