xref: /openbmc/bmcweb/http/mutual_tls_private.hpp (revision 4d7b5ddb3a2b6cc42b7bbc0c710f297e6df4fd55)
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 #pragma once
4 
5 #include <openssl/crypto.h>
6 
7 #include <string>
8 #include <string_view>
9 
10 std::string getCommonNameFromCert(X509* cert);
11 
12 std::string getUPNFromCert(X509* peerCert, std::string_view hostname);
13 
14 std::string getMetaUserNameFromCert(X509* cert);
15 
16 std::string getUsernameFromCert(X509* cert);
17 
18 bool isUPNMatch(std::string_view upn, std::string_view hostname);
19