… | |
… | |
1914 | ) { |
1914 | ) { |
1915 | return if 3 != length $1; # partial match, can't decide yet |
1915 | return if 3 != length $1; # partial match, can't decide yet |
1916 | |
1916 | |
1917 | # full match, valid TLS record |
1917 | # full match, valid TLS record |
1918 | my ($major, $minor) = unpack "CC", $1; |
1918 | my ($major, $minor) = unpack "CC", $1; |
1919 | $cb->($self, "accept", $major + $minor * 0.1); |
1919 | $cb->($self, "accept", $major, $minor); |
1920 | } else { |
1920 | } else { |
1921 | # mismatch == guaranteed not TLS |
1921 | # mismatch == guaranteed not TLS |
1922 | $cb->($self, undef); |
1922 | $cb->($self, undef); |
1923 | } |
1923 | } |
1924 | |
1924 | |