mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace Crypto {
|
||||
|
||||
enum PEMType {
|
||||
enum class PEMType {
|
||||
Certificate,
|
||||
PrivateKey,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user