rapiz1 / rathole

A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
Apache License 2.0
8.8k stars 440 forks source link

Potential compatibility issue of PKCS#12 format #339

Open sunmy2019 opened 4 months ago

sunmy2019 commented 4 months ago

PKCS#12 format required by openssl 1.1.1 and openssl 3.0 (PKCS12_parse) is different. https://github.com/openssl/openssl/issues/6698


Format 1: openssl 1.1 required: CN = Leaf CN = Root CN = CA #2 CN = CA #1


Format 2: openssl 3.0 required: CN = Leaf CN = CA #1 CN = CA #2 CN = Root


This causes compatibility issues in rust-native-rls. https://github.com/sfackler/rust-native-tls/issues/281

rust-native-tls officially supports Format 2, when used with openssl 1.1. And in practice, it also supports Format 1, when used with openssl 3.0.


Luckily, in our use cases, we only have Leaf and Root. Format 1 and Format 2 are the same. Our users are less likely to be affected.

This is a kind note for users with compatibility issues for PKCS#12.