summaryrefslogtreecommitdiffstats
path: root/apps/tsget
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-09-07 17:57:02 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-09-07 17:57:02 +0000
commitb7e3cb31a55e662b4f16f15e196019dac5e07293 (patch)
tree7bcb7835f272a42e8389fc5db2c45c9926b81b57 /apps/tsget
parent9769137a435586de41974d05f07a03be2eeae21a (diff)
PR: 2031
Submitted by: steve@openssl.org Tolerate application/timestamp-response which some servers send out.
Diffstat (limited to 'apps/tsget')
-rw-r--r--apps/tsget7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/tsget b/apps/tsget
index 52dc89a58b..0d54e9fc9a 100644
--- a/apps/tsget
+++ b/apps/tsget
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# Written by Zoltan Glozik <zglozik@stones.com>.
# Copyright (c) 2002 The OpenTSA Project. All rights reserved.
-$::version = '$Id: tsget,v 1.1.2.1 2009/09/02 15:57:12 steve Exp $';
+$::version = '$Id: tsget,v 1.1.2.2 2009/09/07 17:57:02 steve Exp $';
use strict;
use IO::Handle;
@@ -49,7 +49,7 @@ sub create_curl {
$curl->setopt(CURLOPT_CUSTOMREQUEST, "POST");
$curl->setopt(CURLOPT_HTTPHEADER,
["Content-Type: application/timestamp-query",
- "Accept: application/timestamp-reply"]);
+ "Accept: application/timestamp-reply,application/timestamp-response"]);
$curl->setopt(CURLOPT_READFUNCTION, \&read_body);
$curl->setopt(CURLOPT_HEADERFUNCTION, sub { return length($_[0]); });
@@ -102,7 +102,8 @@ sub get_timestamp {
$error_string .= " ($::error_buf)" if defined($::error_buf);
} else {
my $ct = $curl->getinfo(CURLINFO_CONTENT_TYPE);
- if (lc($ct) ne "application/timestamp-reply") {
+ if (lc($ct) ne "application/timestamp-reply"
+ && lc($ct) ne "application/timestamp-response") {
$error_string = "unexpected content type returned: $ct";
}
}