blob: c28a99ebd2225dfe3ec8ea3cdec47499e0423859 [file] [log] [blame]
Malik Akbar Hashemi Rafsanjani4d7b5dd2025-02-26 13:14:30 -08001// 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
10std::string getCommonNameFromCert(X509* cert);
11
12std::string getUPNFromCert(X509* peerCert, std::string_view hostname);
13
14std::string getMetaUserNameFromCert(X509* cert);
15
16std::string getUsernameFromCert(X509* cert);
17
18bool isUPNMatch(std::string_view upn, std::string_view hostname);