tsget.1ossl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. .\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is >0, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .nr rF 0
  58. .if \n(.g .if rF .nr rF 1
  59. .if (\n(rF:(\n(.g==0)) \{\
  60. . if \nF \{\
  61. . de IX
  62. . tm Index:\\$1\t\\n%\t"\\$2"
  63. ..
  64. . if !\nF==2 \{\
  65. . nr % 0
  66. . nr F 2
  67. . \}
  68. . \}
  69. .\}
  70. .rr rF
  71. .\"
  72. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  73. .\" Fear. Run. Save yourself. No user-serviceable parts.
  74. . \" fudge factors for nroff and troff
  75. .if n \{\
  76. . ds #H 0
  77. . ds #V .8m
  78. . ds #F .3m
  79. . ds #[ \f1
  80. . ds #] \fP
  81. .\}
  82. .if t \{\
  83. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  84. . ds #V .6m
  85. . ds #F 0
  86. . ds #[ \&
  87. . ds #] \&
  88. .\}
  89. . \" simple accents for nroff and troff
  90. .if n \{\
  91. . ds ' \&
  92. . ds ` \&
  93. . ds ^ \&
  94. . ds , \&
  95. . ds ~ ~
  96. . ds /
  97. .\}
  98. .if t \{\
  99. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  100. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  101. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  102. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  103. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  104. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  105. .\}
  106. . \" troff and (daisy-wheel) nroff accents
  107. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  108. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  109. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  110. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  111. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  112. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  113. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  114. .ds ae a\h'-(\w'a'u*4/10)'e
  115. .ds Ae A\h'-(\w'A'u*4/10)'E
  116. . \" corrections for vroff
  117. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  118. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  119. . \" for low resolution devices (crt and lpr)
  120. .if \n(.H>23 .if \n(.V>19 \
  121. \{\
  122. . ds : e
  123. . ds 8 ss
  124. . ds o a
  125. . ds d- d\h'-1'\(ga
  126. . ds D- D\h'-1'\(hy
  127. . ds th \o'bp'
  128. . ds Th \o'LP'
  129. . ds ae ae
  130. . ds Ae AE
  131. .\}
  132. .rm #[ #] #H #V #F C
  133. .\" ========================================================================
  134. .\"
  135. .IX Title "TSGET 1ossl"
  136. .TH TSGET 1ossl "2024-09-03" "3.3.2" "OpenSSL"
  137. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  138. .\" way too many mistakes in technical documents.
  139. .if n .ad l
  140. .nh
  141. .SH "NAME"
  142. tsget \- Time Stamping HTTP/HTTPS client
  143. .SH "SYNOPSIS"
  144. .IX Header "SYNOPSIS"
  145. \&\fBtsget\fR
  146. \&\fB\-h\fR \fIserver_url\fR
  147. [\fB\-e\fR \fIextension\fR]
  148. [\fB\-o\fR \fIoutput\fR]
  149. [\fB\-v\fR]
  150. [\fB\-d\fR]
  151. [\fB\-k\fR \fIprivate_key.pem\fR]
  152. [\fB\-p\fR \fIkey_password\fR]
  153. [\fB\-c\fR \fIclient_cert.pem\fR]
  154. [\fB\-C\fR \fICA_certs.pem\fR]
  155. [\fB\-P\fR \fICA_path\fR]
  156. [\fB\-r\fR \fIfiles\fR]
  157. [\fB\-g\fR \fIEGD_socket\fR]
  158. [\fIrequest\fR ...]
  159. .SH "DESCRIPTION"
  160. .IX Header "DESCRIPTION"
  161. This command can be used for sending a timestamp request, as specified
  162. in \s-1RFC 3161,\s0 to a timestamp server over \s-1HTTP\s0 or \s-1HTTPS\s0 and storing the
  163. timestamp response in a file. It cannot be used for creating the requests
  164. and verifying responses, you have to use \fBopenssl\-ts\fR\|(1) to do that. This
  165. command can send several requests to the server without closing the \s-1TCP\s0
  166. connection if more than one requests are specified on the command line.
  167. .PP
  168. This command sends the following \s-1HTTP\s0 request for each timestamp request:
  169. .PP
  170. .Vb 7
  171. \& POST url HTTP/1.1
  172. \& User\-Agent: OpenTSA tsget.pl/<version>
  173. \& Host: <host>:<port>
  174. \& Pragma: no\-cache
  175. \& Content\-Type: application/timestamp\-query
  176. \& Accept: application/timestamp\-reply
  177. \& Content\-Length: length of body
  178. \&
  179. \& ...binary request specified by the user...
  180. .Ve
  181. .PP
  182. It expects a response of type application/timestamp\-reply, which is
  183. written to a file without any interpretation.
  184. .SH "OPTIONS"
  185. .IX Header "OPTIONS"
  186. .IP "\fB\-h\fR \fIserver_url\fR" 4
  187. .IX Item "-h server_url"
  188. The \s-1URL\s0 of the \s-1HTTP/HTTPS\s0 server listening for timestamp requests.
  189. .IP "\fB\-e\fR \fIextension\fR" 4
  190. .IX Item "-e extension"
  191. If the \fB\-o\fR option is not given this argument specifies the extension of the
  192. output files. The base name of the output file will be the same as those of
  193. the input files. Default extension is \fI.tsr\fR. (Optional)
  194. .IP "\fB\-o\fR \fIoutput\fR" 4
  195. .IX Item "-o output"
  196. This option can be specified only when just one request is sent to the
  197. server. The timestamp response will be written to the given output file. '\-'
  198. means standard output. In case of multiple timestamp requests or the absence
  199. of this argument the names of the output files will be derived from the names
  200. of the input files and the default or specified extension argument. (Optional)
  201. .IP "\fB\-v\fR" 4
  202. .IX Item "-v"
  203. The name of the currently processed request is printed on standard
  204. error. (Optional)
  205. .IP "\fB\-d\fR" 4
  206. .IX Item "-d"
  207. Switches on verbose mode for the underlying perl module WWW::Curl::Easy.
  208. You can see detailed debug messages for the connection. (Optional)
  209. .IP "\fB\-k\fR \fIprivate_key.pem\fR" 4
  210. .IX Item "-k private_key.pem"
  211. (\s-1HTTPS\s0) In case of certificate-based client authentication over \s-1HTTPS\s0
  212. \&\fIprivate_key.pem\fR must contain the private key of the user. The private key
  213. file can optionally be protected by a passphrase. The \fB\-c\fR option must also
  214. be specified. (Optional)
  215. .IP "\fB\-p\fR \fIkey_password\fR" 4
  216. .IX Item "-p key_password"
  217. (\s-1HTTPS\s0) Specifies the passphrase for the private key specified by the \fB\-k\fR
  218. argument. If this option is omitted and the key is passphrase protected,
  219. it will be prompted for. (Optional)
  220. .IP "\fB\-c\fR \fIclient_cert.pem\fR" 4
  221. .IX Item "-c client_cert.pem"
  222. (\s-1HTTPS\s0) In case of certificate-based client authentication over \s-1HTTPS\s0
  223. \&\fIclient_cert.pem\fR must contain the X.509 certificate of the user. The \fB\-k\fR
  224. option must also be specified. If this option is not specified no
  225. certificate-based client authentication will take place. (Optional)
  226. .IP "\fB\-C\fR \fICA_certs.pem\fR" 4
  227. .IX Item "-C CA_certs.pem"
  228. (\s-1HTTPS\s0) The trusted \s-1CA\s0 certificate store. The certificate chain of the peer's
  229. certificate must include one of the \s-1CA\s0 certificates specified in this file.
  230. Either option \fB\-C\fR or option \fB\-P\fR must be given in case of \s-1HTTPS.\s0 (Optional)
  231. .IP "\fB\-P\fR \fICA_path\fR" 4
  232. .IX Item "-P CA_path"
  233. (\s-1HTTPS\s0) The path containing the trusted \s-1CA\s0 certificates to verify the peer's
  234. certificate. The directory must be prepared with \fBopenssl\-rehash\fR\|(1). Either
  235. option \fB\-C\fR or option \fB\-P\fR must be given in case of \s-1HTTPS.\s0 (Optional)
  236. .IP "\fB\-r\fR \fIfiles\fR" 4
  237. .IX Item "-r files"
  238. See \*(L"Random State Options\*(R" in \fBopenssl\fR\|(1) for more information.
  239. .IP "\fB\-g\fR \fIEGD_socket\fR" 4
  240. .IX Item "-g EGD_socket"
  241. The name of an \s-1EGD\s0 socket to get random data from. (Optional)
  242. .IP "\fIrequest\fR ..." 4
  243. .IX Item "request ..."
  244. List of files containing \s-1RFC 3161\s0 DER-encoded timestamp requests. If no
  245. requests are specified only one request will be sent to the server and it will
  246. be read from the standard input.
  247. (Optional)
  248. .SH "ENVIRONMENT VARIABLES"
  249. .IX Header "ENVIRONMENT VARIABLES"
  250. The \fB\s-1TSGET\s0\fR environment variable can optionally contain default
  251. arguments. The content of this variable is added to the list of command line
  252. arguments.
  253. .SH "EXAMPLES"
  254. .IX Header "EXAMPLES"
  255. The examples below presume that \fIfile1.tsq\fR and \fIfile2.tsq\fR contain valid
  256. timestamp requests, tsa.opentsa.org listens at port 8080 for \s-1HTTP\s0 requests
  257. and at port 8443 for \s-1HTTPS\s0 requests, the \s-1TSA\s0 service is available at the /tsa
  258. absolute path.
  259. .PP
  260. Get a timestamp response for \fIfile1.tsq\fR over \s-1HTTP,\s0 output is written to
  261. \&\fIfile1.tsr\fR:
  262. .PP
  263. .Vb 1
  264. \& tsget \-h http://tsa.opentsa.org:8080/tsa file1.tsq
  265. .Ve
  266. .PP
  267. Get a timestamp response for \fIfile1.tsq\fR and \fIfile2.tsq\fR over \s-1HTTP\s0 showing
  268. progress, output is written to \fIfile1.reply\fR and \fIfile2.reply\fR respectively:
  269. .PP
  270. .Vb 2
  271. \& tsget \-h http://tsa.opentsa.org:8080/tsa \-v \-e .reply \e
  272. \& file1.tsq file2.tsq
  273. .Ve
  274. .PP
  275. Create a timestamp request, write it to \fIfile3.tsq\fR, send it to the server and
  276. write the response to \fIfile3.tsr\fR:
  277. .PP
  278. .Vb 3
  279. \& openssl ts \-query \-data file3.txt \-cert | tee file3.tsq \e
  280. \& | tsget \-h http://tsa.opentsa.org:8080/tsa \e
  281. \& \-o file3.tsr
  282. .Ve
  283. .PP
  284. Get a timestamp response for \fIfile1.tsq\fR over \s-1HTTPS\s0 without client
  285. authentication:
  286. .PP
  287. .Vb 2
  288. \& tsget \-h https://tsa.opentsa.org:8443/tsa \e
  289. \& \-C cacerts.pem file1.tsq
  290. .Ve
  291. .PP
  292. Get a timestamp response for \fIfile1.tsq\fR over \s-1HTTPS\s0 with certificate-based
  293. client authentication (it will ask for the passphrase if \fIclient_key.pem\fR is
  294. protected):
  295. .PP
  296. .Vb 2
  297. \& tsget \-h https://tsa.opentsa.org:8443/tsa \-C cacerts.pem \e
  298. \& \-k client_key.pem \-c client_cert.pem file1.tsq
  299. .Ve
  300. .PP
  301. You can shorten the previous command line if you make use of the \fB\s-1TSGET\s0\fR
  302. environment variable. The following commands do the same as the previous
  303. example:
  304. .PP
  305. .Vb 4
  306. \& TSGET=\*(Aq\-h https://tsa.opentsa.org:8443/tsa \-C cacerts.pem \e
  307. \& \-k client_key.pem \-c client_cert.pem\*(Aq
  308. \& export TSGET
  309. \& tsget file1.tsq
  310. .Ve
  311. .SH "SEE ALSO"
  312. .IX Header "SEE ALSO"
  313. \&\fBopenssl\fR\|(1),
  314. \&\fBopenssl\-ts\fR\|(1),
  315. WWW::Curl::Easy,
  316. <https://www.rfc\-editor.org/rfc/rfc3161.html>
  317. .SH "COPYRIGHT"
  318. .IX Header "COPYRIGHT"
  319. Copyright 2006\-2020 The OpenSSL Project Authors. All Rights Reserved.
  320. .PP
  321. Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use
  322. this file except in compliance with the License. You can obtain a copy
  323. in the file \s-1LICENSE\s0 in the source distribution or at
  324. <https://www.openssl.org/source/license.html>.