summaryrefslogtreecommitdiff
path: root/jstests/ocsp
diff options
context:
space:
mode:
authorShreyas Kalyan <shreyas.kalyan@10gen.com>2020-09-17 09:48:48 -0700
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-18 18:18:41 +0000
commit08c636e09c8433a4edc6a14b550c0ee98da66f89 (patch)
tree66b9f9d210f6c695641e0a11330d2c39f6778372 /jstests/ocsp
parent0a6cb53bd220ceaae946ff5b1a4ddb51d0582348 (diff)
downloadmongo-08c636e09c8433a4edc6a14b550c0ee98da66f89.tar.gz
SERVER-50690 Add option to specify bind ip to ocsp mock
Diffstat (limited to 'jstests/ocsp')
-rw-r--r--jstests/ocsp/lib/ocsp_mock.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/jstests/ocsp/lib/ocsp_mock.py b/jstests/ocsp/lib/ocsp_mock.py
index 04963b38559..78a5313efe1 100644
--- a/jstests/ocsp/lib/ocsp_mock.py
+++ b/jstests/ocsp/lib/ocsp_mock.py
@@ -18,6 +18,8 @@ def main():
parser.add_argument('-p', '--port', type=int, default=8080, help="Port to listen on")
+ parser.add_argument('-b', '--bind_ip', type=str, default=None, help="IP to listen on")
+
parser.add_argument('--ca_file', type=str, required=True, help="CA file for OCSP responder")
parser.add_argument('-v', '--verbose', action='count', help="Enable verbose tracing")
@@ -37,10 +39,7 @@ def main():
print('Initializing OCSP Responder')
mock_ocsp_responder.init_responder(issuer_cert=args.ca_file, responder_cert=args.ocsp_responder_cert, responder_key=args.ocsp_responder_key, fault=args.fault, next_update_seconds=args.next_update_seconds)
- if args.verbose:
- mock_ocsp_responder.init(args.port, debug=True)
- else:
- mock_ocsp_responder.init(args.port)
+ mock_ocsp_responder.init(port=args.port, debug=args.verbose, host=args.bind_ip)
print('Mock OCSP Responder is running on port %s' % (str(args.port)))