Allow better cert principal patterns for AutoSelectCertificateForUrls policy

Allow the AutoSelectCertificateForUrls policy to match CommonName (C),
Locality (L), Organization (O), OrganizationUnit (OU) of the ISSUER and
SUBJECT of certificate candidates.

Move the certificate principal matching code used for ONC network policies
from //chromeos/network code to //components/certificate_matching and
reuse it for the AutoSelectCertificateForUrls policy and for the
existing ONC certificate matching.

Bug: 905994
Test: unit tests and browser tests
Change-Id: I12ba650741bcfa1a6c35e73443421fdf8fe2e38f
Commit-Queue: Pavol Marko <>
Reviewed-by: Ryan Sleevi <>
Reviewed-by: Cait Phillips <>
Reviewed-by: Alexander Hendrich <>
Reviewed-by: Steven Bennetts <>
Cr-Commit-Position: refs/heads/master@{#625319}
22 files changed