ssl - Multiple certificates in TLS handshake "certificate" message -


my task parse server name https messages . have been asked parse "client hello" extensions , "certicate", "commonname" field .

there multiple certificates in "certificate" message . example when open google https , listen via wireshark see 2 certificates first has commonname "*.google.com" , second has commonname "google internet authority" . first 1 server name connected second 1 authority signed certificate .

my question can sure server name(google.com in case) in first certificate message . need care other certificates in certificate message if want servername .

in fact, rfc 2246, 4346 , 5246 (respectively tls 1.0, tls 1.1 , tls 1.2) state server certificate should first 1 :

"this sequence (chain) of x.509v3 certificates. sender's certificate must come first in list. each following certificate must directly certify 1 preceding it."

it clear in ssl 3.0 :

" certificate_list: sequence (chain) of x.509.v3
certificates, ordered sender's certificate first followed
certificate authority certificates proceeding sequentially
upward."

but in real world, there lot of misconfigured servers sending certificates in whatever order, have reorder them, sorry.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -