You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/testssl.1
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,9 @@ Please note that \fBfname\fR has to be in Unix format\. DOS carriage returns won
136
136
.P
137
137
\fB\-\-basicauth<user:pass>\fR This can be set to provide HTTP basic auth credentials which are used during checks for security headers\. BASICAUTH is the ENV variable you can use instead\.
138
138
.
139
+
.P
140
+
\fB\-\-reqheader<header>\fR This can be used to add additional HTTP request headers in the correct format \fBHeadername:headercontent\fR\. This parameter can be called multiple times if required\. For example: \fB\-\-reqheader\'Proxy\-Authorization:BasicdGVzdHNzbDpydWxlcw==\'\-\-reqheader\'ClientID:0xDEADBEAF\'\fR\. REQHEADER is the corresponding environment variable\.
141
+
.
139
142
.SS "SPECIAL INVOCATIONS"
140
143
\fB\-t<protocol>,\-\-starttls<protocol>\fR does a default run against a STARTTLS enabled \fBprotocol\fR\.\fBprotocol\fR must be one of \fBftp\fR, \fBsmtp\fR, \fBpop3\fR, \fBimap\fR, \fBxmpp\fR, \fBxmpp-server\fR, \fBtelnet\fR, \fBldap\fR, \fBirc\fR, \fBlmtp\fR, \fBnntp\fR, \fBpostgres\fR, \fBmysql\fR\. For the latter four you need e\.g\. the supplied OpenSSL or OpenSSL version 1\.1\.1\. Please note: MongoDB doesn\'t offer a STARTTLS connection, LDAP currently only works with \fB\-\-ssl\-native\fR\.\fBtelnet\fR and \fBirc\fR is WIP\.
Copy file name to clipboardExpand all lines: doc/testssl.1.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,8 @@ The same can be achieved by setting the environment variable `WARNINGS`.
110
110
111
111
`--basicauth <user:pass>` This can be set to provide HTTP basic auth credentials which are used during checks for security headers. BASICAUTH is the ENV variable you can use instead.
112
112
113
+
`--reqheader <header>` This can be used to add additional HTTP request headers in the correct format `Headername: headercontent`. This parameter can be called multiple times if required. For example: `--reqheader 'Proxy-Authorization: Basic dGVzdHNzbDpydWxlcw==' --reqheader 'ClientID: 0xDEADBEAF'`. REQHEADER is the corresponding environment variable.
Copy file name to clipboardExpand all lines: testssl.sh
+23-1Lines changed: 23 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -162,6 +162,7 @@ QUIET=${QUIET:-false} # don't output the banner. By doing this
162
162
SSL_NATIVE=${SSL_NATIVE:-false} # we do per default bash sockets where possible "true": switch back to "openssl native"
163
163
ASSUME_HTTP=${ASSUME_HTTP:-false} # in seldom cases (WAF, old servers, grumpy SSL) service detection fails. "True" enforces HTTP checks
164
164
BASICAUTH=${BASICAUTH:-""} # HTTP basic auth credentials can be set here like user:pass
165
+
REQHEADER=${REQHEADER:-""} # HTTP custom request header can be set here like Header: content. Can be used multiple times.
165
166
BUGS=${BUGS:-""} # -bugs option from openssl, needed for some BIG IP F5
166
167
WARNINGS=${WARNINGS:-""} # can be either off or batch
167
168
DEBUG=${DEBUG:-0} # 1: normal output the files in /tmp/ are kept for further debugging purposes
@@ -373,6 +374,7 @@ TLS_NOW="" # Similar
373
374
TLS_DIFFTIME_SET=false # Tells TLS functions to measure the TLS difftime or not
374
375
NOW_TIME=""
375
376
HTTP_TIME=""
377
+
REQHEADERS=()
376
378
GET_REQ11=""
377
379
START_TIME=0 # time in epoch when the action started
378
380
END_TIME=0 # .. ended
@@ -886,6 +888,15 @@ is_ipv6addr() {
886
888
return 1
887
889
}
888
890
891
+
join_by() {
892
+
# joins an array using a custom delimiter https://web.archive.org/web/20201222183540/https://stackoverflow.com/questions/1527049/how-can-i-join-elements-of-an-array-in-bash/17841619#17841619
893
+
local d=$1
894
+
shift
895
+
local f=$1
896
+
shift
897
+
printf %s "$f" "${@/#/$d}";
898
+
}
899
+
889
900
###### END universal helper function definitions ######
890
901
891
902
###### START ServerHello/OpenSSL/F5 function definitions ######
@@ -19239,6 +19250,7 @@ tuning / connect options (most also can be preset via environment variables):
19239
19250
--phone-out allow to contact external servers for CRL download and querying OCSP responder
19240
19251
--add-ca <CA files|CA dir> path to <CAdir> with *.pem or a comma separated list of CA files to include in trust check
19241
19252
--basicauth <user:pass> provide HTTP basic auth information.
0 commit comments