// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_SSL_CLIENT_CERT_IDENTITY_H_ #define NET_SSL_CLIENT_CERT_IDENTITY_H_ #include "base/functional/callback.h" #include "base/time/time.h" #include "net/base/net_export.h" #include "net/cert/x509_certificate.h" namespace base { class Time; } namespace net { class SSLPrivateKey; // Represents a client certificate and a promise to retrieve the associated // private key. class NET_EXPORT ClientCertIdentity { … }; // Comparator for use in STL algorithms that will sort client certificates by // order of preference. // Returns true if |a| is more preferable than |b|, allowing it to be used // with any algorithm that compares according to strict weak ordering. // // Criteria include: // - Prefer certificates that have a longer validity period (later // expiration dates) // - If equal, prefer certificates that were issued more recently // - If equal, prefer shorter chains (if available) class NET_EXPORT_PRIVATE ClientCertIdentitySorter { … }; ClientCertIdentityList; } // namespace net #endif // NET_SSL_CLIENT_CERT_IDENTITY_H_