proxygen
OpenSSLKeyUtils.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
11 #include <folly/Range.h>
12 #include <folly/io/IOBuf.h>
14 
15 namespace fizz {
16 namespace detail {
17 
22 void validateECKey(const folly::ssl::EvpPkeyUniquePtr& key, int curveNid);
23 
29 
36  int curveNid);
37 
42 std::unique_ptr<folly::IOBuf> encodeECPublicKey(
43  const folly::ssl::EvpPkeyUniquePtr& key);
44 
45 std::unique_ptr<folly::IOBuf> encodeECPublicKey(
46  const folly::ssl::EcKeyUniquePtr& ecKey);
47 
52 std::unique_ptr<folly::IOBuf> generateEvpSharedSecret(
54  const folly::ssl::EvpPkeyUniquePtr& peerKey);
55 
60 } // namespace detail
61 } // namespace fizz
std::unique_ptr< EVP_PKEY, EvpPkeyDeleter > EvpPkeyUniquePtr
folly::ssl::EvpPkeyUniquePtr decodeECPublicKey(folly::ByteRange range, int curveNid)
Gen range(Value begin, Value end)
Definition: Base.h:467
std::unique_ptr< EC_KEY, EcKeyDeleter > EcKeyUniquePtr
void validateECKey(const folly::ssl::EvpPkeyUniquePtr &key, int curveNid)
Definition: Actions.h:16
std::string getOpenSSLError()
std::unique_ptr< folly::IOBuf > generateEvpSharedSecret(const folly::ssl::EvpPkeyUniquePtr &key, const folly::ssl::EvpPkeyUniquePtr &peerKey)
const char * string
Definition: Conv.cpp:212
std::unique_ptr< folly::IOBuf > encodeECPublicKey(const folly::ssl::EvpPkeyUniquePtr &key)
folly::ssl::EvpPkeyUniquePtr generateECKeyPair(int curveNid)