comparison ssl_ocsp.t @ 1636:2d371452658c

Tests: fixed serving binary OCSP responses on win32.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 24 Dec 2020 19:17:05 +0300
parents 804a7409bc63
children 5ac6efbe5552
comparison
equal deleted inserted replaced
1635:7b80c8e0479a 1636:2d371452658c
526 526
527 } else { 527 } else {
528 $resp = 'ec-resp'; 528 $resp = 'ec-resp';
529 } 529 }
530 530
531 next unless -s "$d/$resp.der";
532
531 # ocsp dummy handler 533 # ocsp dummy handler
532 534
533 select undef, undef, undef, 0.02; 535 select undef, undef, undef, 0.02;
534 536
535 $headers = <<"EOF"; 537 $headers = <<"EOF";
537 Connection: close 539 Connection: close
538 Content-Type: application/ocsp-response 540 Content-Type: application/ocsp-response
539 541
540 EOF 542 EOF
541 543
542 print $client $headers . $t->read_file("$resp.der") 544 local $/;
543 if -e "$d/$resp.der"; 545 open my $fh, '<', "$d/$resp.der"
546 or die "Can't open $resp.der: $!";
547 binmode $fh;
548 my $content = <$fh>;
549 close $fh;
550
551 print $client $headers . $content;
544 } 552 }
545 } 553 }
546 554
547 ############################################################################### 555 ###############################################################################