0
Files
src/net/ssl/openssl_private_key.h
Sebastien Lalancette 124acb26bf Move OpenSSLPrivateKey Out of Test Utilities
This class can be used to wrap a EVP_PKEY held in a crypto::ECPrivateKey
into a SSLPrivateKey instance.

Also use this new utility in the client_certificates::SSLKeyConverter.

Bug: b:330750994
Change-Id: I05590daca069ba027c0bb78b8698c4e6e5cebeb2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5435514
Commit-Queue: Sébastien Lalancette <seblalancette@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1287656}
2024-04-15 21:49:54 +00:00

23 lines
630 B
C++

// Copyright 2024 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_OPENSSL_PRIVATE_KEY_H_
#define NET_SSL_OPENSSL_PRIVATE_KEY_H_
#include "base/memory/scoped_refptr.h"
#include "net/base/net_export.h"
#include "third_party/boringssl/src/include/openssl/base.h"
namespace net {
class SSLPrivateKey;
// Returns a new SSLPrivateKey which uses `key` for signing operations.
NET_EXPORT scoped_refptr<SSLPrivateKey> WrapOpenSSLPrivateKey(
bssl::UniquePtr<EVP_PKEY> key);
} // namespace net
#endif // NET_SSL_OPENSSL_PRIVATE_KEY_H_