Skip to content

Commit

Permalink
split out CertUtils and (Peer|Self)CertImpl from Certificate.h
Browse files Browse the repository at this point in the history
Summary:
As part of the ongoing work to create a version of fizz that does depend on OpenSSL, this diff begins the refactors of `Certificate.h`. In this diff:
- since `CertUtils`, `PeerCertImpl` and `SelfCertImpl` need to depend on OpenSSL, move them to different translation units than the `PeerCert` and `SelfCert` interfaces
- rename `(Peer|Self)CertImpl` to `OpenSSL(Peer|Self)CertImpl`

Main changes are in:
- `protocol/Certificate.h` and `.cpp`, deleted `-inl.h`
- `protocol/OpenSSLSelfCertImpl.h` and `-inl.h` (split from Certificate.h and renamed from SelfCertImpl)
- `protocol/OpenSSLPeerCertImpl.h` and `-inl.h` (split from Certificate.h and renamed from PeerCertImpl)
- `protocol/CertUtils.h`, `.cpp`and`-inl.h` (Split from Certificate.h)
- `protocol/TARGETS` and `BUCK` - new targets `protocol:cert_utils`, `protocol:openssl_self_cert_impl`, `protocol:openssl_peer_cert_impl`
- added new includes and targets to various dependencies.

In the next diff, we'll use a compler flag `#if` guard the PeerCert and SelfCert interfaces to conditionally inherit from OpenSSL. This makes it so that the `Factory` interface and `ClientProtocol` do not need to depend on OpenSSL.
We'll also create a buck config to conditionally select the openssl depednencies (and pass in the compiler flag).

Reviewed By: mingtaoy

Differential Revision: D51866623

fbshipit-source-id: d91cc4a39cabc2ac6879f16845ab8a7487d64c11
  • Loading branch information
Zale Young authored and facebook-github-bot committed Jan 12, 2024
1 parent cd04860 commit a74d151
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wangle/acceptor/FizzConfigUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@

#include <wangle/acceptor/FizzConfigUtil.h>

#include <fizz/protocol/CertUtils.h>
#include <fizz/protocol/DefaultCertificateVerifier.h>
#include <folly/Format.h>
#include <folly/String.h>
#include <wangle/acceptor/FizzConfigUtil.h>

using fizz::CertUtils;
using fizz::DefaultCertificateVerifier;
Expand Down

0 comments on commit a74d151

Please sign in to comment.