Enhanced logic for setting SSL_CERT_FILE and REQUESTS_CA_BUNDLE
This commit is contained in:
parent
ae8dd3841a
commit
5df352de06
1 changed files with 11 additions and 13 deletions
|
@ -152,12 +152,6 @@ fi
|
||||||
# BW_CLIENTID client_id
|
# BW_CLIENTID client_id
|
||||||
# BW_CLIENTSECRET
|
# BW_CLIENTSECRET
|
||||||
|
|
||||||
### CA Certificate
|
|
||||||
# Used by Python, cURL, and other tools
|
|
||||||
export CERT_PATH="$HOME/.local/etc/ssl/curl/cacert.pem"
|
|
||||||
export SSL_CERT_FILE="$CERT_PATH"
|
|
||||||
export REQUESTS_CA_BUNDLE="$CERT_PATH"
|
|
||||||
|
|
||||||
### Cheat
|
### Cheat
|
||||||
if command -v fzf > /dev/null; then
|
if command -v fzf > /dev/null; then
|
||||||
export CHEAT_USE_FZF=true
|
export CHEAT_USE_FZF=true
|
||||||
|
@ -358,13 +352,17 @@ export PATH="$PATH:$PNPM_HOME"
|
||||||
# Specify location of the default Prettierd configuration
|
# Specify location of the default Prettierd configuration
|
||||||
# export PRETTIERD_DEFAULT_CONFIG=""
|
# export PRETTIERD_DEFAULT_CONFIG=""
|
||||||
|
|
||||||
### Python
|
### Python / CA Certificate
|
||||||
# Replaced by certificate retrieved from the cURL website
|
# Used by Python, cURL, and other tools
|
||||||
# if command -v python3 > /dev/null; then
|
if [ -f "$HOME/.local/etc/ssl/curl/cacert.pem" ]; then
|
||||||
# export CERT_PATH="$(python3 -m certifi)"
|
export CERT_PATH="$HOME/.local/etc/ssl/curl/cacert.pem"
|
||||||
# export SSL_CERT_FILE="$CERT_PATH"
|
export SSL_CERT_FILE="$CERT_PATH"
|
||||||
# export REQUESTS_CA_BUNDLE="$CERT_PATH"
|
export REQUESTS_CA_BUNDLE="$CERT_PATH"
|
||||||
# fi
|
elif command -v python3 > /dev/null; then
|
||||||
|
export CERT_PATH="$(python3 -m certifi)" || export CERT_PATH="$(python -m certifi)"
|
||||||
|
export SSL_CERT_FILE="$CERT_PATH"
|
||||||
|
export REQUESTS_CA_BUNDLE="$CERT_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
### Readline
|
### Readline
|
||||||
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/readline/inputrc"
|
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/readline/inputrc"
|
||||||
|
|
Loading…
Reference in a new issue