mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update source files for bracket style
This commit is contained in:
@ -21,8 +21,9 @@ CefRefPtr<CefBinaryValue> EncodeCertificate(const CRYPTO_BUFFER* cert_buffer,
|
||||
} else if (!net::X509Certificate::GetPEMEncoded(cert_buffer, &encoded)) {
|
||||
return nullptr;
|
||||
}
|
||||
if (encoded.empty())
|
||||
if (encoded.empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
return CefBinaryValue::Create(encoded.c_str(), encoded.size());
|
||||
}
|
||||
|
||||
@ -37,14 +38,16 @@ CefX509CertificateImpl::CefX509CertificateImpl(
|
||||
: cert_(cert) {}
|
||||
|
||||
CefRefPtr<CefX509CertPrincipal> CefX509CertificateImpl::GetSubject() {
|
||||
if (cert_)
|
||||
if (cert_) {
|
||||
return new CefX509CertPrincipalImpl(cert_->subject());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CefRefPtr<CefX509CertPrincipal> CefX509CertificateImpl::GetIssuer() {
|
||||
if (cert_)
|
||||
if (cert_) {
|
||||
return new CefX509CertPrincipalImpl(cert_->issuer());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -73,8 +76,9 @@ CefBaseTime CefX509CertificateImpl::GetValidExpiry() {
|
||||
CefRefPtr<CefBinaryValue> CefX509CertificateImpl::GetDEREncoded() {
|
||||
if (cert_) {
|
||||
const CRYPTO_BUFFER* cert_buffer = cert_->cert_buffer();
|
||||
if (cert_buffer)
|
||||
if (cert_buffer) {
|
||||
return EncodeCertificate(cert_buffer, true);
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
@ -82,25 +86,28 @@ CefRefPtr<CefBinaryValue> CefX509CertificateImpl::GetDEREncoded() {
|
||||
CefRefPtr<CefBinaryValue> CefX509CertificateImpl::GetPEMEncoded() {
|
||||
if (cert_) {
|
||||
const CRYPTO_BUFFER* cert_buffer = cert_->cert_buffer();
|
||||
if (cert_buffer)
|
||||
if (cert_buffer) {
|
||||
return EncodeCertificate(cert_buffer, false);
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
size_t CefX509CertificateImpl::GetIssuerChainSize() {
|
||||
if (cert_)
|
||||
if (cert_) {
|
||||
return cert_->intermediate_buffers().size();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CefX509CertificateImpl::AcquirePrivateKey(
|
||||
base::OnceCallback<void(scoped_refptr<net::SSLPrivateKey>)>
|
||||
private_key_callback) {
|
||||
if (identity_)
|
||||
if (identity_) {
|
||||
identity_->AcquirePrivateKey(std::move(private_key_callback));
|
||||
else
|
||||
} else {
|
||||
std::move(private_key_callback).Run(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void CefX509CertificateImpl::GetEncodedIssuerChain(
|
||||
@ -118,14 +125,16 @@ void CefX509CertificateImpl::GetEncodedIssuerChain(
|
||||
|
||||
void CefX509CertificateImpl::GetDEREncodedIssuerChain(
|
||||
CefX509Certificate::IssuerChainBinaryList& chain) {
|
||||
if (der_encoded_issuer_chain_.empty())
|
||||
if (der_encoded_issuer_chain_.empty()) {
|
||||
GetEncodedIssuerChain(der_encoded_issuer_chain_, true);
|
||||
}
|
||||
chain = der_encoded_issuer_chain_;
|
||||
}
|
||||
|
||||
void CefX509CertificateImpl::GetPEMEncodedIssuerChain(
|
||||
CefX509Certificate::IssuerChainBinaryList& chain) {
|
||||
if (pem_encoded_issuer_chain_.empty())
|
||||
if (pem_encoded_issuer_chain_.empty()) {
|
||||
GetEncodedIssuerChain(pem_encoded_issuer_chain_, false);
|
||||
}
|
||||
chain = pem_encoded_issuer_chain_;
|
||||
}
|
||||
|
Reference in New Issue
Block a user