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

Side by Side Diff: openssl/crypto/evp/e_null.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/evp/e_idea.c ('k') | openssl/crypto/evp/e_rc2.c » ('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/evp/e_null.c */ 1 /* crypto/evp/e_null.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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 */ 57 */
58 58
59 #include <stdio.h> 59 #include <stdio.h>
60 #include "cryptlib.h" 60 #include "cryptlib.h"
61 #include <openssl/evp.h> 61 #include <openssl/evp.h>
62 #include <openssl/objects.h> 62 #include <openssl/objects.h>
63 63
64 static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, 64 static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
65 const unsigned char *iv,int enc); 65 const unsigned char *iv,int enc);
66 static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 66 static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
67 » const unsigned char *in, unsigned int inl); 67 » const unsigned char *in, size_t inl);
68 static const EVP_CIPHER n_cipher= 68 static const EVP_CIPHER n_cipher=
69 { 69 {
70 NID_undef, 70 NID_undef,
71 1,0,0, 71 1,0,0,
72 » EVP_CIPH_FLAG_FIPS, 72 » 0,
73 null_init_key, 73 null_init_key,
74 null_cipher, 74 null_cipher,
75 NULL, 75 NULL,
76 0, 76 0,
77 NULL, 77 NULL,
78 NULL, 78 NULL,
79 NULL, 79 NULL,
80 NULL 80 NULL
81 }; 81 };
82 82
83 const EVP_CIPHER *EVP_enc_null(void) 83 const EVP_CIPHER *EVP_enc_null(void)
84 { 84 {
85 return(&n_cipher); 85 return(&n_cipher);
86 } 86 }
87 87
88 static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, 88 static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
89 const unsigned char *iv, int enc) 89 const unsigned char *iv, int enc)
90 { 90 {
91 /* memset(&(ctx->c),0,sizeof(ctx->c));*/ 91 /* memset(&(ctx->c),0,sizeof(ctx->c));*/
92 return 1; 92 return 1;
93 } 93 }
94 94
95 static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 95 static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
96 » const unsigned char *in, unsigned int inl) 96 » const unsigned char *in, size_t inl)
97 { 97 {
98 if (in != out) 98 if (in != out)
99 » » memcpy((char *)out,(const char *)in,(size_t)inl); 99 » » memcpy((char *)out,(const char *)in,inl);
100 return 1; 100 return 1;
101 } 101 }
102 102
OLDNEW
« no previous file with comments | « openssl/crypto/evp/e_idea.c ('k') | openssl/crypto/evp/e_rc2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698