LibCrypto: Make PEMType an enum class

This is required for the following commits to avoid a conflict
with the `Certificate` namespace.
This commit is contained in:
devgianlu 2024-11-24 19:07:10 +01:00 committed by Andreas Kling
parent 03b9e555c0
commit 07ced0cb34
Notes: github-actions[bot] 2024-11-25 13:12:35 +00:00
2 changed files with 3 additions and 3 deletions

View file

@ -100,11 +100,11 @@ ErrorOr<ByteBuffer> encode_pem(ReadonlyBytes data, PEMType type)
StringView block_end;
switch (type) {
case Certificate:
case PEMType::Certificate:
block_start = "-----BEGIN CERTIFICATE-----\n"sv;
block_end = "-----END CERTIFICATE-----\n"sv;
break;
case PrivateKey:
case PEMType::PrivateKey:
block_start = "-----BEGIN PRIVATE KEY-----\n"sv;
block_end = "-----END PRIVATE KEY-----\n"sv;
break;

View file

@ -11,7 +11,7 @@
namespace Crypto {
enum PEMType {
enum class PEMType {
Certificate,
PrivateKey,
};