You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we have some awkward code in pynitrokey to dectect self-signed SSL certificates:
try:
yieldnethsmexceptnethsm_sdk.NetHSMErrorase:
raiseclick.ClickException(e)
excepturllib3.exceptions.MaxRetryErrorase:
ifisinstance(e.reason, urllib3.exceptions.SSLError):
raiseclick.ClickException(
f"Could not connect to the NetHSM: {e.reason}\nIf you use a self-signed certificate, please set the --no-verify-tls option."
)
else:
raisee
It would be nice if we would not have to assume that urllib3 is used and could just check some NetHSM exception types. The urllib3 exceptions could be wrapped in NetHSMError instances and set a special flag if it is an SSL error, or a new exception could be introduced for SSL errors.
The text was updated successfully, but these errors were encountered:
Currently, we have some awkward code in pynitrokey to dectect self-signed SSL certificates:
It would be nice if we would not have to assume that
urllib3
is used and could just check some NetHSM exception types. Theurllib3
exceptions could be wrapped inNetHSMError
instances and set a special flag if it is an SSL error, or a new exception could be introduced for SSL errors.The text was updated successfully, but these errors were encountered: