blob: e37bef51792997e4e34e922c028b2ed44300da07 [file] [log] [blame]
Ed Tanous40e9b922024-09-10 13:50:16 -07001// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright OpenBMC Authors
Ed Tanous7c8e0642022-02-21 12:11:14 -08003#pragma once
4
Ed Tanous7c8e0642022-02-21 12:11:14 -08005#include "persistent_data.hpp"
6
Ed Tanous7c8e0642022-02-21 12:11:14 -08007#include <boost/asio/ip/address.hpp>
8#include <boost/asio/ssl/verify_context.hpp>
9
10#include <memory>
Ed Tanous724985f2024-06-05 09:19:06 -070011#include <string_view>
Ed Tanous7c8e0642022-02-21 12:11:14 -080012
Ed Tanous724985f2024-06-05 09:19:06 -070013std::string getUsernameFromCommonName(std::string_view commonName);
Ed Tanous3ce36882024-06-09 10:58:16 -070014
Ed Tanous724985f2024-06-05 09:19:06 -070015std::shared_ptr<persistent_data::UserSession>
Ed Tanous7c8e0642022-02-21 12:11:14 -080016 verifyMtlsUser(const boost::asio::ip::address& clientIp,
Ed Tanous724985f2024-06-05 09:19:06 -070017 boost::asio::ssl::verify_context& ctx);