blob: fb43796052ec4ef0e2dbc1ab7754daa56cbe0662 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/stllike/string.h>
#include <vector>
#include <iosfwd>
namespace vespalib::net::tls {
// Simple wrapper of the information most useful to certificate verification code.
struct PeerCredentials {
// The last occurring (i.e. "most specific") CN present in the certificate,
// or the empty string if no CN is given (or if the CN is curiously empty).
vespalib::string common_name;
// 0-n DNS SAN entries. Note: "DNS:" prefix is not present in strings.
std::vector<vespalib::string> dns_sans;
// 0-n DNS URI entries. Note: "URI:" prefix is not present in strings.
std::vector<vespalib::string> uri_sans;
PeerCredentials();
~PeerCredentials();
};
std::ostream& operator<<(std::ostream&, const PeerCredentials&);
vespalib::string to_string(const PeerCredentials&);
}
|