-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding verifyMode param to safeRequest #74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new getSSLContext
parameter is unused, so the CVerifyPeer
mode is always used even if the caller tries to use a different mode. This PR writes:
context = getSSLContext(caFile = pinnedCert, verifyMode = verifyMode)
but then it only uses the CVerifyPeer
mode because that's hardcoded inside getSSLContext
.
docker in some cases needs to make a call via TLS however not validate the certificate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR added verifyMode
as a new parameter for createHttpClient
, but did not alter newAwsClient
proc, which uses createHttpClient
:
nimutils/nimutils/awsclient.nim
Lines 95 to 105 in 4304936
proc newAwsClient*(creds: AwsCredentials, region, | |
service: string): AwsClient = | |
let | |
# TODO - use some kind of template and compile-time variable to put the correct kernel used to build the sdk in the UA? | |
httpclient = createHttpClient( | |
userAgent = "nimaws-sdk/0.3.3; " & defUserAgent.replace(" ", "-").toLower() & "; darwin/16.7.0", | |
) | |
scope = AwsScope(date: getAmzDateString(), region: region, service: service) | |
return AwsClient(httpClient: httpclient, credentials: creds, scope: scope, | |
key: "", key_expires: getTime()) |
Should we add a verifyMode
parameter to newAwsClient
?
aws client always needs to verify its peer. no need to customize it |
docker in some cases needs to make a call via TLS however not validate the certificate