From fea039c5230e58ef0b383fa687ca57fe0c97afa7 Mon Sep 17 00:00:00 2001 From: tarilabs Date: Mon, 24 Jun 2024 22:03:01 +0200 Subject: [PATCH] fix(core): provider do_request to maintain verify in all request Signed-off-by: tarilabs --- oras/provider.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/oras/provider.py b/oras/provider.py index 8056ce47..b6941ec1 100644 --- a/oras/provider.py +++ b/oras/provider.py @@ -950,6 +950,7 @@ def do_request( json=json, headers=headers, stream=stream, + verify=self._tls_verify, ) # One retry if 403 denied (need new token?) @@ -957,11 +958,14 @@ def do_request( headers, changed = self.auth.authenticate_request( response, headers, refresh=True ) - return self.session.request( - method, - url, - data=data, - json=json, - headers=headers, - stream=stream, - ) + response = self.session.request( + method, + url, + data=data, + json=json, + headers=headers, + stream=stream, + verify=self._tls_verify, + ) + + return response