Closed HJianBo closed 3 months ago
I don't think proxy protocol v2 supports DN (Subject) at all. below are all the supported subtypes:
#define PP2_SUBTYPE_SSL_VERSION 0x21
#define PP2_SUBTYPE_SSL_CN 0x22
#define PP2_SUBTYPE_SSL_CIPHER 0x23
#define PP2_SUBTYPE_SSL_SIG_ALG 0x24
#define PP2_SUBTYPE_SSL_KEY_ALG 0x25
ref: https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
The https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt has not supported the cert Subject Name, but we supported it with Common Name :cry: https://github.com/emqx/esockd/blob/26fffb6caad8f9c9ad6fecc6ac9db232150af39f/src/esockd_peercert.erl#L26-L32
This issue was found while investigating https://github.com/emqx/emqx/issues/9147