forked from NeuronInnovations/neuron-node-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-p12-password.bat
More file actions
42 lines (37 loc) · 1.15 KB
/
Copy pathtest-p12-password.bat
File metadata and controls
42 lines (37 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@echo off
echo === Testing P12 Password ===
REM Replace these with your actual values
set P12_FILE=path\to\your\certificate.p12
set P12_PASSWORD=your_actual_password
echo Testing P12 file: %P12_FILE%
echo Password: %P12_PASSWORD%
REM Test 1: Check if p12 file exists
if not exist "%P12_FILE%" (
echo ❌ P12 file not found: %P12_FILE%
echo Please update P12_FILE variable in this script
pause
exit /b 1
)
REM Test 2: Validate p12 with openssl (same as GitHub Actions)
echo.
echo Testing p12 file validity with openssl...
openssl pkcs12 -info -in "%P12_FILE%" -noout -passin pass:"%P12_PASSWORD%" 2>nul
set OPENSSL_RESULT=%errorlevel%
if %OPENSSL_RESULT% equ 0 (
echo ✅ P12 file is valid and password is correct (openssl)
echo.
echo ✅ Password test passed!
echo This means your p12 file and password should work in GitHub Actions
) else (
echo ❌ P12 file is invalid or password is incorrect (openssl)
echo.
echo Debug info:
echo - File exists: %P12_FILE%
echo - File size:
dir "%P12_FILE%" | find "bytes"
echo.
echo Try running: openssl pkcs12 -info -in "%P12_FILE%" -noout
pause
exit /b 1
)
pause