mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:47:35 +00:00
LibTLS: Avoid unnecessary HashMap copies, improve const-correctness
This commit is contained in:
parent
f866c80222
commit
2bb2a7097d
4 changed files with 11 additions and 11 deletions
|
@ -192,29 +192,29 @@ struct BasicConstraints {
|
|||
|
||||
class RelativeDistinguishedName {
|
||||
public:
|
||||
ErrorOr<String> to_string();
|
||||
ErrorOr<String> to_string() const;
|
||||
|
||||
ErrorOr<AK::HashSetResult> set(String key, String value)
|
||||
{
|
||||
return m_members.try_set(key, value);
|
||||
}
|
||||
|
||||
Optional<String> get(StringView key)
|
||||
Optional<String> get(StringView key) const
|
||||
{
|
||||
return m_members.get(key);
|
||||
}
|
||||
|
||||
Optional<String> get(AttributeType key)
|
||||
Optional<String> get(AttributeType key) const
|
||||
{
|
||||
return m_members.get(enum_value(key));
|
||||
}
|
||||
|
||||
Optional<String> get(ObjectClass key)
|
||||
Optional<String> get(ObjectClass key) const
|
||||
{
|
||||
return m_members.get(enum_value(key));
|
||||
}
|
||||
|
||||
String common_name()
|
||||
String common_name() const
|
||||
{
|
||||
auto entry = get(AttributeType::Cn);
|
||||
if (entry.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue