chromium/third_party/webrtc/rtc_base/openssl_key_pair.cc

/*
 *  Copyright 2004 The WebRTC Project Authors. All rights reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "rtc_base/openssl_key_pair.h"

#include <memory>
#include <utility>

#include "absl/strings/string_view.h"

#if defined(WEBRTC_WIN)
// Must be included first before openssl headers.
#include "rtc_base/win32.h"  // NOLINT
#endif                       // WEBRTC_WIN

#include <openssl/bio.h>
#include <openssl/bn.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>

#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/openssl.h"
#include "rtc_base/openssl_utility.h"

namespace rtc {

// We could have exposed a myriad of parameters for the crypto stuff,
// but keeping it simple seems best.

// Generate a key pair. Caller is responsible for freeing the returned object.
static EVP_PKEY* MakeKey(const KeyParams& key_params) {}

std::unique_ptr<OpenSSLKeyPair> OpenSSLKeyPair::Generate(
    const KeyParams& key_params) {}

std::unique_ptr<OpenSSLKeyPair> OpenSSLKeyPair::FromPrivateKeyPEMString(
    absl::string_view pem_string) {}

OpenSSLKeyPair::~OpenSSLKeyPair() {}

std::unique_ptr<OpenSSLKeyPair> OpenSSLKeyPair::Clone() {}

void OpenSSLKeyPair::AddReference() {}

std::string OpenSSLKeyPair::PrivateKeyToPEMString() const {}

std::string OpenSSLKeyPair::PublicKeyToPEMString() const {}

bool OpenSSLKeyPair::operator==(const OpenSSLKeyPair& other) const {}

bool OpenSSLKeyPair::operator!=(const OpenSSLKeyPair& other) const {}

}  // namespace rtc