A comprehensive testing application for OCSP (Online Certificate Status Protocol) servers with both GUI and monitoring capabilities. This tool runs structured tests against OCSP servers and provides detailed reporting with exportable results (JSON/CSV).
- Comprehensive OCSP Testing: Protocol compliance, security, performance, and status validation
- CRL Monitoring: Certificate Revocation List checking and validation
- GUI Interface: User-friendly Windows application with real-time monitoring
- Export Capabilities: Results exportable in JSON and CSV formats
- Certificate Validation: Supports PEM/DER certificate formats
- Advanced Testing: IKEv2 in-band OCSP, signed client requests, and more
- Trust Chain Building: Automatic OCSP signature verification with trust chain construction
- DHS CA4 Support: Enhanced handling of DHS CA4 OCSP signature verification issues
- Multi-Step OCSP Signer Validation: Comprehensive 3-step validation process for OCSP signatures
- Federal PKI Detection: Automatic detection and handling of federal PKI environments
- Batch Response Support: Handles federal PKI batch OCSP responses (DHS CA4, DoD, etc.)
Required Version: Git 2.0+
Purpose: Cloning the repository. Optional — you can instead download the
project as a ZIP from GitHub (Code → Download ZIP). Only needed if you prefer to
git clone or plan to contribute.
Installation Instructions:
Windows:
Git is not available on the Microsoft Store. The easiest way to install it on Windows is with Scoop.
# 1. Install Scoop (run once, in a normal PowerShell window)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
# 2. Install Git
scoop install git# Alternative: download the official installer from
# https://git-scm.com/download/win and run the setup wizard.
Linux (Ubuntu/Debian):
sudo apt update
sudo apt install gitLinux (CentOS/RHEL/Fedora):
# CentOS/RHEL
sudo yum install git
# Fedora
sudo dnf install gitmacOS:
# Using Homebrew
brew install git
# Or download from: https://git-scm.com/download/macVerification:
git --version
# Should show Git 2.0.0 or higherRequired Version: Python 3.10+ (tested with Python 3.13) Purpose: Runtime environment and package management
Installation Instructions:
Windows:
# Option 1: Microsoft Store (recommended - easiest)
# Search for "Python 3.10" or "Python 3.11" in Microsoft Store and install
# pip comes included with Python installation
# Option 2: Download from python.org
# Download from: https://www.python.org/downloads/
# Ensure "Add Python to PATH" is checked during installation
# pip comes included with Python installation
# Verify pip installation
python -m pip --versionLinux (Ubuntu/Debian):
sudo apt update
sudo apt install python3.10 python3.10-pip python3.10-venv
# Alternative: Install latest Python
sudo apt install python3 python3-pip python3-venvLinux (CentOS/RHEL/Fedora):
# CentOS/RHEL
sudo yum install python3.10 python3.10-pip
# Fedora
sudo dnf install python3 python3-pip
# If pip is not available, install it manually
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.pymacOS:
# Using Homebrew
brew install python@3.10
# pip comes included with Python
# Or download from: https://www.python.org/downloads/Verification:
python --version
# Should show Python 3.10.0 or higher
pip --version
# Should show pip version informationRequired Version: OpenSSL 1.1.1+ or OpenSSL 3.0+ Purpose: Used extensively for certificate operations, OCSP requests, and CRL processing
Installation Instructions:
Windows:
OpenSSL is not published on the Microsoft Store. Install it with Scoop (recommended) or the manual installer below.
# Recommended: using Scoop (see the Git section above to install Scoop first)
scoop install openssl# Alternative: manual installer
# Download from: https://slproweb.com/products/Win32OpenSSL.html
# Add its bin directory to PATH (e.g., C:\OpenSSL-Win64\bin).
# Note: the slproweb builds require the Microsoft Visual C++ Redistributable
# (https://aka.ms/vs/17/release/vc_redist.x64.exe). The "Light" builds do not
# bundle it, so install it if you see a "VCRUNTIME140.dll is missing" error.
Linux (Ubuntu/Debian):
sudo apt update
sudo apt install opensslLinux (CentOS/RHEL/Fedora):
# CentOS/RHEL
sudo yum install openssl
# Fedora
sudo dnf install opensslmacOS:
# Using Homebrew
brew install openssl
# Using MacPorts
sudo port install opensslVerification:
openssl version
# Should show OpenSSL 1.1.1+ or 3.0+- tkinter: Included with Python standard library
- No additional setup required
- Optional: Windows Terminal (Microsoft Store) for enhanced command-line experience
- tkinter: May need separate installation
# Ubuntu/Debian
sudo apt install python3-tk
# CentOS/RHEL/Fedora
sudo yum install tkinter- tkinter: Included with Python standard library
- No additional setup required
1. Install Scoop, Git, and OpenSSL. Open a normal (non-Administrator) PowerShell window and run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop install git openssl2. Install Python from the Microsoft Store (search for "Python 3.10" or newer — pip and tkinter are included).
3. Download the project. On the repository page, click Code → Download ZIP, then extract the ZIP file.
4. Open the folder in a terminal. Open the extracted OCSPTesting folder,
right-click an empty space inside it, and choose Open in Terminal.
5. Create the virtual environment, install dependencies, and run:
python -m venv venv
venv\Scripts\activate.bat
pip install -r requirements.txt
python app.pyTip: Open a fresh terminal after installing Scoop/Git/OpenSSL/Python so the new tools are on your
PATH. Using PowerShell instead of Command Prompt for step 5? Activate the virtual environment withvenv\Scripts\Activate.ps1.
Before installing the OCSP Testing Tool, ensure you have installed:
- Python 3.10+ with pip (required — for running the application)
- OpenSSL (required — for certificate operations)
- Git (optional — only if you'd rather
git clonethan download the ZIP)
💡 Windows Users: OpenSSL is not on the Microsoft Store — install it with Scoop: scoop install openssl (see the Quick Setup Guide below to install Scoop first). Install Python from the Microsoft Store (pip and tkinter are included). Git is optional; if you want it, it's also Scoop-only (not on the Store): scoop install git. For the best command-line experience, also consider installing Windows Terminal from the Microsoft Store.
See the System Requirements section above for detailed installation instructions.
git clone <repository-url>
cd OCSPTesting# Windows
python -m venv venv
venv\Scripts\activate
# Linux/macOS
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txt# Check Git installation
git --version
# Check Python and pip installation
python --version
pip --version
# Check Python dependencies
python -c "import cryptography, requests, asn1crypto; print('All dependencies installed successfully')"
# Check OpenSSL availability
openssl versionpython app.py# Planned for future releases
python -m ocsp_tester.cli --ocsp-url <URL> --issuer <cert-file>- OCSP URL: The endpoint to test (e.g.,
http://host/ocsp) - Issuer CA Certificate: PEM or DER format certificate file
- Known Good Certificate: For positive test cases
- Known Revoked Certificate: For negative test cases
- Unknown CA Certificate: For cross-CA testing
- Client Signing Certificate/Key: For signed request tests
- Basic OCSP request/response validation
- Certificate ID matching
- Response format compliance
- Signature verification
- Nonce handling
- Request signing validation
- Latency measurement
- Load testing capabilities
- Concurrent request handling
- Good certificate validation
- Revoked certificate detection
- Unknown certificate handling
- CRL download and parsing
- Certificate revocation checking
- CRL signature validation
- Complete test results with timestamps
- Detailed error information
- Test configuration details
- Tabular format for spreadsheet analysis
- Summary statistics
- Easy filtering and sorting
# Windows: Run Command Prompt as Administrator
# Right-click Command Prompt → "Run as administrator"
# Or change to a user-writable directory
cd C:\Users\%USERNAME%\Documents
mkdir OCSPTesting
cd OCSPTesting
# Then clone/copy the application files here
# Linux/macOS: Use proper permissions
sudo chown -R $USER:$USER /path/to/OCSPTesting
chmod 755 /path/to/OCSPTesting# Windows: Avoid running from system directories
# Don't run from C:\WINDOWS\system32
# Instead, use:
cd C:\Users\%USERNAME%\Documents
# or
cd C:\OCSPTesting
# Linux/macOS: Use home directory
cd ~/OCSPTesting
# or
cd /opt/OCSPTesting# Windows: Git is NOT on the Microsoft Store.
# Install with Scoop: scoop install git
# Or download the official installer: https://git-scm.com/download/win
# Linux (Ubuntu/Debian): sudo apt install git
# Linux (CentOS/RHEL): sudo yum install git
# macOS: brew install git# Windows: Install from Microsoft Store (recommended)
# Search for "Python 3.10" or "Python 3.11" in Microsoft Store
# Or download from: https://www.python.org/downloads/
# Ensure "Add Python to PATH" is checked during installation
# Linux (Ubuntu/Debian): sudo apt install python3 python3-pip
# Linux (CentOS/RHEL): sudo yum install python3 python3-pip
# macOS: brew install python@3.10
# Verify pip installation
python -m pip --version# Windows: OpenSSL is NOT on the Microsoft Store.
# Install with Scoop: scoop install openssl
# Or download the manual installer (requires the Microsoft Visual C++
# Redistributable): https://slproweb.com/products/Win32OpenSSL.html
# Or add an existing OpenSSL to PATH: set PATH=%PATH%;C:\OpenSSL-Win64\bin
# Linux/macOS: Install OpenSSL
sudo apt install openssl # Ubuntu/Debian
brew install openssl # macOS# Check if OpenSSL is installed but not in PATH
where openssl
# If not found, add to PATH:
# Method 1: Add to system PATH permanently
# 1. Open System Properties → Advanced → Environment Variables
# 2. Add C:\OpenSSL-Win64\bin to PATH variable
# 3. Restart Command Prompt
# Method 2: Add to PATH for current session
set PATH=%PATH%;C:\OpenSSL-Win64\bin
# Method 3: Using Scoop (recommended)
scoop install openssl
# This automatically adds OpenSSL to PATH
# Verify OpenSSL installation
openssl version
# Should show OpenSSL 1.1.1+ or 3.0+Step-by-step guide to fix PATH and TEMP issues:
-
Open Environment Variables Dialog:
- Press
Win + R, typesysdm.cpl, press Enter - Click "Advanced" tab → "Environment Variables" button
- Or: Right-click "This PC" → Properties → Advanced system settings → Environment Variables
- Press
-
Add OpenSSL to System PATH:
- In "System variables" section, find "Path" variable
- Click "Edit..." button
- Click "New" button
- Add:
C:\OpenSSL-Win64\bin(adjust path if different) - Click "OK" to save
-
Verify TEMP Variables (User Variables):
- In "User variables" section, check:
- TEMP: Should be
C:\Users\[YourUsername]\AppData\Local\Temp - TMP: Should be
C:\Users\[YourUsername]\AppData\Local\Temp
- TEMP: Should be
- If missing, click "New..." and add them
- In "User variables" section, check:
-
Restart Command Prompt:
- Close all Command Prompt/PowerShell windows
- Open new Command Prompt
- Test:
openssl version
Visual Guide:
- User variables: Shows your personal settings (TEMP, TMP, OneDrive)
- System variables: Shows system-wide settings (PATH, ComSpec, OS)
- Path variable: Contains directories where Windows looks for executables
- TEMP/TMP variables: Tell applications where to create temporary files
# Error: [Errno 2] No such file or directory: '/tmp/test_issuer.pem'
# This indicates temporary file creation issues
# Windows: Check TEMP environment variable
echo %TEMP%
# Should show a writable directory like C:\Users\Username\AppData\Local\Temp
# Linux/macOS: Check TMPDIR
echo $TMPDIR
# Should show /tmp or similar
# Fix: Ensure temp directory is writable
# Windows:
mkdir C:\temp
set TEMP=C:\temp
set TMP=C:\temp
# Linux/macOS:
sudo chmod 777 /tmp
# or
export TMPDIR=/home/$USER/tmp
mkdir -p $TMPDIRsudo apt install python3-tk # Ubuntu/Debian
sudo yum install tkinter # CentOS/RHEL- Run Command Prompt as Administrator
- Ensure OpenSSL is in system PATH
# Check Git installation
git --version
# Check Python and pip installation
python --version
pip --version
# Check all Python dependencies
python -c "
import sys
print(f'Python: {sys.version}')
try:
import cryptography
print(f'cryptography: {cryptography.__version__}')
except ImportError as e:
print(f'cryptography: {e}')
try:
import requests
print(f'requests: {requests.__version__}')
except ImportError as e:
print(f'requests: {e}')
try:
import asn1crypto
print(f'asn1crypto: {asn1crypto.__version__}')
except ImportError as e:
print(f'asn1crypto: {e}')
"
# Check OpenSSL installation
openssl versionTEMP: Directory for temporary files (Windows)TMPDIR: Directory for temporary files (Linux/macOS)
- Ensure firewall allows HTTP/HTTPS connections to OCSP servers
- Proxy settings may need to be configured for corporate networks
Error saving config: [Errno 13] Permission denied: 'ocsp_config.json'
Working directory: C:\WINDOWS\system32
Solution: Run from user directory, not system directory
[WinError 2] The system cannot find the file specified
[CMD] openssl ocsp -issuer...
Solution: Install OpenSSL and add to PATH
[Errno 2] No such file or directory: '/tmp/test_issuer.pem'
Solution: Check TEMP environment variable and permissions
No CRL Distribution Points found in certificate
Solution: This is normal for certificates without CRL URLs
[WinError 2] The system cannot find the file specified
Error saving config: [Errno 13] Permission denied
Solution: Use Environment Variables dialog to fix PATH and TEMP settings
Response Verify Failure
unable to get local issuer certificate
Solution: Enhanced trust chain building automatically handles this issue
The OCSP Testing Tool now includes enhanced support for DHS CA4 OCSP servers that commonly encounter signature verification issues due to incomplete trust chains.
Error: unable to get local issuer certificate
Cause: OCSP responders use separate signing certificates that aren't included in the basic issuer certificate chain
Solution: Automatic trust chain building from OCSP response certificates
- Initial Request: Makes unverified OCSP request to extract certificates
- Certificate Extraction: Parses OCSP response to find embedded certificates
- Trust Bundle Creation: Combines issuer certificate with OCSP response certificates
- Enhanced Verification: Uses complete trust bundle for signature verification
- Fallback Handling: Provides detailed logging when verification still fails
- ✅ Automatic Resolution: No manual certificate bundle creation required
- ✅ Federal PKI Support: Handles DHS CA4, DoD, and other federal PKI environments
- ✅ Detailed Logging: Clear feedback about trust chain building process
- ✅ Graceful Degradation: Still provides certificate status even if signature verification fails
- ✅ Security Awareness: Maintains security warnings when verification fails
Run the DHS CA4 test script to verify the enhancement:
python test_dhs_ca4_trust_chain.pyThe OCSP Testing Tool implements a comprehensive multi-step validation process for OCSP signatures that addresses the specific requirements for validating OCSP signer certificates.
- Purpose: Extract the certificate used to sign the OCSP response
- Process: Parses OCSP response to find embedded certificates
- Capability: Handles multiple certificates in response, can target specific serial numbers
- Output: PEM-formatted signer certificate
- Purpose: Verify the OCSP signer certificate is trusted by the provided issuer
- Validation Methods:
- Direct Issuer: Signer is directly issued by the provided issuer certificate
- Self-Signed: Signer is the same as the issuer certificate (self-signed OCSP)
- OCSP Signing EKU: Signer has Extended Key Usage for OCSP Signing (1.3.6.1.5.5.7.3.9)
- Output: Trust validation results with detailed relationship information
- Purpose: Verify the OCSP response signature using the extracted signer certificate
- Process: Uses OpenSSL to perform cryptographic signature validation
- Method: Creates temporary files and uses
openssl ocsp -respin -verify_other -noverify - Output: Signature validation results with success/failure status
- ✅ Comprehensive Validation: Complete end-to-end OCSP signature verification
- ✅ Detailed Logging: Step-by-step progress reporting with
[OCSP-SIGNER-VALIDATION]prefix - ✅ Error Handling: Graceful failure handling with detailed error messages
- ✅ Serial Number Targeting: Can extract specific certificates by serial number
- ✅ Multiple Trust Methods: Supports various OCSP signing scenarios
- ✅ Security Awareness: Maintains security warnings and compliance issues
Run the multi-step validation test script:
python test_ocsp_signer_validation.py| Variable | Purpose | Expected Value | Location |
|---|---|---|---|
| PATH | Find executables (OpenSSL, Python) | C:\OpenSSL-Win64\bin;C:\Python310\Scripts;... |
System variables |
| TEMP | Temporary file location | C:\Users\[Username]\AppData\Local\Temp |
User variables |
| TMP | Alternative temp location | C:\Users\[Username]\AppData\Local\Temp |
User variables |
| PYTHONPATH | Python module search path | C:\OCSPTesting (if needed) |
User variables |
# Add these to System PATH variable:
C:\OpenSSL-Win64\bin # OpenSSL executable
C:\Python310\Scripts # Python scripts (pip, etc.)
C:\Python310 # Python executable
C:\Program Files\Git\bin # Git commands# Check if variables are set correctly:
echo %PATH%
echo %TEMP%
echo %TMP%
where openssl
where python
where gitFor issues and questions:
- Check this README for common solutions
- Verify all dependencies are properly installed
- Check system logs for detailed error messages
- Ensure OpenSSL and Python are in your system PATH
- Run from a user-writable directory (not system directories)
MIT License
Copyright (c) 2025 OCSP Testing Tool
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

