
Mutation testing on X.509 Certificate Validation IN OpenSSL v.1.1.1h, based on CVE-2021-3450.
This repository implements a specification-driven mutation testing experiment targeting X.509 certificate validation behavior in OpenSSL.
The experiment is based on the mutation operator:
MUT-BC-SS-01
which modifies the BasicConstraints extension:
CA:TRUE → CA:FALSE
The objective is to evaluate whether certificate validation correctly enforces RFC 5280 requirements and to investigate behavior related to the vulnerability class represented by CVE-2021-3450.
MUT-BC-SS-01/
│
│
├── configs/
│ ├── ca.cnf
│ └── leaf.cnf
│
├── src/
│ └── poc.c
| └── poc_fixed.c
│
├── check_prerequisites.sh
├── install_openssl111h.sh
├── environment.sh
├── generate_certs.sh
├── build.sh
├── run.sh
├── build_version3.sh
├── run_version3.sh
│
│
└── README.md
The experiment creates the following certificate chain:
Root CA (CA:TRUE)
│
▼
Mutant Intermediate (CA:FALSE)
│
▼
Subleaf Certificate
The mutant certificate is intentionally configured with:
basicConstraints = CA:FALSE
while still being used to sign another certificate.
The validation harness evaluates whether OpenSSL correctly rejects this invalid chain.
The experiment was tested on Linux systems using:
git clone https://github.com/dedellix/MUT-BC-SS-01.git
cd MUT-BC-SS-01
chmod +x *.sh
./check_prerequisites.sh
This script checks for required packages and installs any missing dependencies automatically.
Required packages include:
./install_openssl111h.sh
This downloads, builds, and installs OpenSSL 1.1.1h locally under:
$HOME/openssl-1.1.1h-install
No system OpenSSL files are modified.
./environment.sh
This configures:
LD_LIBRARY_PATH
and verifies that the correct OpenSSL libraries are loaded.
./generate_certs.sh
This generates:
and stores them in:
certs/
./build.sh
./build_version3.sh
This compiles:
src/poc.c
and produces:
./poc
in the project root directory.
./run.sh
./run_version3.sh
or directly:
./poc
To completely remove generated artifacts:
rm -rf certs
rm -f poc
To remove the local OpenSSL installation:
rm -rf $HOME/openssl-1.1.1h-install
rm -rf tls-test
To clear environment variables:
unset LD_LIBRARY_PATH
unset OPENSSL111H