folly/folly/ssl/OpenSSLCertUtils.cpp

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <folly/ssl/OpenSSLCertUtils.h>

#include <folly/FileUtil.h>
#include <folly/ScopeGuard.h>
#include <folly/String.h>
#include <folly/ssl/OpenSSLPtrTypes.h>

namespace folly {
namespace ssl {

namespace {
std::string getOpenSSLErrorString(unsigned long err) {}

std::string asn1ToString(ASN1_STRING* a) {}

std::string getExtOid(X509_EXTENSION* extension) {}

std::string getExtData(X509_EXTENSION* extension) {}

} // namespace

Optional<std::string> OpenSSLCertUtils::getCommonName(X509& x509) {}

std::vector<std::string> OpenSSLCertUtils::getSubjectAltNames(X509& x509) {}

Optional<std::string> OpenSSLCertUtils::getSubject(X509& x509) {}

Optional<std::string> OpenSSLCertUtils::getIssuer(X509& x509) {}

std::vector<std::string> OpenSSLCertUtils::getExtension(
    X509& x509, folly::StringPiece oid) {}

std::vector<std::pair<std::string, std::string>>
OpenSSLCertUtils::getAllExtensions(X509& x509) {}

folly::Optional<std::string> OpenSSLCertUtils::toString(X509& x509) {}

std::string OpenSSLCertUtils::getNotAfterTime(X509& x509) {}

std::string OpenSSLCertUtils::getNotBeforeTime(X509& x509) {}

std::chrono::system_clock::time_point OpenSSLCertUtils::asnTimeToTimepoint(
    const ASN1_TIME* asnTime) {}

std::string OpenSSLCertUtils::getDateTimeStr(const ASN1_TIME* time) {}

X509UniquePtr OpenSSLCertUtils::derDecode(ByteRange range) {}

std::unique_ptr<IOBuf> OpenSSLCertUtils::derEncode(X509& x509) {}

std::vector<X509UniquePtr> OpenSSLCertUtils::readCertsFromBuffer(
    ByteRange range) {}

std::array<uint8_t, SHA_DIGEST_LENGTH> OpenSSLCertUtils::getDigestSha1(
    X509& x509) {}

std::array<uint8_t, SHA256_DIGEST_LENGTH> OpenSSLCertUtils::getDigestSha256(
    X509& x509) {}

X509StoreUniquePtr OpenSSLCertUtils::readStoreFromFile(std::string caFile) {}

X509StoreUniquePtr OpenSSLCertUtils::readStoreFromBuffer(ByteRange certRange) {}
} // namespace ssl
} // namespace folly