line |
true |
false |
branch |
142
|
17 |
233150 |
if (!matrixssl_initialized) { |
146
|
0 |
17 |
if (rc != PS_SUCCESS) |
201
|
120 |
119 |
for (; certInfo != NULL; certInfo=certInfo->next) { |
210
|
120 |
0 |
if (certInfo->subject.country != NULL) |
213
|
119 |
1 |
if (certInfo->subject.state != NULL) |
216
|
1 |
119 |
if (certInfo->subject.locality != NULL) |
219
|
120 |
0 |
if (certInfo->subject.organization != NULL) |
222
|
0 |
120 |
if (certInfo->subject.orgUnit != NULL) |
225
|
120 |
0 |
if (certInfo->subject.commonName != NULL) |
230
|
119 |
1 |
if (certInfo->issuer.country != NULL) |
233
|
118 |
2 |
if (certInfo->issuer.state != NULL) |
236
|
0 |
120 |
if (certInfo->issuer.locality != NULL) |
239
|
120 |
0 |
if (certInfo->issuer.organization != NULL) |
242
|
1 |
119 |
if (certInfo->issuer.orgUnit != NULL) |
245
|
120 |
0 |
if (certInfo->issuer.commonName != NULL) |
250
|
120 |
0 |
if (certInfo->notBefore != NULL) |
253
|
120 |
0 |
if (certInfo->notAfter != NULL) |
270
|
0 |
119 |
PUSHMARK(SP); |
271
|
0 |
119 |
XPUSHs(sv_2mortal(newRV_inc((SV *)certs))); |
272
|
0 |
119 |
XPUSHs(sv_2mortal(newSViv(alert))); |
279
|
0 |
119 |
if (res != 1) |
282
|
119 |
0 |
if (SvTRUE(ERRSV)) { |
|
119 |
0 |
if (SvTRUE(ERRSV)) { |
|
119 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
119 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
119 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
119 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
119 |
0 |
if (SvTRUE(ERRSV)) { |
|
119 |
0 |
if (SvTRUE(ERRSV)) { |
|
119 |
0 |
if (SvTRUE(ERRSV)) { |
|
119 |
0 |
if (SvTRUE(ERRSV)) { |
|
119 |
0 |
if (SvTRUE(ERRSV)) { |
|
109 |
10 |
if (SvTRUE(ERRSV)) { |
|
109 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
109 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
10 |
109 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
283
|
10 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
10 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
10 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
288
|
109 |
0 |
res = POPi; |
292
|
119 |
0 |
FREETMPS; |
320
|
0 |
0 |
PUSHMARK(SP); |
321
|
0 |
0 |
XPUSHs(sv_2mortal(newSViv(type))); |
322
|
0 |
0 |
XPUSHs(sv_2mortal(newSVpvn((const char*) data, len))); |
329
|
0 |
0 |
if (res != 1) |
332
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
333
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
338
|
0 |
0 |
res = POPi; |
342
|
0 |
0 |
FREETMPS; |
392
|
0 |
0 |
if (pssl->expectedName != NULL) { |
393
|
0 |
0 |
for (i = 0; i < ss->SNI_entries_number; i++) |
395
|
0 |
0 |
if ((regex_res = regexec(&(ss->SNI_entries[i]->regex_hostname), (const char *) pssl->expectedName, 0, NULL, 0)) == 0) { |
414
|
0 |
0 |
if (i < ss->SNI_entries_number) { |
419
|
0 |
0 |
if ((VHIndexCallback != NULL) && !ssl_data->cbSNI_done) { |
|
0 |
0 |
if ((VHIndexCallback != NULL) && !ssl_data->cbSNI_done) { |
426
|
0 |
0 |
PUSHMARK(SP); |
427
|
0 |
0 |
XPUSHs(sv_2mortal(newSViv(ssl_id))); |
428
|
0 |
0 |
XPUSHs(sv_2mortal(newSViv(i))); |
429
|
0 |
0 |
XPUSHs(sv_2mortal(newSVpv(pssl->expectedName, strlen(pssl->expectedName)))); |
436
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
437
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
444
|
0 |
0 |
FREETMPS; |
462
|
0 |
0 |
if (alpn != NULL) { |
466
|
0 |
0 |
for (i = 0; i < alpn->protoCount; i++) { |
467
|
0 |
0 |
for (j = 0; j < protoCount; j++) { |
471
|
0 |
0 |
if ((alpn->protoLen[i] == protoLen[j]) && !strncmp(alpn->proto[i], proto[j], protoLen[j])) { |
|
0 |
0 |
if ((alpn->protoLen[i] == protoLen[j]) && !strncmp(alpn->proto[i], proto[j], protoLen[j])) { |
481
|
0 |
0 |
if (res_cl != -1) break; |
486
|
0 |
0 |
if ((ALPNCallback != NULL) && (res_sv != -1)) { |
|
0 |
0 |
if ((ALPNCallback != NULL) && (res_sv != -1)) { |
491
|
0 |
0 |
PUSHMARK(SP); |
492
|
0 |
0 |
XPUSHs(sv_2mortal(newSViv(ssl_id))); |
493
|
0 |
0 |
XPUSHs(sv_2mortal(newSVpv(alpn->proto[res_sv], alpn->protoLen[res_sv]))); |
500
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
501
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
507
|
0 |
0 |
FREETMPS; |
560
|
0 |
0 |
if (ssl_data->keys != NULL) { |
569
|
0 |
0 |
if (hostnameLen > 254) hostnameLen = 254; |
579
|
0 |
0 |
for (i = 0; i < ss->SNI_entries_number; i++) |
581
|
0 |
0 |
if ((regex_res = regexec(&(ss->SNI_entries[i]->regex_hostname), (const char *) _hostname, 0, NULL, 0)) == 0) { |
599
|
0 |
0 |
if (*newKeys == NULL) { |
600
|
0 |
0 |
if (ss->keys != NULL) { |
608
|
0 |
0 |
if ((i < ss->SNI_entries_number) && (VHIndexCallback != NULL) && !ssl_data->cbSNI_done) { |
|
0 |
0 |
if ((i < ss->SNI_entries_number) && (VHIndexCallback != NULL) && !ssl_data->cbSNI_done) { |
|
0 |
0 |
if ((i < ss->SNI_entries_number) && (VHIndexCallback != NULL) && !ssl_data->cbSNI_done) { |
614
|
0 |
0 |
PUSHMARK(SP); |
615
|
0 |
0 |
XPUSHs(sv_2mortal(newSViv(ssl_id))); |
616
|
0 |
0 |
XPUSHs(sv_2mortal(newSViv(i))); |
617
|
0 |
0 |
XPUSHs(sv_2mortal(newSVpv(hostname, hostnameLen))); |
624
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
|
0 |
0 |
if (SvTRUE(ERRSV)) { |
625
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
|
0 |
0 |
warn("%s", SvPV_nolen(ERRSV)); |
632
|
0 |
0 |
FREETMPS; |
665
|
0 |
5 |
if (SvOK(ar)) { |
|
0 |
0 |
if (SvOK(ar)) { |
|
0 |
0 |
if (SvOK(ar)) { |
666
|
3 |
2 |
if (!SvROK(ar)) { |
668
|
3 |
0 |
item = SvPV(ar, item_len); |
672
|
0 |
3 |
if (item == NULL) |
675
|
0 |
3 |
if ((rc = psGetFileBuf(NULL, item, buffer, buffer_size)) != PS_SUCCESS) { |
682
|
0 |
2 |
if (SvTYPE(SvRV(ar)) != SVt_PVAV) |
698
|
4 |
2 |
for (i = 0; i < sct_array_size; i++) { |
700
|
4 |
0 |
item = SvPV(item_sv, item_len); |
705
|
0 |
4 |
if (stat(item, &fstat) != 0) { |
721
|
4 |
2 |
for (i = 0; i < sct_array_size; i++) { |
723
|
4 |
0 |
item = SvPV(item_sv, item_len); |
725
|
0 |
4 |
if ((rc = psGetFileBuf(NULL, item, &sct, &sct_size)) != PS_SUCCESS) { |
793
|
2 |
14 |
for (j = 0; j < SSL_server_index; j++) { |
798
|
1 |
1 |
if (ss->alpn != NULL) { |
802
|
2 |
1 |
for (k = 0; k < ss->alpn->protoCount; k++) |
803
|
2 |
0 |
if (ss->alpn->proto[k] != NULL) free(ss->alpn->proto[k]); |
810
|
1 |
2 |
for (i = 0; i < ss->SNI_entries_number; i++) { |
824
|
0 |
1 |
if (se->alpn != NULL) { |
828
|
0 |
0 |
for (k = 0; k < se->alpn->protoCount; k++) |
829
|
0 |
0 |
if (se->alpn->proto[k] != NULL) free(se->alpn->proto[k]); |
854
|
0 |
2 |
if (SSL_server_index == MAX_SSL_SERVERS) { |
881
|
0 |
1 |
if (server_index < 0) |
884
|
0 |
1 |
if (index < 0) |
887
|
0 |
1 |
if (OCSP_file == NULL) |
892
|
0 |
1 |
if (server_index >= SSL_server_index) |
895
|
0 |
1 |
if (index >= SSL_servers[server_index]->SNI_entries_number) |
900
|
0 |
1 |
if (rc != PS_SUCCESS) { |
907
|
1 |
0 |
if (buffer != NULL) psFreeNative(buffer); |
909
|
0 |
1 |
if (rc != PS_SUCCESS) |
926
|
0 |
2 |
if (server_index < 0) |
929
|
0 |
2 |
if (index < 0) |
934
|
0 |
2 |
if (server_index >= SSL_server_index) |
937
|
0 |
2 |
if (index >= SSL_servers[server_index]->SNI_entries_number) |
944
|
0 |
2 |
if (res < 1) { |
945
|
0 |
0 |
if (buffer != NULL) psFreeNative(buffer); |
951
|
2 |
0 |
if (buffer != NULL) psFreeNative(buffer); |
953
|
0 |
2 |
if (rc != PS_SUCCESS) { |
976
|
1 |
0 |
if (!(SvROK(ALPN_data) && SvTYPE(SvRV(ALPN_data)) == SVt_PVAV)) |
|
0 |
1 |
if (!(SvROK(ALPN_data) && SvTYPE(SvRV(ALPN_data)) == SVt_PVAV)) |
979
|
0 |
1 |
if (server_index < 0) |
982
|
0 |
1 |
if (server_index >= SSL_server_index) |
985
|
1 |
0 |
if (index < 0) { |
994
|
0 |
0 |
if (index >= SSL_servers[server_index]->SNI_entries_number) |
1001
|
0 |
1 |
if (*palpn == NULL) { |
1013
|
0 |
1 |
for (i = 0; i > alpn->protoCount; i++) |
1014
|
0 |
0 |
if (alpn->proto[i]) free(alpn->proto[i]); |
1018
|
0 |
1 |
if (alpn->protoCount > MAX_PROTO_EXT) alpn->protoCount = MAX_PROTO_EXT; |
1020
|
2 |
1 |
for (i = 0; i < alpn->protoCount; i++) { |
1022
|
2 |
0 |
item = (unsigned char *) SvPV(tmp_sv, item_len); |
1089
|
0 |
100807 |
if (rc != PS_SUCCESS) { |
1136
|
1 |
113 |
certBuf = SvOK(cert) ? (unsigned char *) SvPV(cert, certLen) : NULL; |
|
1 |
0 |
certBuf = SvOK(cert) ? (unsigned char *) SvPV(cert, certLen) : NULL; |
|
0 |
1 |
certBuf = SvOK(cert) ? (unsigned char *) SvPV(cert, certLen) : NULL; |
|
113 |
0 |
certBuf = SvOK(cert) ? (unsigned char *) SvPV(cert, certLen) : NULL; |
1137
|
2 |
112 |
privBuf = SvOK(priv) ? (unsigned char *) SvPV(priv, privLen) : NULL; |
|
2 |
0 |
privBuf = SvOK(priv) ? (unsigned char *) SvPV(priv, privLen) : NULL; |
|
0 |
2 |
privBuf = SvOK(priv) ? (unsigned char *) SvPV(priv, privLen) : NULL; |
|
112 |
0 |
privBuf = SvOK(priv) ? (unsigned char *) SvPV(priv, privLen) : NULL; |
1138
|
2 |
112 |
trustedCABuf= SvOK(trustedCA) ? (unsigned char *) SvPV(trustedCA, trustedCALen) : NULL; |
|
2 |
0 |
trustedCABuf= SvOK(trustedCA) ? (unsigned char *) SvPV(trustedCA, trustedCALen) : NULL; |
|
0 |
2 |
trustedCABuf= SvOK(trustedCA) ? (unsigned char *) SvPV(trustedCA, trustedCALen) : NULL; |
|
112 |
0 |
trustedCABuf= SvOK(trustedCA) ? (unsigned char *) SvPV(trustedCA, trustedCALen) : NULL; |
1175
|
0 |
0 |
certBuf = SvOK(cert) ? (unsigned char *) SvPV(cert, certLen) : NULL; |
|
0 |
0 |
certBuf = SvOK(cert) ? (unsigned char *) SvPV(cert, certLen) : NULL; |
|
0 |
0 |
certBuf = SvOK(cert) ? (unsigned char *) SvPV(cert, certLen) : NULL; |
|
0 |
0 |
certBuf = SvOK(cert) ? (unsigned char *) SvPV(cert, certLen) : NULL; |
1176
|
0 |
0 |
privBuf = SvOK(priv) ? (unsigned char *) SvPV(priv, privLen) : NULL; |
|
0 |
0 |
privBuf = SvOK(priv) ? (unsigned char *) SvPV(priv, privLen) : NULL; |
|
0 |
0 |
privBuf = SvOK(priv) ? (unsigned char *) SvPV(priv, privLen) : NULL; |
|
0 |
0 |
privBuf = SvOK(priv) ? (unsigned char *) SvPV(priv, privLen) : NULL; |
1177
|
0 |
0 |
trustedCABuf= SvOK(trustedCA) ? (unsigned char *) SvPV(trustedCA, trustedCALen) : NULL; |
|
0 |
0 |
trustedCABuf= SvOK(trustedCA) ? (unsigned char *) SvPV(trustedCA, trustedCALen) : NULL; |
|
0 |
0 |
trustedCABuf= SvOK(trustedCA) ? (unsigned char *) SvPV(trustedCA, trustedCALen) : NULL; |
|
0 |
0 |
trustedCABuf= SvOK(trustedCA) ? (unsigned char *) SvPV(trustedCA, trustedCALen) : NULL; |
1198
|
5 |
10 |
importPassBuf= SvOK(importPass) ? (unsigned char *) SvPV(importPass, importPassLen) : NULL; |
|
5 |
0 |
importPassBuf= SvOK(importPass) ? (unsigned char *) SvPV(importPass, importPassLen) : NULL; |
|
0 |
5 |
importPassBuf= SvOK(importPass) ? (unsigned char *) SvPV(importPass, importPassLen) : NULL; |
|
10 |
0 |
importPassBuf= SvOK(importPass) ? (unsigned char *) SvPV(importPass, importPassLen) : NULL; |
1199
|
11 |
4 |
macPassBuf = SvOK(macPass) ? (unsigned char *) SvPV(macPass, macPassLen) : NULL; |
|
11 |
0 |
macPassBuf = SvOK(macPass) ? (unsigned char *) SvPV(macPass, macPassLen) : NULL; |
|
0 |
11 |
macPassBuf = SvOK(macPass) ? (unsigned char *) SvPV(macPass, macPassLen) : NULL; |
|
4 |
0 |
macPassBuf = SvOK(macPass) ? (unsigned char *) SvPV(macPass, macPassLen) : NULL; |
1217
|
0 |
0 |
nameBuf = SvOK(name) ? SvPV_nolen(name) : NULL; |
|
0 |
0 |
nameBuf = SvOK(name) ? SvPV_nolen(name) : NULL; |
|
0 |
0 |
nameBuf = SvOK(name) ? SvPV_nolen(name) : NULL; |
|
0 |
0 |
nameBuf = SvOK(name) ? SvPV_nolen(name) : NULL; |
1218
|
0 |
0 |
symkeyBuf = SvOK(symkey) ? SvPV(symkey, symkeyLen) : NULL; |
|
0 |
0 |
symkeyBuf = SvOK(symkey) ? SvPV(symkey, symkeyLen) : NULL; |
|
0 |
0 |
symkeyBuf = SvOK(symkey) ? SvPV(symkey, symkeyLen) : NULL; |
|
0 |
0 |
symkeyBuf = SvOK(symkey) ? SvPV(symkey, symkeyLen) : NULL; |
1219
|
0 |
0 |
hashkeyBuf = SvOK(hashkey) ? SvPV(hashkey, hashkeyLen) : NULL; |
|
0 |
0 |
hashkeyBuf = SvOK(hashkey) ? SvPV(hashkey, hashkeyLen) : NULL; |
|
0 |
0 |
hashkeyBuf = SvOK(hashkey) ? SvPV(hashkey, hashkeyLen) : NULL; |
|
0 |
0 |
hashkeyBuf = SvOK(hashkey) ? SvPV(hashkey, hashkeyLen) : NULL; |
1245
|
0 |
1 |
if ((rc = psGetFileBuf(NULL, OCSP_file, &buffer, &buffer_size)) != PS_SUCCESS) { |
1252
|
0 |
1 |
if (rc != PS_SUCCESS) { |
1270
|
0 |
2 |
if ((res = build_SCT_buffer(SCT_params, &buffer, &buffer_size)) < 1) { |
1277
|
0 |
2 |
if (rc != PS_SUCCESS) { |
1299
|
0 |
110023 |
if (rc != PS_SUCCESS) { |
1347
|
0 |
11156 |
if (SvROK(cipherSuites) && SvTYPE(SvRV(cipherSuites)) == SVt_PVAV) { |
|
0 |
0 |
if (SvROK(cipherSuites) && SvTYPE(SvRV(cipherSuites)) == SVt_PVAV) { |
1351
|
0 |
0 |
if (cipherCount > 64) |
1354
|
0 |
0 |
for (i = 0; i < cipherCount; i++) { |
1356
|
0 |
0 |
cipherSuitesBuf[i] = (uint32) SvIV(*item); |
1358
|
11156 |
0 |
} else if (SvOK(cipherSuites)) { |
|
11156 |
0 |
} else if (SvOK(cipherSuites)) { |
|
0 |
11156 |
} else if (SvOK(cipherSuites)) { |
1367
|
11156 |
0 |
rc = matrixSslNewClientSession(&ssl, |
|
11156 |
0 |
rc = matrixSslNewClientSession(&ssl, |
|
0 |
0 |
rc = matrixSslNewClientSession(&ssl, |
|
1029 |
10127 |
rc = matrixSslNewClientSession(&ssl, |
1369
|
1029 |
0 |
(SvOK(certValidator) ? appCertValidator : NULL), |
|
0 |
1029 |
(SvOK(certValidator) ? appCertValidator : NULL), |
1370
|
11156 |
0 |
(SvOK(expectedName) ? (const char *) SvPV_nolen(expectedName) : NULL), |
|
0 |
11156 |
(SvOK(expectedName) ? (const char *) SvPV_nolen(expectedName) : NULL), |
1372
|
11156 |
0 |
(SvOK(extensionCback) ? appExtensionCback : NULL), |
|
0 |
11156 |
(SvOK(extensionCback) ? appExtensionCback : NULL), |
1375
|
0 |
11156 |
if (rc != MATRIXSSL_REQUEST_SEND) { |
1388
|
1029 |
10127 |
if(SvOK(certValidator)) { |
|
1029 |
0 |
if(SvOK(certValidator)) { |
|
0 |
1029 |
if(SvOK(certValidator)) { |
1389
|
4 |
10123 |
if(certValidatorArg==NULL) |
1394
|
11156 |
0 |
if(SvOK(extensionCback)) { |
|
11156 |
0 |
if(SvOK(extensionCback)) { |
|
0 |
11156 |
if(SvOK(extensionCback)) { |
1395
|
0 |
0 |
if(extensionCbackArg==NULL) |
1400
|
11156 |
0 |
FREETMPS; |
1425
|
11158 |
0 |
rc = matrixSslNewServerSession(&ssl, (sslKeys_t *)keys, |
1426
|
11158 |
0 |
(SvOK(certValidator) ? appCertValidator : NULL), |
|
0 |
11158 |
(SvOK(certValidator) ? appCertValidator : NULL), |
1431
|
0 |
11158 |
if (rc != PS_SUCCESS) { |
1444
|
11158 |
0 |
if(SvOK(certValidator)) { |
|
11158 |
0 |
if(SvOK(certValidator)) { |
|
0 |
11158 |
if(SvOK(certValidator)) { |
1445
|
0 |
0 |
if(certValidatorArg==NULL) |
1450
|
11158 |
0 |
FREETMPS; |
1531
|
0 |
1 |
if (server_index < 0) |
1534
|
0 |
1 |
if (server_index >= SSL_server_index) |
1540
|
0 |
1 |
if (ss->SNI_entries_number > 0) |
1544
|
1 |
0 |
if (!(SvROK(sni_data) && SvTYPE(SvRV(sni_data)) == SVt_PVAV)) |
|
0 |
1 |
if (!(SvROK(sni_data) && SvTYPE(SvRV(sni_data)) == SVt_PVAV)) |
1556
|
0 |
1 |
if (ss->SNI_entries_number > MAX_SNI_ENTRIES) |
1559
|
1 |
1 |
for (i = 0; i < ss->SNI_entries_number; i++) { |
1568
|
1 |
0 |
if (!(SvROK(sd_sv) && SvTYPE(SvRV(sd_sv)) == SVt_PVHV)) |
|
0 |
1 |
if (!(SvROK(sd_sv) && SvTYPE(SvRV(sd_sv)) == SVt_PVHV)) |
1575
|
1 |
0 |
if (hv_exists(sd, "hostname", strlen("hostname"))) { |
1577
|
0 |
1 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
1580
|
1 |
0 |
item = (unsigned char *) SvPV(item_sv , item_len); |
1592
|
0 |
1 |
if (regex_res != 0) { |
1600
|
1 |
0 |
if (hv_exists(sd, "cert", strlen("cert")) && hv_exists(sd, "key", strlen("key"))) { |
|
1 |
0 |
if (hv_exists(sd, "cert", strlen("cert")) && hv_exists(sd, "key", strlen("key"))) { |
1605
|
0 |
1 |
if (hv_exists(sd, "trustCA", strlen("trustCA"))) { |
1608
|
0 |
0 |
if (SvOK(trustedCA_sv)) { |
|
0 |
0 |
if (SvOK(trustedCA_sv)) { |
|
0 |
0 |
if (SvOK(trustedCA_sv)) { |
1609
|
0 |
0 |
trustedCA = (unsigned char *) SvPV_nolen(trustedCA_sv); |
1613
|
0 |
1 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
|
0 |
0 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
|
0 |
0 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
|
0 |
1 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
|
0 |
0 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
|
0 |
0 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
1614
|
1 |
0 |
cert = (unsigned char *) SvPV_nolen(cert_sv); |
1615
|
1 |
0 |
key = (unsigned char *) SvPV_nolen(key_sv); |
1621
|
0 |
1 |
if (rc != PS_SUCCESS) { |
1627
|
0 |
1 |
if (rc != PS_SUCCESS) |
1631
|
0 |
0 |
} else if (hv_exists(sd, "ecc_cert", strlen("ecc_cert")) && hv_exists(sd, "ecc_key", strlen("ecc_key"))) { |
|
0 |
0 |
} else if (hv_exists(sd, "ecc_cert", strlen("ecc_cert")) && hv_exists(sd, "ecc_key", strlen("ecc_key"))) { |
1635
|
0 |
0 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
|
0 |
0 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
|
0 |
0 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
|
0 |
0 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
|
0 |
0 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
|
0 |
0 |
if (SvOK(cert_sv) && SvOK(key_sv)) { |
1636
|
0 |
0 |
cert = (unsigned char *) SvPV_nolen(cert_sv); |
1637
|
0 |
0 |
key = (unsigned char *) SvPV_nolen(key_sv); |
1643
|
0 |
0 |
if (rc != PS_SUCCESS) { |
1649
|
0 |
0 |
if (rc != PS_SUCCESS) |
1656
|
0 |
1 |
if (hv_exists(sd, "DH_param", strlen("DH_param"))) { |
1658
|
0 |
0 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
1661
|
0 |
0 |
item = (unsigned char *) SvPV_nolen(item_sv); |
1666
|
0 |
0 |
if (rc != PS_SUCCESS) |
1670
|
1 |
0 |
if (hv_exists(sd, "session_ticket_keys", strlen("session_ticket_keys"))) { |
1679
|
0 |
1 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
1682
|
1 |
0 |
item = (unsigned char *) SvPV(item_sv, item_len); |
1686
|
0 |
1 |
if (item_len > 16) item_len = 16; |
1691
|
0 |
1 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
1694
|
1 |
0 |
item = (unsigned char *) SvPV(item_sv, item_len); |
1695
|
1 |
0 |
if (!((item_len == 16) || (item_len == 32))) |
|
0 |
1 |
if (!((item_len == 16) || (item_len == 32))) |
1705
|
0 |
1 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
1708
|
1 |
0 |
item = (unsigned char *) SvPV(item_sv, item_len); |
1709
|
0 |
1 |
if (item_len != 32) |
1718
|
0 |
1 |
if (rc != PS_SUCCESS) |
1723
|
1 |
0 |
if (hv_exists(sd, "OCSP_staple", strlen("OCSP_staple"))) { |
1725
|
0 |
1 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
1728
|
1 |
0 |
item = (unsigned char *) SvPV_nolen(item_sv); |
1733
|
0 |
1 |
if (rc != PS_SUCCESS) |
1738
|
1 |
0 |
if (buffer != NULL) psFreeNative(buffer); |
1742
|
0 |
1 |
if (rc != PS_SUCCESS) |
1747
|
1 |
0 |
if (hv_exists(sd, "SCT_params", strlen("SCT_params"))) { |
1749
|
0 |
1 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
|
0 |
0 |
if (!SvOK(item_sv)) |
1756
|
0 |
1 |
if (res < 1) |
1761
|
1 |
0 |
if (buffer != NULL) psFreeNative(buffer); |
1765
|
0 |
1 |
if (rc != PS_SUCCESS) |
1769
|
0 |
1 |
if (hv_exists(sd, "ALPN", strlen("ALPN"))) { |
1772
|
0 |
0 |
if (!(SvROK(item_sv) && SvTYPE(SvRV(item_sv)) == SVt_PVAV)) |
|
0 |
0 |
if (!(SvROK(item_sv) && SvTYPE(SvRV(item_sv)) == SVt_PVAV)) |
1781
|
0 |
0 |
if (ss->SNI_entries[i]->alpn->protoCount > MAX_PROTO_EXT) ss->SNI_entries[i]->alpn->protoCount = MAX_PROTO_EXT; |
1783
|
0 |
0 |
for (j = 0; j < ss->SNI_entries[i]->alpn->protoCount; j++) { |
1785
|
0 |
0 |
item = (unsigned char *) SvPV(tmp_sv, item_len); |
1822
|
0 |
1 |
if (server_index < 0) |
1825
|
0 |
1 |
if (server_index >= SSL_server_index) |
1832
|
1 |
0 |
if (!(SvROK(params) && SvTYPE(SvRV(params)) == SVt_PVHV)) |
|
0 |
1 |
if (!(SvROK(params) && SvTYPE(SvRV(params)) == SVt_PVHV)) |
1837
|
0 |
1 |
if (hv_exists(hparams, "keys", strlen("keys"))) { |
1839
|
0 |
0 |
tmp = SvIV((SV*)SvRV(item_sv)); |
1843
|
1 |
0 |
if (hv_exists(hparams, "ALPN", strlen("ALPN"))) { |
1846
|
1 |
0 |
if (!(SvROK(item_sv) && SvTYPE(SvRV(item_sv)) == SVt_PVAV)) |
|
0 |
1 |
if (!(SvROK(item_sv) && SvTYPE(SvRV(item_sv)) == SVt_PVAV)) |
1855
|
0 |
1 |
if (ss->alpn->protoCount > MAX_PROTO_EXT) ss->alpn->protoCount = MAX_PROTO_EXT; |
1859
|
2 |
1 |
for (i = 0; i < ss->alpn->protoCount; i++) { |
1861
|
2 |
0 |
item = (unsigned char *) SvPV(tmp_sv, item_len); |
1888
|
0 |
0 |
if (server_index < 0) |
1891
|
0 |
0 |
if (server_index >= SSL_server_index) |
1909
|
0 |
0 |
if (ss->SNI_entries_number > 0) { |
1916
|
0 |
0 |
if (ss->alpn != NULL) matrixSslRegisterALPNCallback(ssl, ALPNCallbackXS); |
1935
|
10126 |
12188 |
if(hv_exists_ent(certValidatorArg, key, 0)) |
1937
|
0 |
22314 |
if(hv_exists_ent(extensionCbackArg, key, 0)) |
1940
|
22314 |
0 |
FREETMPS; |
1943
|
11158 |
11156 |
if (((ssl_t *) ssl)->userPtr != NULL) free(((ssl_t *) ssl)->userPtr); |
1955
|
0 |
11841 |
if (RETVAL < 0) |
1958
|
6568 |
5273 |
if (RETVAL > 0) |
1988
|
0 |
9678 |
if (readbufsz < 0) { |
1995
|
9678 |
0 |
buf = (unsigned char *) SvPV(inBuf, inbufsz); |
1996
|
5546 |
4132 |
if((STRLEN) readbufsz > inbufsz) |
2004
|
3193 |
6485 |
sv_setpvn_mg(ptBuf, (const char *) buf, (buf==NULL ? 0 : bufsz)); |
2018
|
0 |
0 |
if (RETVAL > 0) sv_setpvn_mg(ptBuf, (const char *) buf, (buf==NULL ? 0 : bufsz)); |
|
0 |
0 |
if (RETVAL > 0) sv_setpvn_mg(ptBuf, (const char *) buf, (buf==NULL ? 0 : bufsz)); |
2032
|
1021 |
3102 |
sv_setpvn_mg(ptBuf, (const char *) buf, (buf==NULL ? 0 : bufsz)); |
2045
|
4126 |
0 |
buf = (unsigned char *) SvPV(outBuf, bufsz); |
2101
|
2 |
6 |
if (SvROK(cipherSpecs) && SvTYPE(SvRV(cipherSpecs)) == SVt_PVAV) { |
|
2 |
0 |
if (SvROK(cipherSpecs) && SvTYPE(SvRV(cipherSpecs)) == SVt_PVAV) { |
2105
|
0 |
2 |
if (cipherCount > 64) |
2108
|
2 |
2 |
for (i = 0; i < cipherCount; i++) { |
2110
|
2 |
0 |
cipherSpecsBuf[i] = (uint32) SvIV(*item); |
2112
|
6 |
0 |
} else if (SvOK(cipherSpecs)) { |
|
6 |
0 |
} else if (SvOK(cipherSpecs)) { |
|
0 |
6 |
} else if (SvOK(cipherSpecs)) { |
2117
|
6 |
2 |
RETVAL = matrixSslEncodeRehandshake((ssl_t *)ssl, (sslKeys_t *)keys, |
2118
|
6 |
0 |
(SvOK(certValidator) ? appCertValidator : NULL), |
|
0 |
6 |
(SvOK(certValidator) ? appCertValidator : NULL), |
2126
|
1 |
7 |
if(certValidatorArg==NULL) |
2128
|
3 |
5 |
if(hv_exists_ent(certValidatorArg, key, 0)) |
2130
|
6 |
2 |
if(SvOK(certValidator)) |
|
6 |
0 |
if(SvOK(certValidator)) |
|
0 |
6 |
if(SvOK(certValidator)) |
2133
|
8 |
0 |
FREETMPS; |
2151
|
0 |
0 |
if (rc != PS_SUCCESS) { |
2178
|
0 |
0 |
extData = (unsigned char *) SvPV(ext, extLen); |