SSL: refactor ssl_cert_lookup_by_pkey() to work with provider side keys