mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::openssl: Minor rename function.
This commit is contained in:
parent
6aec038479
commit
35ad641251
3 changed files with 27 additions and 27 deletions
|
@ -90,8 +90,8 @@ namespace ircd::openssl
|
||||||
string_view write_pem(const mutable_buffer &out, const X509 &);
|
string_view write_pem(const mutable_buffer &out, const X509 &);
|
||||||
string_view print(const mutable_buffer &buf, const X509 &);
|
string_view print(const mutable_buffer &buf, const X509 &);
|
||||||
string_view genX509(const mutable_buffer &out, const json::object &opts);
|
string_view genX509(const mutable_buffer &out, const json::object &opts);
|
||||||
const X509 &get_peer_cert(const SSL &);
|
const X509 &peer_cert(const SSL &);
|
||||||
X509 &get_peer_cert(SSL &);
|
X509 &peer_cert(SSL &);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// OpenSSL BIO convenience utils and wraps; also secure file IO closures
|
/// OpenSSL BIO convenience utils and wraps; also secure file IO closures
|
||||||
|
|
|
@ -201,7 +201,7 @@ ircd::net::peer_cert_der(const mutable_raw_buffer &buf,
|
||||||
const socket &socket)
|
const socket &socket)
|
||||||
{
|
{
|
||||||
const SSL &ssl(socket);
|
const SSL &ssl(socket);
|
||||||
const X509 &cert(openssl::get_peer_cert(ssl));
|
const X509 &cert{openssl::peer_cert(ssl)};
|
||||||
return openssl::i2d(buf, cert);
|
return openssl::i2d(buf, cert);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,30 @@ namespace ircd::openssl
|
||||||
void append_entries(X509 &cert, const json::object &opts);
|
void append_entries(X509 &cert, const json::object &opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
X509 &
|
||||||
|
ircd::openssl::peer_cert(SSL &ssl)
|
||||||
|
{
|
||||||
|
auto *const ret
|
||||||
|
{
|
||||||
|
SSL_get_peer_certificate(&ssl)
|
||||||
|
};
|
||||||
|
|
||||||
|
assert(ret);
|
||||||
|
return *ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
const X509 &
|
||||||
|
ircd::openssl::peer_cert(const SSL &ssl)
|
||||||
|
{
|
||||||
|
const auto *const ret
|
||||||
|
{
|
||||||
|
SSL_get_peer_certificate(&ssl)
|
||||||
|
};
|
||||||
|
|
||||||
|
assert(ret);
|
||||||
|
return *ret;
|
||||||
|
}
|
||||||
|
|
||||||
ircd::string_view
|
ircd::string_view
|
||||||
ircd::openssl::genX509(const mutable_buffer &out,
|
ircd::openssl::genX509(const mutable_buffer &out,
|
||||||
const json::object &opts)
|
const json::object &opts)
|
||||||
|
@ -316,30 +340,6 @@ ircd::openssl::i2d(const mutable_raw_buffer &buf,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
X509 &
|
|
||||||
ircd::openssl::get_peer_cert(SSL &ssl)
|
|
||||||
{
|
|
||||||
auto *const ret
|
|
||||||
{
|
|
||||||
SSL_get_peer_certificate(&ssl)
|
|
||||||
};
|
|
||||||
|
|
||||||
assert(ret);
|
|
||||||
return *ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
const X509 &
|
|
||||||
ircd::openssl::get_peer_cert(const SSL &ssl)
|
|
||||||
{
|
|
||||||
const auto *const ret
|
|
||||||
{
|
|
||||||
SSL_get_peer_certificate(&ssl)
|
|
||||||
};
|
|
||||||
|
|
||||||
assert(ret);
|
|
||||||
return *ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// RSA
|
// RSA
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue