chromium/net/cert/x509_util_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/cert/x509_util.h"

#include <algorithm>
#include <memory>

#include "base/memory/raw_span.h"
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "crypto/rsa_private_key.h"
#include "crypto/signature_verifier.h"
#include "net/cert/x509_certificate.h"
#include "net/test/cert_test_util.h"
#include "net/test/key_util.h"
#include "net/test/test_data_directory.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/boringssl/src/include/openssl/evp.h"
#include "third_party/boringssl/src/include/openssl/rsa.h"

namespace net::x509_util {

// This test creates a self-signed cert and a private key and then verifies the
// content of the certificate.
TEST(X509UtilTest, CreateKeyAndSelfSigned) {}

// This test creates a self-signed cert from a private key and then verifies the
// content of the certificate.
TEST(X509UtilTest, CreateSelfSigned) {}

// This is a test case based on
// http://blogs.msdn.com/b/openspecification/archive/2013/03/26/ntlm-and-channel-binding-hash-aka-exteneded-protection-for-authentication.aspx
// There doesn't seem to be too many public test vectors for channel bindings.
TEST(X509UtilTest, CreateChannelBindings_SHA1) {}

TEST(X509UtilTest, CreateChannelBindings_SHA256) {}

TEST(X509UtilTest, CreateChannelBindings_SHA384) {}

TEST(X509UtilTest, CreateChannelBindings_SHA512) {}

TEST(X509UtilTest, CreateChannelBindings_Unsupported_MD4) {}

namespace {

bool DigestSign(EVP_PKEY* key,
                const EVP_MD* md,
                base::span<const uint8_t> data,
                bool is_pss,
                std::vector<uint8_t>* digest) {}

}  // namespace

TEST(X509UtilTest, SignatureVerifierInitWithCertificate) {}

TEST(X509UtilTest, HasRsaPkcs1Sha1Signature) {}

}  // namespace net::x509_util