| 205 | } |
| 206 | |
| 207 | int main(int argc, char* argv[]) |
| 208 | { |
| 209 | acl::acl_cpp_init(); |
| 210 | acl::log::stdout_open(true); |
| 211 | |
| 212 | #if defined(_WIN32) || defined(_WIN64) |
| 213 | acl::polarssl_conf::set_libpath("libpolarssl.dll"); |
| 214 | #else |
| 215 | acl::polarssl_conf::set_libpath("../libpolarssl.so"); |
| 216 | #endif |
| 217 | acl::polarssl_conf::load(); |
| 218 | |
| 219 | __ssl_conf = new acl::polarssl_conf; |
| 220 | |
| 221 | int n = 1; |
| 222 | if (argc >= 2) { |
| 223 | n = atoi(argv[1]); |
| 224 | } |
| 225 | if (n <= 0) { |
| 226 | n = 100; |
| 227 | } |
| 228 | ACL_METER_TIME("---------- begin ----------"); |
| 229 | for (int i = 0; i < 0; i++) { |
| 230 | test0(i); |
| 231 | } |
| 232 | ACL_METER_TIME("---------- end ----------"); |
| 233 | |
| 234 | // 126 �� SSL ����ʱ�� HTTP ����ͷ�е� Host ֵΪ mail.126.com:443 ʱ�� nginx |
| 235 | // �ᱨ����ֻ���ǣ�Host: mail.126.com������ |
| 236 | |
| 237 | test1("mail.126.com", 443, false, true); |
| 238 | printf("\r\nenter any key to continue ..."); fflush(stdout); getchar(); |
| 239 | |
| 240 | test2("mail.126.com", 443, false, true); |
| 241 | printf("\r\nenter any key to continue ..."); fflush(stdout); getchar(); |
| 242 | |
| 243 | test2("mail.qq.com", 443, false, true); |
| 244 | printf("\r\nenter any key to continue ..."); fflush(stdout); getchar(); |
| 245 | |
| 246 | test2("mail.sohu.com", 443, false, true); |
| 247 | printf("\r\nenter any key to continue ..."); fflush(stdout); getchar(); |
| 248 | |
| 249 | test2("mail.sina.com.cn", 443, false, true); |
| 250 | printf("\r\nenter any key to continue ..."); fflush(stdout); getchar(); |
| 251 | |
| 252 | test2("127.0.0.1", 2443, false, true); |
| 253 | |
| 254 | printf("Over, enter any key to exit!\n"); |
| 255 | getchar(); |
| 256 | delete __ssl_conf; |
| 257 | return (0); |
| 258 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…