[ARM] Fix #19420: az bicep install: Fix the CERTIFICATE_VERIFY_FAILED for generating SSL#20183
Merged
zhoxing-ms merged 2 commits intoAzure:devfrom Nov 15, 2021
Merged
[ARM] Fix #19420: az bicep install: Fix the CERTIFICATE_VERIFY_FAILED for generating SSL#20183zhoxing-ms merged 2 commits intoAzure:devfrom
az bicep install: Fix the CERTIFICATE_VERIFY_FAILED for generating SSL#20183zhoxing-ms merged 2 commits intoAzure:devfrom
Conversation
|
Thank you for your contribution wilfriedb! We will review the pull request and get back to you soon. |
Collaborator
|
Bicep |
az bicep install: Fix the CERTIFICATE_VERIFY_FAILED for Installation of SSL
az bicep install: Fix the CERTIFICATE_VERIFY_FAILED for Installation of SSL az bicep install: Fix the CERTIFICATE_VERIFY_FAILED for generating SSL
zhoxing-ms
approved these changes
Nov 15, 2021
jiasli
reviewed
Mar 31, 2023
Comment on lines
+144
to
+145
| ca_file = certifi.where() | ||
| response = requests.get("https://aka.ms/BicepReleases", verify=ca_file) |
Member
There was a problem hiding this comment.
This make requests only use certifi.where(). Env var REQUESTS_CA_BUNDLE and CURL_CA_BUNDLE no longer take effect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request fixes issue #19420.
The old code did not pass the path to the certificate file to request.get() and urlopen(), reulting in a SSL: CERTIFICATE_VERIFY_FAILED error.
Testing Guide
On a clean developer pc behind a corporate proxy with a certificate signed by a private root CA, type on a pwsh prompt:
az bicep install
Result:
bicep will be installed
(without the fix, there would be a certificate error)
On a clean regular developer pc, do the same, type
az bicep install
bicep will be installed, just as before the fix.
History Notes
[Bicep] az bicep install: works now behind a corporate proxy