~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to crypto/evp/evp_lib.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
        if (c->cipher->set_asn1_parameters != NULL)
69
69
                ret=c->cipher->set_asn1_parameters(c,type);
 
70
        else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1)
 
71
                ret=EVP_CIPHER_set_asn1_iv(c, type);
70
72
        else
71
73
                ret=-1;
72
74
        return(ret);
78
80
 
79
81
        if (c->cipher->get_asn1_parameters != NULL)
80
82
                ret=c->cipher->get_asn1_parameters(c,type);
 
83
        else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1)
 
84
                ret=EVP_CIPHER_get_asn1_iv(c, type);
81
85
        else
82
86
                ret=-1;
83
87
        return(ret);
178
182
        return ctx->cipher->block_size;
179
183
        }
180
184
 
181
 
int EVP_Cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl)
182
 
        {
183
 
        return ctx->cipher->do_cipher(ctx,out,in,inl);
184
 
        }
185
 
 
186
185
const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx)
187
186
        {
188
187
        return ctx->cipher;
193
192
        return cipher->flags;
194
193
        }
195
194
 
196
 
unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx)
197
 
        {
198
 
        return ctx->cipher->flags;
199
 
        }
200
 
 
201
195
void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx)
202
196
        {
203
197
        return ctx->app_data;
213
207
        return cipher->iv_len;
214
208
        }
215
209
 
216
 
int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx)
217
 
        {
218
 
        return ctx->cipher->iv_len;
219
 
        }
220
 
 
221
210
int EVP_CIPHER_key_length(const EVP_CIPHER *cipher)
222
211
        {
223
212
        return cipher->key_len;
228
217
        return ctx->key_len;
229
218
        }
230
219
 
231
 
int EVP_CIPHER_nid(const EVP_CIPHER *cipher)
232
 
        {
233
 
        return cipher->nid;
234
 
        }
235
 
 
236
220
int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx)
237
221
        {
238
222
        return ctx->cipher->nid;
277
261
        {
278
262
        return (ctx->flags & flags);
279
263
        }
 
264
 
 
265
void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags)
 
266
        {
 
267
        ctx->flags |= flags;
 
268
        }
 
269
 
 
270
void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags)
 
271
        {
 
272
        ctx->flags &= ~flags;
 
273
        }
 
274
 
 
275
int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags)
 
276
        {
 
277
        return (ctx->flags & flags);
 
278
        }