mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +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:
parent
03b9e555c0
commit
07ced0cb34
Notes:
github-actions[bot]
2024-11-25 13:12:35 +00:00
Author: https://github.com/devgianlu
Commit: 07ced0cb34
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2563
Reviewed-by: https://github.com/alimpfard ✅
2 changed files with 3 additions and 3 deletions
|
@ -100,11 +100,11 @@ ErrorOr<ByteBuffer> encode_pem(ReadonlyBytes data, PEMType type)
|
||||||
StringView block_end;
|
StringView block_end;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Certificate:
|
case PEMType::Certificate:
|
||||||
block_start = "-----BEGIN CERTIFICATE-----\n"sv;
|
block_start = "-----BEGIN CERTIFICATE-----\n"sv;
|
||||||
block_end = "-----END CERTIFICATE-----\n"sv;
|
block_end = "-----END CERTIFICATE-----\n"sv;
|
||||||
break;
|
break;
|
||||||
case PrivateKey:
|
case PEMType::PrivateKey:
|
||||||
block_start = "-----BEGIN PRIVATE KEY-----\n"sv;
|
block_start = "-----BEGIN PRIVATE KEY-----\n"sv;
|
||||||
block_end = "-----END PRIVATE KEY-----\n"sv;
|
block_end = "-----END PRIVATE KEY-----\n"sv;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
|
|
||||||
enum PEMType {
|
enum class PEMType {
|
||||||
Certificate,
|
Certificate,
|
||||||
PrivateKey,
|
PrivateKey,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue