#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/ssl/client_cert_store_nss.h"
#include <nss.h>
#include <ssl.h>
#include <algorithm>
#include <memory>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/task/thread_pool.h"
#include "base/threading/scoped_blocking_call.h"
#include "crypto/nss_crypto_module_delegate.h"
#include "crypto/nss_util.h"
#include "crypto/scoped_nss_types.h"
#include "net/cert/scoped_nss_types.h"
#include "net/cert/x509_util.h"
#include "net/cert/x509_util_nss.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "net/ssl/ssl_platform_key_nss.h"
#include "net/ssl/threaded_ssl_private_key.h"
#include "net/third_party/nss/ssl/cmpcert.h"
#include "third_party/boringssl/src/include/openssl/pool.h"
namespace net {
namespace {
class ClientCertIdentityNSS : public ClientCertIdentity { … };
}
ClientCertStoreNSS::ClientCertStoreNSS(
const PasswordDelegateFactory& password_delegate_factory)
: … { … }
ClientCertStoreNSS::~ClientCertStoreNSS() = default;
void ClientCertStoreNSS::GetClientCerts(
scoped_refptr<const SSLCertRequestInfo> request,
ClientCertListCallback callback) { … }
void ClientCertStoreNSS::OnClientCertsResponse(
ClientCertListCallback callback,
ClientCertIdentityList identities) { … }
void ClientCertStoreNSS::FilterCertsOnWorkerThread(
ClientCertIdentityList* identities,
const SSLCertRequestInfo& request) { … }
ClientCertIdentityList ClientCertStoreNSS::GetAndFilterCertsOnWorkerThread(
scoped_refptr<crypto::CryptoModuleBlockingPasswordDelegate>
password_delegate,
scoped_refptr<const SSLCertRequestInfo> request) { … }
void ClientCertStoreNSS::GetPlatformCertsOnWorkerThread(
scoped_refptr<crypto::CryptoModuleBlockingPasswordDelegate>
password_delegate,
const CertFilter& cert_filter,
ClientCertIdentityList* identities) { … }
}