Worked example: the car rejects the charger certificate
The tls-fail demo read step by step: a TLS 1.2 handshake that ends 100 ms after the connection opens with the alert unknown_ca, why the verdict names the car while the fix is on the charger, and how to check a chain against what the car trusts.
The capture
- Load the demo TLS unknown_ca (tls-fail). It holds seven events in 0.16 s: the SDP request and answer, the TCP handshake, a TLS alert and the two FINs that close the connection.
- There is no SLAC in the file: the recording starts at SDP, as a capture on the IP side of a modem does.
- Verdict: Never charged, TLS failure, likely party EV, confidence high. The explanation: the TLS handshake ended with the alert unknown_ca at 0.1 s.
- Stage strip: SDP passed, TCP / TLS failed. The app handshake and everything after it are not in the capture, because no V2G message was ever sent.
Message by message
- EV: SDP request, 0.000 s: security TLS, transport TCP
- EVSE: SDP response, 0.020 s: [fe80::2]:64109, TLS
- EV: TCP SYN, 0.030 s
- EVSE: TCP SYN-ACK, 0.040 s
- EV: ClientHello, TLS 1.2, one cipher suite: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256; groups secp256r1 and secp521r1
- EVSE: ServerHello, TLS 1.2 with that suite
- EVSE: Certificate, one certificate
- EVSE: ServerKeyExchange
- EVSE: ServerHelloDone
- EV: Alert unknown_ca (48), fatal, 0.140 s
- both: TCP connection closed, FIN from the car at 0.150 s, from the charger at 0.160 s
Discovery, TCP and the TLS parameters are all in order. SD-01 to SD-06 and TC-01 pass; TL-02 accepts TLS 1.2 for ISO 15118-2; TL-03 finds the suite in the ISO 15118-2 list; TL-07 finds no CertificateRequest, as ISO 15118-2 expects. The car read the whole first flight of the charger and refused it.
The certificate
| Field | In the demo |
|---|---|
| Subject | CN=SECC untrusted demo, O=V2G Session Analyzer demo |
| Issuer | The same as the subject: the certificate is self-issued |
| Chain | This one certificate: no sub-CA and no path to any root |
| Key and signature | secp256r1, ecdsa-with-SHA256 |
| Size | 478 bytes |
| Validity | 2026-09-28 to 2036-09-25; the session is an hour after its start |
PK-01 passes, because the certificate is valid at the time of the capture, and PK-02 passes, because its dates, extensions and size are well formed. Neither check knows which roots the car holds, so neither can see the actual fault: a certificate that leads to no V2G root at all.
Confirming the cause
- unknown_ca means the car could not build a path from the certificate it got to a trust anchor it holds. An alert names what its sender rejected, so the thing to fix is often on the other side: here, the certificate of the charger.
- The verdict names the car because the car sent the alert. Read that as the car stopped here, not as the car is broken.
- Compare the issuer of the top certificate with the V2G roots installed in the car. Here the top certificate is its own issuer, and no car holds a self-made charger certificate as a V2G root.
- Rule out the car: a second car of the same PKI (test or production) fails the same way, and a charger certificate from that PKI works with the first car.
- Rule out the clocks: an expired or not yet valid certificate gives certificate_expired or bad_certificate rather than unknown_ca, and PK-01 passes here anyway.
What a fix looks like
- Give the charger a SECC certificate issued under a CPO sub-CA chain that ends in the V2G root the car trusts, and send the leaf with its sub-CAs, without the root. Plug and Charge and its PKI shows the hierarchy.
- On a bench, use the same PKI on both sides: the test V2G root in the car for a charger with a test certificate. A production car does not trust a test root, and the other way round.
- After the fix the handshake completes and application data follows. Without the key log the verdict is then Encrypted, not decrypted, which is not a failure; load the key log to read the session.
In TLS 1.3, as ISO 15118-20 uses it, the certificate travels encrypted and an alert sent after the ServerHello is encrypted too. The same fault then shows only as a car that closes the connection after the charger's first flight, until you load the key log. The TLS handshake fails lists the other alerts.
Sources
- RFC 5246, TLS 1.2, the alert unknown_ca
- ISO 15118-2:2014, clause 8.5.2
- SPEC.md of this tool, FR-ENC-05, the failing demo sessions