Skip to content

Commit

Permalink
clang-format some files related to fizz Certificates
Browse files Browse the repository at this point in the history
Summary: Some files from a previous commit were not formatted correctly. Run clang-format on them to correct.

Reviewed By: mingtaoy

Differential Revision: D52814984

fbshipit-source-id: cbc80de90ee539a895e7cb8e95918124d94223bf
  • Loading branch information
Zale Young authored and facebook-github-bot committed Jan 23, 2024
1 parent 766211e commit 2507945
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions fizz/protocol/OpenSSLPeerCertImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class OpenSSLPeerCertImpl : public PeerCert {

~OpenSSLPeerCertImpl() override = default;

std::string getIdentity() const override;
[[nodiscard]] std::string getIdentity() const override;

void verify(
SignatureScheme scheme,
CertificateVerifyContext context,
folly::ByteRange toBeSigned,
folly::ByteRange signature) const override;

folly::ssl::X509UniquePtr getX509() const override;
[[nodiscard]] folly::ssl::X509UniquePtr getX509() const override;

protected:
OpenSSLSignature<T> signature_;
Expand Down
2 changes: 1 addition & 1 deletion fizz/protocol/OpenSSLSelfCertImpl-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ OpenSSLSelfCertImpl<T>::OpenSSLSelfCertImpl(
std::vector<folly::ssl::X509UniquePtr> certs,
const std::vector<std::shared_ptr<fizz::CertificateCompressor>>&
compressors) {
if (certs.size() == 0) {
if (certs.empty()) {
throw std::runtime_error("Must supply at least 1 cert");
}
if (X509_check_private_key(certs[0].get(), pkey.get()) != 1) {
Expand Down
14 changes: 7 additions & 7 deletions fizz/protocol/OpenSSLSelfCertImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@ class OpenSSLSelfCertImpl : public SelfCert {

~OpenSSLSelfCertImpl() override = default;

std::string getIdentity() const override;
[[nodiscard]] std::string getIdentity() const override;

std::vector<std::string> getAltIdentities() const override;
[[nodiscard]] std::vector<std::string> getAltIdentities() const override;

std::vector<SignatureScheme> getSigSchemes() const override;
[[nodiscard]] std::vector<SignatureScheme> getSigSchemes() const override;

CertificateMsg getCertMessage(
[[nodiscard]] CertificateMsg getCertMessage(
Buf certificateRequestContext = nullptr) const override;

CompressedCertificate getCompressedCert(
[[nodiscard]] CompressedCertificate getCompressedCert(
CertificateCompressionAlgorithm algo) const override;

Buf sign(
[[nodiscard]] Buf sign(
SignatureScheme scheme,
CertificateVerifyContext context,
folly::ByteRange toBeSigned) const override;

folly::ssl::X509UniquePtr getX509() const override;
[[nodiscard]] folly::ssl::X509UniquePtr getX509() const override;

protected:
// Allows derived classes to handle init
Expand Down

0 comments on commit 2507945

Please sign in to comment.