Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: crypto/openssl_bio_string.cc

Issue 1312203002: Include BoringSSL headers from third_party/ in crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « crypto/hmac_openssl.cc ('k') | crypto/openssl_bio_string_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "crypto/openssl_bio_string.h" 5 #include "crypto/openssl_bio_string.h"
6 6
7 #include <openssl/bio.h>
8 #include <string.h> 7 #include <string.h>
9 8
9 #include "third_party/boringssl/src/include/openssl/bio.h"
10
10 namespace crypto { 11 namespace crypto {
11 12
12 namespace { 13 namespace {
13 14
14 int bio_string_write(BIO* bio, const char* data, int len) { 15 int bio_string_write(BIO* bio, const char* data, int len) {
15 reinterpret_cast<std::string*>(bio->ptr)->append(data, len); 16 reinterpret_cast<std::string*>(bio->ptr)->append(data, len);
16 return len; 17 return len;
17 } 18 }
18 19
19 int bio_string_puts(BIO* bio, const char* data) { 20 int bio_string_puts(BIO* bio, const char* data) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 BIO* BIO_new_string(std::string* out) { 69 BIO* BIO_new_string(std::string* out) {
69 BIO* bio = BIO_new(&bio_string_methods); 70 BIO* bio = BIO_new(&bio_string_methods);
70 if (!bio) 71 if (!bio)
71 return bio; 72 return bio;
72 bio->ptr = out; 73 bio->ptr = out;
73 bio->init = 1; 74 bio->init = 1;
74 return bio; 75 return bio;
75 } 76 }
76 77
77 } // namespace crypto 78 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/hmac_openssl.cc ('k') | crypto/openssl_bio_string_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698