Skip to content

Commit

Permalink
Fix build break of use_openssl=1 caused by strict enforcement of over…
Browse files Browse the repository at this point in the history
…ride checks on Linux.

Caused by: https://chromium.googlesource.com/chromium/src/+/e8d2cde55fe3fcc12f557e413c7afaef574cb4b4

BUG=417463
TBR=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/825293003

Cr-Commit-Position: refs/heads/master@{#309835}
  • Loading branch information
eroman authored and Commit bot committed Jan 2, 2015
1 parent 438988f commit a3a197c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions crypto/secure_hash_openssl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ class SecureHashSHA256OpenSSL : public SecureHash {
SHA256_Init(&ctx_);
}

virtual ~SecureHashSHA256OpenSSL() {
~SecureHashSHA256OpenSSL() override {
OPENSSL_cleanse(&ctx_, sizeof(ctx_));
}

virtual void Update(const void* input, size_t len) override {
void Update(const void* input, size_t len) override {
SHA256_Update(&ctx_, static_cast<const unsigned char*>(input), len);
}

virtual void Finish(void* output, size_t len) override {
void Finish(void* output, size_t len) override {
ScopedOpenSSLSafeSizeBuffer<SHA256_DIGEST_LENGTH> result(
static_cast<unsigned char*>(output), len);
SHA256_Final(result.safe_buffer(), &ctx_);
}

virtual bool Serialize(Pickle* pickle) override;
virtual bool Deserialize(PickleIterator* data_iterator) override;
bool Serialize(Pickle* pickle) override;
bool Deserialize(PickleIterator* data_iterator) override;

private:
SHA256_CTX ctx_;
Expand Down
16 changes: 8 additions & 8 deletions net/cert/cert_verify_proc_openssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ class CertVerifyProcOpenSSL : public CertVerifyProc {
public:
CertVerifyProcOpenSSL();

virtual bool SupportsAdditionalTrustAnchors() const override;
bool SupportsAdditionalTrustAnchors() const override;

protected:
virtual ~CertVerifyProcOpenSSL();
~CertVerifyProcOpenSSL() override;

private:
virtual int VerifyInternal(X509Certificate* cert,
const std::string& hostname,
int flags,
CRLSet* crl_set,
const CertificateList& additional_trust_anchors,
CertVerifyResult* verify_result) override;
int VerifyInternal(X509Certificate* cert,
const std::string& hostname,
int flags,
CRLSet* crl_set,
const CertificateList& additional_trust_anchors,
CertVerifyResult* verify_result) override;
};

} // namespace net
Expand Down

0 comments on commit a3a197c

Please sign in to comment.