-
Notifications
You must be signed in to change notification settings - Fork 156
/
CertUtils-inl.h
42 lines (35 loc) · 1.07 KB
/
CertUtils-inl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
namespace fizz {
namespace openssl {
namespace detail {
folly::Optional<std::string> getIdentityFromX509(X509* x);
}
template <>
inline std::vector<SignatureScheme> CertUtils::getSigSchemes<KeyType::P256>() {
return {SignatureScheme::ecdsa_secp256r1_sha256};
}
template <>
inline std::vector<SignatureScheme> CertUtils::getSigSchemes<KeyType::P384>() {
return {SignatureScheme::ecdsa_secp384r1_sha384};
}
template <>
inline std::vector<SignatureScheme> CertUtils::getSigSchemes<KeyType::P521>() {
return {SignatureScheme::ecdsa_secp521r1_sha512};
}
template <>
inline std::vector<SignatureScheme> CertUtils::getSigSchemes<KeyType::RSA>() {
return {SignatureScheme::rsa_pss_sha256};
}
template <>
inline std::vector<SignatureScheme>
CertUtils::getSigSchemes<KeyType::ED25519>() {
return {SignatureScheme::ed25519};
}
} // namespace openssl
} // namespace fizz