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

Side by Side Diff: openssl/crypto/bio/bf_nbio.c

Issue 9254031: Upgrade chrome's OpenSSL to same version Android ships with. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/openssl/
Patch Set: '' Created 8 years, 11 months 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 | Annotate | Revision Log
« no previous file with comments | « openssl/crypto/bio/bf_buff.c ('k') | openssl/crypto/bio/bio.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* crypto/bio/bf_nbio.c */ 1 /* crypto/bio/bf_nbio.c */
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * This package is an SSL implementation written 5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com). 6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL. 7 * The implementation was written so as to conform with Netscapes SSL.
8 * 8 *
9 * This library is free for commercial and non-commercial use as long as 9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions 10 * the following conditions are aheared to. The following conditions
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 if (a->ptr != NULL) 118 if (a->ptr != NULL)
119 OPENSSL_free(a->ptr); 119 OPENSSL_free(a->ptr);
120 a->ptr=NULL; 120 a->ptr=NULL;
121 a->init=0; 121 a->init=0;
122 a->flags=0; 122 a->flags=0;
123 return(1); 123 return(1);
124 } 124 }
125 125
126 static int nbiof_read(BIO *b, char *out, int outl) 126 static int nbiof_read(BIO *b, char *out, int outl)
127 { 127 {
128 NBIO_TEST *nt;
129 int ret=0; 128 int ret=0;
130 #if 1 129 #if 1
131 int num; 130 int num;
132 unsigned char n; 131 unsigned char n;
133 #endif 132 #endif
134 133
135 if (out == NULL) return(0); 134 if (out == NULL) return(0);
136 if (b->next_bio == NULL) return(0); 135 if (b->next_bio == NULL) return(0);
137 nt=(NBIO_TEST *)b->ptr;
138 136
139 BIO_clear_retry_flags(b); 137 BIO_clear_retry_flags(b);
140 #if 1 138 #if 1
141 RAND_pseudo_bytes(&n,1); 139 RAND_pseudo_bytes(&n,1);
142 num=(n&0x07); 140 num=(n&0x07);
143 141
144 if (outl > num) outl=num; 142 if (outl > num) outl=num;
145 143
146 if (num == 0) 144 if (num == 0)
147 { 145 {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 244 }
247 245
248 246
249 static int nbiof_puts(BIO *bp, const char *str) 247 static int nbiof_puts(BIO *bp, const char *str)
250 { 248 {
251 if (bp->next_bio == NULL) return(0); 249 if (bp->next_bio == NULL) return(0);
252 return(BIO_puts(bp->next_bio,str)); 250 return(BIO_puts(bp->next_bio,str));
253 } 251 }
254 252
255 253
OLDNEW
« no previous file with comments | « openssl/crypto/bio/bf_buff.c ('k') | openssl/crypto/bio/bio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698