blob: aec7ae108c7a2b36666e5e6731fe5c856ca809c1 [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 Tanousd7857202025-01-28 15:32:26 -08005#include "sessions.hpp"
Ed Tanous7c8e0642022-02-21 12:11:14 -08006
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 Tanousd7857202025-01-28 15:32:26 -080011#include <string>
Ed Tanous724985f2024-06-05 09:19:06 -070012#include <string_view>
Ed Tanous7c8e0642022-02-21 12:11:14 -080013
Ed Tanous724985f2024-06-05 09:19:06 -070014std::string getUsernameFromCommonName(std::string_view commonName);
Ed Tanous3ce36882024-06-09 10:58:16 -070015
Ed Tanous724985f2024-06-05 09:19:06 -070016std::shared_ptr<persistent_data::UserSession>
Ed Tanous7c8e0642022-02-21 12:11:14 -080017 verifyMtlsUser(const boost::asio::ip::address& clientIp,
Ed Tanous724985f2024-06-05 09:19:06 -070018 boost::asio::ssl::verify_context& ctx);