forked from aws-samples/data-protection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
usecase-5-step-7.py
28 lines (25 loc) · 1.05 KB
/
usecase-5-step-7.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
################################################################
# Making http to authenticate the private domain #
# https://alb.workshop.com over a TLS connection #
# This is a very simple web app that prints hello world #
################################################################
"""
import requests
def main():
"""
#############################################################################
# 1.Issue get request to private domain https://alb.workshop.com #
# 2.You will see the error message of the exception - what happened? #
#############################################################################
"""
try:
response = requests.get('https://alb.workshop.com')
exit(1)
except requests.exceptions.RequestException as e:
print 'Exception:',e
print "\nCertificate is not trusted - cannot validate server certificate"
print "\nStep-7 has been successfully completed \n"
exit(0)
if __name__ == "__main__":
main()