Orange-OpenSource / rtpy

Python wrapper for the JFrog Artifactory REST API
Apache License 2.0
15 stars 10 forks source link

Could not found the ssl certification verification flag to skip the SSL verification #3

Closed veerla1986 closed 3 years ago

veerla1986 commented 3 years ago

Could not found the ssl certification verification flag to skip the disable SSL verification.

By default the verify flag set to True.

From the module rtpy, there no flag/ config parameter to set the verify = False to skip the ssl verification.

Would be good to add the parameter to self._user_settings to set the verify Flag for convenience ad pass it to the request method.

Getting error: Max retries exceeded with url: /artifactory/api/security/users (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

guillaumerenault commented 3 years ago

Hi, It is possible to supply your own requests.Session object as described in the rtpy documentation : https://rtpy.readthedocs.io/en/latest/user/getting_started.html#optional-keys

You can use a default request.Session object and set the session.verify attribute to False.

session = requests.Session()
session.verify = False
settings['session'] = session
af = rtpy.Rtpy(settings)

Make sure that the REQUESTS_CA_BUNDLE environement variable is not set as it will have precedence over the session.verify attribute in your code.

veerla1986 commented 3 years ago

Thanks a lot.

I have already found this solution on a mail mentioned document. I forgot to update it on my request.

Anyhow thanks a lot for your response.

Thanks, Anki.

On Mon, Nov 9, 2020 at 8:29 PM Guillaume Renault notifications@github.com wrote:

Hi, It is possible to supply your own requests.Session object https://requests.readthedocs.io/en/master/user/advanced/#session-objects as described in the rtpy documentation : https://rtpy.readthedocs.io/en/latest/user/getting_started.html#optional-keys

You can use a default request.Session object and set the session.verify attribute to False.

session = requests.Session()session.verify = Falsesettings['session'] = sessionaf = rtpy.Rtpy(settings)

Make sure that the REQUESTS_CA_BUNDLE environement variable is not set as it will have precedence over the session.verify attribute in your code.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Orange-OpenSource/rtpy/issues/3#issuecomment-724066743, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB27MLACNJKYAVTMCHLO7FTSO77WHANCNFSM4TMM66IA .

--

Regrds..

..ankireddy.v