When would one use the --cacert
option vs. the --capath
option within curl
(CLI that is).
--cacert
appears to refer
On Windows you can run the following as a batch file and pass in the capath folder name:
c_rehash.cmd:
@echo off
setlocal enableextensions enabledelayedexpansion
if \%1\ EQU \\ goto :usage
pushd %1
if NOT ERRORLEVEL 0 goto :usage
del *.0
for %%I in (*.pem) do call :hash %%I
popd
goto :eof
:hash
for /F "usebackq" %%J in (`openssl x509 -in %1 -hash -noout`) do mklink %%J.0 %1
goto :eof
:usage
echo Usage:
echo.
echo Rehash a folder of x509 Certificates for Curl
echo.
echo %~n0 ^
Example:
c_rehash c:\cacerts