summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/evp.h')
-rw-r--r--src/lib/libcrypto/evp/evp.h502
1 files changed, 240 insertions, 262 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h
index fd43127092..915fe62341 100644
--- a/src/lib/libcrypto/evp/evp.h
+++ b/src/lib/libcrypto/evp/evp.h
@@ -67,74 +67,30 @@
67# undef OPENSSL_ALGORITHM_DEFINES 67# undef OPENSSL_ALGORITHM_DEFINES
68#endif 68#endif
69 69
70#ifndef NO_BIO 70#include <openssl/ossl_typ.h>
71
72#include <openssl/symhacks.h>
73
74#ifndef OPENSSL_NO_BIO
71#include <openssl/bio.h> 75#include <openssl/bio.h>
72#endif 76#endif
73#ifndef NO_MD2
74#include <openssl/md2.h>
75#endif
76#ifndef NO_MD4
77#include <openssl/md4.h>
78#endif
79#ifndef NO_MD5
80#include <openssl/md5.h>
81#endif
82#ifndef NO_SHA
83#include <openssl/sha.h>
84#endif
85#ifndef NO_RIPEMD
86#include <openssl/ripemd.h>
87#endif
88#ifndef NO_DES
89#include <openssl/des.h>
90#endif
91#ifndef NO_RC4
92#include <openssl/rc4.h>
93#endif
94#ifndef NO_RC2
95#include <openssl/rc2.h>
96#endif
97#ifndef NO_RC5
98#include <openssl/rc5.h>
99#endif
100#ifndef NO_BF
101#include <openssl/blowfish.h>
102#endif
103#ifndef NO_CAST
104#include <openssl/cast.h>
105#endif
106#ifndef NO_IDEA
107#include <openssl/idea.h>
108#endif
109#ifndef NO_MDC2
110#include <openssl/mdc2.h>
111#endif
112 77
78/*
113#define EVP_RC2_KEY_SIZE 16 79#define EVP_RC2_KEY_SIZE 16
114#define EVP_RC4_KEY_SIZE 16 80#define EVP_RC4_KEY_SIZE 16
115#define EVP_BLOWFISH_KEY_SIZE 16 81#define EVP_BLOWFISH_KEY_SIZE 16
116#define EVP_CAST5_KEY_SIZE 16 82#define EVP_CAST5_KEY_SIZE 16
117#define EVP_RC5_32_12_16_KEY_SIZE 16 83#define EVP_RC5_32_12_16_KEY_SIZE 16
84*/
118#define EVP_MAX_MD_SIZE (16+20) /* The SSLv3 md5+sha1 type */ 85#define EVP_MAX_MD_SIZE (16+20) /* The SSLv3 md5+sha1 type */
119#define EVP_MAX_KEY_LENGTH 24 86#define EVP_MAX_KEY_LENGTH 32
120#define EVP_MAX_IV_LENGTH 8 87#define EVP_MAX_IV_LENGTH 16
88#define EVP_MAX_BLOCK_LENGTH 32
121 89
122#define PKCS5_SALT_LEN 8 90#define PKCS5_SALT_LEN 8
123/* Default PKCS#5 iteration count */ 91/* Default PKCS#5 iteration count */
124#define PKCS5_DEFAULT_ITER 2048 92#define PKCS5_DEFAULT_ITER 2048
125 93
126#ifndef NO_RSA
127#include <openssl/rsa.h>
128#endif
129
130#ifndef NO_DSA
131#include <openssl/dsa.h>
132#endif
133
134#ifndef NO_DH
135#include <openssl/dh.h>
136#endif
137
138#include <openssl/objects.h> 94#include <openssl/objects.h>
139 95
140#define EVP_PK_RSA 0x0001 96#define EVP_PK_RSA 0x0001
@@ -164,26 +120,26 @@ extern "C" {
164/* Type needs to be a bit field 120/* Type needs to be a bit field
165 * Sub-type needs to be for variations on the method, as in, can it do 121 * Sub-type needs to be for variations on the method, as in, can it do
166 * arbitrary encryption.... */ 122 * arbitrary encryption.... */
167typedef struct evp_pkey_st 123struct evp_pkey_st
168 { 124 {
169 int type; 125 int type;
170 int save_type; 126 int save_type;
171 int references; 127 int references;
172 union { 128 union {
173 char *ptr; 129 char *ptr;
174#ifndef NO_RSA 130#ifndef OPENSSL_NO_RSA
175 struct rsa_st *rsa; /* RSA */ 131 struct rsa_st *rsa; /* RSA */
176#endif 132#endif
177#ifndef NO_DSA 133#ifndef OPENSSL_NO_DSA
178 struct dsa_st *dsa; /* DSA */ 134 struct dsa_st *dsa; /* DSA */
179#endif 135#endif
180#ifndef NO_DH 136#ifndef OPENSSL_NO_DH
181 struct dh_st *dh; /* DH */ 137 struct dh_st *dh; /* DH */
182#endif 138#endif
183 } pkey; 139 } pkey;
184 int save_parameters; 140 int save_parameters;
185 STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */ 141 STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */
186 } EVP_PKEY; 142 } /* EVP_PKEY */;
187 143
188#define EVP_PKEY_MO_SIGN 0x0001 144#define EVP_PKEY_MO_SIGN 0x0001
189#define EVP_PKEY_MO_VERIFY 0x0002 145#define EVP_PKEY_MO_VERIFY 0x0002
@@ -258,27 +214,32 @@ typedef struct evp_pkey_method_st
258#endif 214#endif
259 215
260#ifndef EVP_MD 216#ifndef EVP_MD
261typedef struct env_md_st 217struct env_md_st
262 { 218 {
263 int type; 219 int type;
264 int pkey_type; 220 int pkey_type;
265 int md_size; 221 int md_size;
266 void (*init)(); 222 unsigned long flags;
267 void (*update)(); 223 int (*init)(EVP_MD_CTX *ctx);
268 void (*final)(); 224 int (*update)(EVP_MD_CTX *ctx,const void *data,unsigned long count);
269 225 int (*final)(EVP_MD_CTX *ctx,unsigned char *md);
226 int (*copy)(EVP_MD_CTX *to,const EVP_MD_CTX *from);
227 int (*cleanup)(EVP_MD_CTX *ctx);
228
229 /* FIXME: prototype these some day */
270 int (*sign)(); 230 int (*sign)();
271 int (*verify)(); 231 int (*verify)();
272 int required_pkey_type[5]; /*EVP_PKEY_xxx */ 232 int required_pkey_type[5]; /*EVP_PKEY_xxx */
273 int block_size; 233 int block_size;
274 int ctx_size; /* how big does the ctx need to be */ 234 int ctx_size; /* how big does the ctx->md_data need to be */
275 } EVP_MD; 235 } /* EVP_MD */;
276
277 236
237#define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single
238 * block */
278 239
279#define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0} 240#define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0}
280 241
281#ifndef NO_DSA 242#ifndef OPENSSL_NO_DSA
282#define EVP_PKEY_DSA_method DSA_sign,DSA_verify, \ 243#define EVP_PKEY_DSA_method DSA_sign,DSA_verify, \
283 {EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3, \ 244 {EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3, \
284 EVP_PKEY_DSA4,0} 245 EVP_PKEY_DSA4,0}
@@ -286,7 +247,7 @@ typedef struct env_md_st
286#define EVP_PKEY_DSA_method EVP_PKEY_NULL_method 247#define EVP_PKEY_DSA_method EVP_PKEY_NULL_method
287#endif 248#endif
288 249
289#ifndef NO_RSA 250#ifndef OPENSSL_NO_RSA
290#define EVP_PKEY_RSA_method RSA_sign,RSA_verify, \ 251#define EVP_PKEY_RSA_method RSA_sign,RSA_verify, \
291 {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0} 252 {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0}
292#define EVP_PKEY_RSA_ASN1_OCTET_STRING_method \ 253#define EVP_PKEY_RSA_ASN1_OCTET_STRING_method \
@@ -300,34 +261,20 @@ typedef struct env_md_st
300 261
301#endif /* !EVP_MD */ 262#endif /* !EVP_MD */
302 263
303typedef struct env_md_ctx_st 264struct env_md_ctx_st
304 { 265 {
305 const EVP_MD *digest; 266 const EVP_MD *digest;
306 union { 267 ENGINE *engine; /* functional reference if 'digest' is ENGINE-provided */
307 unsigned char base[4]; 268 unsigned long flags;
308#ifndef NO_MD2 269 void *md_data;
309 MD2_CTX md2; 270 } /* EVP_MD_CTX */;
310#endif 271
311#ifndef NO_MD5 272/* values for EVP_MD_CTX flags */
312 MD5_CTX md5;
313#endif
314#ifndef NO_MD4
315 MD4_CTX md4;
316#endif
317#ifndef NO_RIPEMD
318 RIPEMD160_CTX ripemd160;
319#endif
320#ifndef NO_SHA
321 SHA_CTX sha;
322#endif
323#ifndef NO_MDC2
324 MDC2_CTX mdc2;
325#endif
326 } md;
327 } EVP_MD_CTX;
328 273
329typedef struct evp_cipher_st EVP_CIPHER; 274#define EVP_MD_CTX_FLAG_ONESHOT 0x0001 /* digest update will be called
330typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; 275 * once only */
276#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been
277 * cleaned */
331 278
332struct evp_cipher_st 279struct evp_cipher_st
333 { 280 {
@@ -341,12 +288,12 @@ struct evp_cipher_st
341 int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out, 288 int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out,
342 const unsigned char *in, unsigned int inl);/* encrypt/decrypt data */ 289 const unsigned char *in, unsigned int inl);/* encrypt/decrypt data */
343 int (*cleanup)(EVP_CIPHER_CTX *); /* cleanup ctx */ 290 int (*cleanup)(EVP_CIPHER_CTX *); /* cleanup ctx */
344 int ctx_size; /* how big the ctx needs to be */ 291 int ctx_size; /* how big ctx->cipher_data needs to be */
345 int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Populate a ASN1_TYPE with parameters */ 292 int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Populate a ASN1_TYPE with parameters */
346 int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Get parameters from a ASN1_TYPE */ 293 int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Get parameters from a ASN1_TYPE */
347 int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr); /* Miscellaneous operations */ 294 int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr); /* Miscellaneous operations */
348 void *app_data; /* Application data */ 295 void *app_data; /* Application data */
349 }; 296 } /* EVP_CIPHER */;
350 297
351/* Values for cipher flags */ 298/* Values for cipher flags */
352 299
@@ -368,6 +315,8 @@ struct evp_cipher_st
368#define EVP_CIPH_CTRL_INIT 0x40 315#define EVP_CIPH_CTRL_INIT 0x40
369/* Don't use standard key length function */ 316/* Don't use standard key length function */
370#define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80 317#define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80
318/* Don't use standard block padding */
319#define EVP_CIPH_NO_PADDING 0x100
371 320
372/* ctrl() values */ 321/* ctrl() values */
373 322
@@ -387,62 +336,23 @@ typedef struct evp_cipher_info_st
387struct evp_cipher_ctx_st 336struct evp_cipher_ctx_st
388 { 337 {
389 const EVP_CIPHER *cipher; 338 const EVP_CIPHER *cipher;
339 ENGINE *engine; /* functional reference if 'cipher' is ENGINE-provided */
390 int encrypt; /* encrypt or decrypt */ 340 int encrypt; /* encrypt or decrypt */
391 int buf_len; /* number we have left */ 341 int buf_len; /* number we have left */
392 342
393 unsigned char oiv[EVP_MAX_IV_LENGTH]; /* original iv */ 343 unsigned char oiv[EVP_MAX_IV_LENGTH]; /* original iv */
394 unsigned char iv[EVP_MAX_IV_LENGTH]; /* working iv */ 344 unsigned char iv[EVP_MAX_IV_LENGTH]; /* working iv */
395 unsigned char buf[EVP_MAX_IV_LENGTH]; /* saved partial block */ 345 unsigned char buf[EVP_MAX_BLOCK_LENGTH];/* saved partial block */
396 int num; /* used by cfb/ofb mode */ 346 int num; /* used by cfb/ofb mode */
397 347
398 void *app_data; /* application stuff */ 348 void *app_data; /* application stuff */
399 int key_len; /* May change for variable length cipher */ 349 int key_len; /* May change for variable length cipher */
400 union { 350 unsigned long flags; /* Various flags */
401#ifndef NO_RC4 351 void *cipher_data; /* per EVP data */
402 struct 352 int final_used;
403 { 353 int block_mask;
404 unsigned char key[EVP_RC4_KEY_SIZE]; 354 unsigned char final[EVP_MAX_BLOCK_LENGTH];/* possible final block */
405 RC4_KEY ks; /* working key */ 355 } /* EVP_CIPHER_CTX */;
406 } rc4;
407#endif
408#ifndef NO_DES
409 des_key_schedule des_ks;/* key schedule */
410 struct
411 {
412 des_key_schedule ks;/* key schedule */
413 des_cblock inw;
414 des_cblock outw;
415 } desx_cbc;
416 struct
417 {
418 des_key_schedule ks1;/* key schedule */
419 des_key_schedule ks2;/* key schedule (for ede) */
420 des_key_schedule ks3;/* key schedule (for ede3) */
421 } des_ede;
422#endif
423#ifndef NO_IDEA
424 IDEA_KEY_SCHEDULE idea_ks;/* key schedule */
425#endif
426#ifndef NO_RC2
427 struct {
428 int key_bits; /* effective key bits */
429 RC2_KEY ks;/* key schedule */
430 } rc2;
431#endif
432#ifndef NO_RC5
433 struct {
434 int rounds; /* number of rounds */
435 RC5_32_KEY ks;/* key schedule */
436 } rc5;
437#endif
438#ifndef NO_BF
439 BF_KEY bf_ks;/* key schedule */
440#endif
441#ifndef NO_CAST
442 CAST_KEY cast_ks;/* key schedule */
443#endif
444 } c;
445 };
446 356
447typedef struct evp_Encode_Ctx_st 357typedef struct evp_Encode_Ctx_st
448 { 358 {
@@ -459,20 +369,20 @@ typedef struct evp_Encode_Ctx_st
459 369
460/* Password based encryption function */ 370/* Password based encryption function */
461typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, 371typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
462 ASN1_TYPE *param, EVP_CIPHER *cipher, 372 ASN1_TYPE *param, const EVP_CIPHER *cipher,
463 EVP_MD *md, int en_de); 373 const EVP_MD *md, int en_de);
464 374
465#ifndef NO_RSA 375#ifndef OPENSSL_NO_RSA
466#define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\ 376#define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\
467 (char *)(rsa)) 377 (char *)(rsa))
468#endif 378#endif
469 379
470#ifndef NO_DSA 380#ifndef OPENSSL_NO_DSA
471#define EVP_PKEY_assign_DSA(pkey,dsa) EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\ 381#define EVP_PKEY_assign_DSA(pkey,dsa) EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\
472 (char *)(dsa)) 382 (char *)(dsa))
473#endif 383#endif
474 384
475#ifndef NO_DH 385#ifndef OPENSSL_NO_DH
476#define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,\ 386#define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,\
477 (char *)(dh)) 387 (char *)(dh))
478#endif 388#endif
@@ -484,6 +394,8 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
484#define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a)) 394#define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a))
485 395
486#define EVP_MD_type(e) ((e)->type) 396#define EVP_MD_type(e) ((e)->type)
397#define EVP_MD_nid(e) EVP_MD_type(e)
398#define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e))
487#define EVP_MD_pkey_type(e) ((e)->pkey_type) 399#define EVP_MD_pkey_type(e) ((e)->pkey_type)
488#define EVP_MD_size(e) ((e)->md_size) 400#define EVP_MD_size(e) ((e)->md_size)
489#define EVP_MD_block_size(e) ((e)->block_size) 401#define EVP_MD_block_size(e) ((e)->block_size)
@@ -494,11 +406,12 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
494#define EVP_MD_CTX_type(e) EVP_MD_type((e)->digest) 406#define EVP_MD_CTX_type(e) EVP_MD_type((e)->digest)
495 407
496#define EVP_CIPHER_nid(e) ((e)->nid) 408#define EVP_CIPHER_nid(e) ((e)->nid)
409#define EVP_CIPHER_name(e) OBJ_nid2sn(EVP_CIPHER_nid(e))
497#define EVP_CIPHER_block_size(e) ((e)->block_size) 410#define EVP_CIPHER_block_size(e) ((e)->block_size)
498#define EVP_CIPHER_key_length(e) ((e)->key_len) 411#define EVP_CIPHER_key_length(e) ((e)->key_len)
499#define EVP_CIPHER_iv_length(e) ((e)->iv_len) 412#define EVP_CIPHER_iv_length(e) ((e)->iv_len)
500#define EVP_CIPHER_flags(e) ((e)->flags) 413#define EVP_CIPHER_flags(e) ((e)->flags)
501#define EVP_CIPHER_mode(e) ((e)->flags) & EVP_CIPH_MODE) 414#define EVP_CIPHER_mode(e) (((e)->flags) & EVP_CIPH_MODE)
502 415
503#define EVP_CIPHER_CTX_cipher(e) ((e)->cipher) 416#define EVP_CIPHER_CTX_cipher(e) ((e)->cipher)
504#define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid) 417#define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid)
@@ -514,8 +427,10 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
514#define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80) 427#define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80)
515#define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80) 428#define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80)
516 429
430#define EVP_SignInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c)
517#define EVP_SignInit(a,b) EVP_DigestInit(a,b) 431#define EVP_SignInit(a,b) EVP_DigestInit(a,b)
518#define EVP_SignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) 432#define EVP_SignUpdate(a,b,c) EVP_DigestUpdate(a,b,c)
433#define EVP_VerifyInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c)
519#define EVP_VerifyInit(a,b) EVP_DigestInit(a,b) 434#define EVP_VerifyInit(a,b) EVP_DigestInit(a,b)
520#define EVP_VerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) 435#define EVP_VerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c)
521#define EVP_OpenUpdate(a,b,c,d,e) EVP_DecryptUpdate(a,b,c,d,e) 436#define EVP_OpenUpdate(a,b,c,d,e) EVP_DecryptUpdate(a,b,c,d,e)
@@ -542,38 +457,61 @@ void BIO_set_md(BIO *,const EVP_MD *md);
542#define EVP_delete_digest_alias(alias) \ 457#define EVP_delete_digest_alias(alias) \
543 OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS); 458 OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS);
544 459
545 460void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
546int EVP_MD_CTX_copy(EVP_MD_CTX *out,EVP_MD_CTX *in); 461int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
547void EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type); 462EVP_MD_CTX *EVP_MD_CTX_create(void);
548void EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d, 463void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
464int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out,const EVP_MD_CTX *in);
465#define EVP_MD_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs))
466#define EVP_MD_CTX_clear_flags(ctx,flgs) ((ctx)->flags&=~(flgs))
467#define EVP_MD_CTX_test_flags(ctx,flgs) ((ctx)->flags&(flgs))
468int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
469int EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d,
549 unsigned int cnt); 470 unsigned int cnt);
550void EVP_DigestFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s); 471int EVP_DigestFinal_ex(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s);
472int EVP_Digest(void *data, unsigned int count,
473 unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl);
474
475int EVP_MD_CTX_copy(EVP_MD_CTX *out,const EVP_MD_CTX *in);
476int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
477int EVP_DigestFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s);
551 478
552int EVP_read_pw_string(char *buf,int length,const char *prompt,int verify); 479int EVP_read_pw_string(char *buf,int length,const char *prompt,int verify);
553void EVP_set_pw_prompt(char *prompt); 480void EVP_set_pw_prompt(char *prompt);
554char * EVP_get_pw_prompt(void); 481char * EVP_get_pw_prompt(void);
555 482
556int EVP_BytesToKey(const EVP_CIPHER *type, EVP_MD *md, 483int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md,
557 const unsigned char *salt, const unsigned char *data, int datal, 484 const unsigned char *salt, const unsigned char *data,
558 int count, unsigned char *key, unsigned char *iv); 485 int datal, int count, unsigned char *key,unsigned char *iv);
559 486
560int EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, 487int EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher,
561 unsigned char *key, unsigned char *iv); 488 const unsigned char *key, const unsigned char *iv);
489int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl,
490 const unsigned char *key, const unsigned char *iv);
562int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, 491int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
563 int *outl, unsigned char *in, int inl); 492 int *outl, const unsigned char *in, int inl);
493int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
564int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); 494int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
565 495
566int EVP_DecryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, 496int EVP_DecryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher,
567 unsigned char *key, unsigned char *iv); 497 const unsigned char *key, const unsigned char *iv);
498int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl,
499 const unsigned char *key, const unsigned char *iv);
568int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, 500int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
569 int *outl, unsigned char *in, int inl); 501 int *outl, const unsigned char *in, int inl);
570int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); 502int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
571 503int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
572int EVP_CipherInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, 504
573 unsigned char *key,unsigned char *iv,int enc); 505int EVP_CipherInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher,
506 const unsigned char *key,const unsigned char *iv,
507 int enc);
508int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl,
509 const unsigned char *key,const unsigned char *iv,
510 int enc);
574int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, 511int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
575 int *outl, unsigned char *in, int inl); 512 int *outl, const unsigned char *in, int inl);
576int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); 513int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
514int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
577 515
578int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s, 516int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s,
579 EVP_PKEY *pkey); 517 EVP_PKEY *pkey);
@@ -581,11 +519,11 @@ int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s,
581int EVP_VerifyFinal(EVP_MD_CTX *ctx,unsigned char *sigbuf, 519int EVP_VerifyFinal(EVP_MD_CTX *ctx,unsigned char *sigbuf,
582 unsigned int siglen,EVP_PKEY *pkey); 520 unsigned int siglen,EVP_PKEY *pkey);
583 521
584int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek, 522int EVP_OpenInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,unsigned char *ek,
585 int ekl,unsigned char *iv,EVP_PKEY *priv); 523 int ekl,unsigned char *iv,EVP_PKEY *priv);
586int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); 524int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
587 525
588int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek, 526int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek,
589 int *ekl, unsigned char *iv,EVP_PKEY **pubk, int npubk); 527 int *ekl, unsigned char *iv,EVP_PKEY **pubk, int npubk);
590void EVP_SealFinal(EVP_CIPHER_CTX *ctx,unsigned char *out,int *outl); 528void EVP_SealFinal(EVP_CIPHER_CTX *ctx,unsigned char *out,int *outl);
591 529
@@ -602,14 +540,13 @@ int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
602 char *out, int *outl); 540 char *out, int *outl);
603int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); 541int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
604 542
605void ERR_load_EVP_strings(void );
606
607void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); 543void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
608int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); 544int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
609int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen); 545int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
546int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
610int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); 547int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
611 548
612#ifndef NO_BIO 549#ifndef OPENSSL_NO_BIO
613BIO_METHOD *BIO_f_md(void); 550BIO_METHOD *BIO_f_md(void);
614BIO_METHOD *BIO_f_base64(void); 551BIO_METHOD *BIO_f_base64(void);
615BIO_METHOD *BIO_f_cipher(void); 552BIO_METHOD *BIO_f_cipher(void);
@@ -618,89 +555,117 @@ void BIO_set_cipher(BIO *b,const EVP_CIPHER *c,unsigned char *k,
618 unsigned char *i, int enc); 555 unsigned char *i, int enc);
619#endif 556#endif
620 557
621EVP_MD *EVP_md_null(void); 558const EVP_MD *EVP_md_null(void);
622#ifndef NO_MD2 559#ifndef OPENSSL_NO_MD2
623EVP_MD *EVP_md2(void); 560const EVP_MD *EVP_md2(void);
624#endif 561#endif
625#ifndef NO_MD4 562#ifndef OPENSSL_NO_MD4
626EVP_MD *EVP_md4(void); 563const EVP_MD *EVP_md4(void);
627#endif 564#endif
628#ifndef NO_MD5 565#ifndef OPENSSL_NO_MD5
629EVP_MD *EVP_md5(void); 566const EVP_MD *EVP_md5(void);
630#endif 567#endif
631#ifndef NO_SHA 568#ifndef OPENSSL_NO_SHA
632EVP_MD *EVP_sha(void); 569const EVP_MD *EVP_sha(void);
633EVP_MD *EVP_sha1(void); 570const EVP_MD *EVP_sha1(void);
634EVP_MD *EVP_dss(void); 571const EVP_MD *EVP_dss(void);
635EVP_MD *EVP_dss1(void); 572const EVP_MD *EVP_dss1(void);
636#endif 573#endif
637#ifndef NO_MDC2 574#ifndef OPENSSL_NO_MDC2
638EVP_MD *EVP_mdc2(void); 575const EVP_MD *EVP_mdc2(void);
639#endif 576#endif
640#ifndef NO_RIPEMD 577#ifndef OPENSSL_NO_RIPEMD
641EVP_MD *EVP_ripemd160(void); 578const EVP_MD *EVP_ripemd160(void);
642#endif 579#endif
643EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */ 580const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */
644#ifndef NO_DES 581#ifndef OPENSSL_NO_DES
645EVP_CIPHER *EVP_des_ecb(void); 582const EVP_CIPHER *EVP_des_ecb(void);
646EVP_CIPHER *EVP_des_ede(void); 583const EVP_CIPHER *EVP_des_ede(void);
647EVP_CIPHER *EVP_des_ede3(void); 584const EVP_CIPHER *EVP_des_ede3(void);
648EVP_CIPHER *EVP_des_cfb(void); 585const EVP_CIPHER *EVP_des_cfb(void);
649EVP_CIPHER *EVP_des_ede_cfb(void); 586const EVP_CIPHER *EVP_des_ede_cfb(void);
650EVP_CIPHER *EVP_des_ede3_cfb(void); 587const EVP_CIPHER *EVP_des_ede3_cfb(void);
651EVP_CIPHER *EVP_des_ofb(void); 588const EVP_CIPHER *EVP_des_ofb(void);
652EVP_CIPHER *EVP_des_ede_ofb(void); 589const EVP_CIPHER *EVP_des_ede_ofb(void);
653EVP_CIPHER *EVP_des_ede3_ofb(void); 590const EVP_CIPHER *EVP_des_ede3_ofb(void);
654EVP_CIPHER *EVP_des_cbc(void); 591const EVP_CIPHER *EVP_des_cbc(void);
655EVP_CIPHER *EVP_des_ede_cbc(void); 592const EVP_CIPHER *EVP_des_ede_cbc(void);
656EVP_CIPHER *EVP_des_ede3_cbc(void); 593const EVP_CIPHER *EVP_des_ede3_cbc(void);
657EVP_CIPHER *EVP_desx_cbc(void); 594const EVP_CIPHER *EVP_desx_cbc(void);
658#endif 595/* This should now be supported through the dev_crypto ENGINE. But also, why are
659#ifndef NO_RC4 596 * rc4 and md5 declarations made here inside a "NO_DES" precompiler branch? */
660EVP_CIPHER *EVP_rc4(void); 597#if 0
661EVP_CIPHER *EVP_rc4_40(void); 598# ifdef OPENSSL_OPENBSD_DEV_CRYPTO
662#endif 599const EVP_CIPHER *EVP_dev_crypto_des_ede3_cbc(void);
663#ifndef NO_IDEA 600const EVP_CIPHER *EVP_dev_crypto_rc4(void);
664EVP_CIPHER *EVP_idea_ecb(void); 601const EVP_MD *EVP_dev_crypto_md5(void);
665EVP_CIPHER *EVP_idea_cfb(void); 602# endif
666EVP_CIPHER *EVP_idea_ofb(void); 603#endif
667EVP_CIPHER *EVP_idea_cbc(void); 604#endif
668#endif 605#ifndef OPENSSL_NO_RC4
669#ifndef NO_RC2 606const EVP_CIPHER *EVP_rc4(void);
670EVP_CIPHER *EVP_rc2_ecb(void); 607const EVP_CIPHER *EVP_rc4_40(void);
671EVP_CIPHER *EVP_rc2_cbc(void); 608#endif
672EVP_CIPHER *EVP_rc2_40_cbc(void); 609#ifndef OPENSSL_NO_IDEA
673EVP_CIPHER *EVP_rc2_64_cbc(void); 610const EVP_CIPHER *EVP_idea_ecb(void);
674EVP_CIPHER *EVP_rc2_cfb(void); 611const EVP_CIPHER *EVP_idea_cfb(void);
675EVP_CIPHER *EVP_rc2_ofb(void); 612const EVP_CIPHER *EVP_idea_ofb(void);
676#endif 613const EVP_CIPHER *EVP_idea_cbc(void);
677#ifndef NO_BF 614#endif
678EVP_CIPHER *EVP_bf_ecb(void); 615#ifndef OPENSSL_NO_RC2
679EVP_CIPHER *EVP_bf_cbc(void); 616const EVP_CIPHER *EVP_rc2_ecb(void);
680EVP_CIPHER *EVP_bf_cfb(void); 617const EVP_CIPHER *EVP_rc2_cbc(void);
681EVP_CIPHER *EVP_bf_ofb(void); 618const EVP_CIPHER *EVP_rc2_40_cbc(void);
682#endif 619const EVP_CIPHER *EVP_rc2_64_cbc(void);
683#ifndef NO_CAST 620const EVP_CIPHER *EVP_rc2_cfb(void);
684EVP_CIPHER *EVP_cast5_ecb(void); 621const EVP_CIPHER *EVP_rc2_ofb(void);
685EVP_CIPHER *EVP_cast5_cbc(void); 622#endif
686EVP_CIPHER *EVP_cast5_cfb(void); 623#ifndef OPENSSL_NO_BF
687EVP_CIPHER *EVP_cast5_ofb(void); 624const EVP_CIPHER *EVP_bf_ecb(void);
688#endif 625const EVP_CIPHER *EVP_bf_cbc(void);
689#ifndef NO_RC5 626const EVP_CIPHER *EVP_bf_cfb(void);
690EVP_CIPHER *EVP_rc5_32_12_16_cbc(void); 627const EVP_CIPHER *EVP_bf_ofb(void);
691EVP_CIPHER *EVP_rc5_32_12_16_ecb(void); 628#endif
692EVP_CIPHER *EVP_rc5_32_12_16_cfb(void); 629#ifndef OPENSSL_NO_CAST
693EVP_CIPHER *EVP_rc5_32_12_16_ofb(void); 630const EVP_CIPHER *EVP_cast5_ecb(void);
694#endif 631const EVP_CIPHER *EVP_cast5_cbc(void);
695void OpenSSL_add_all_algorithms(void); 632const EVP_CIPHER *EVP_cast5_cfb(void);
633const EVP_CIPHER *EVP_cast5_ofb(void);
634#endif
635#ifndef OPENSSL_NO_RC5
636const EVP_CIPHER *EVP_rc5_32_12_16_cbc(void);
637const EVP_CIPHER *EVP_rc5_32_12_16_ecb(void);
638const EVP_CIPHER *EVP_rc5_32_12_16_cfb(void);
639const EVP_CIPHER *EVP_rc5_32_12_16_ofb(void);
640#endif
641#ifndef OPENSSL_NO_AES
642const EVP_CIPHER *EVP_aes_128_ecb(void);
643const EVP_CIPHER *EVP_aes_128_cbc(void);
644const EVP_CIPHER *EVP_aes_192_ecb(void);
645const EVP_CIPHER *EVP_aes_192_cbc(void);
646const EVP_CIPHER *EVP_aes_256_ecb(void);
647const EVP_CIPHER *EVP_aes_256_cbc(void);
648#endif
649
650void OPENSSL_add_all_algorithms_noconf(void);
651void OPENSSL_add_all_algorithms_conf(void);
652
653#ifdef OPENSSL_LOAD_CONF
654#define OpenSSL_add_all_algorithms() \
655 OPENSSL_add_all_algorithms_conf()
656#else
657#define OpenSSL_add_all_algorithms() \
658 OPENSSL_add_all_algorithms_noconf()
659#endif
660
696void OpenSSL_add_all_ciphers(void); 661void OpenSSL_add_all_ciphers(void);
697void OpenSSL_add_all_digests(void); 662void OpenSSL_add_all_digests(void);
698#define SSLeay_add_all_algorithms() OpenSSL_add_all_algorithms() 663#define SSLeay_add_all_algorithms() OpenSSL_add_all_algorithms()
699#define SSLeay_add_all_ciphers() OpenSSL_add_all_ciphers() 664#define SSLeay_add_all_ciphers() OpenSSL_add_all_ciphers()
700#define SSLeay_add_all_digests() OpenSSL_add_all_digests() 665#define SSLeay_add_all_digests() OpenSSL_add_all_digests()
701 666
702int EVP_add_cipher(EVP_CIPHER *cipher); 667int EVP_add_cipher(const EVP_CIPHER *cipher);
703int EVP_add_digest(EVP_MD *digest); 668int EVP_add_digest(const EVP_MD *digest);
704 669
705const EVP_CIPHER *EVP_get_cipherbyname(const char *name); 670const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
706const EVP_MD *EVP_get_digestbyname(const char *name); 671const EVP_MD *EVP_get_digestbyname(const char *name);
@@ -714,18 +679,24 @@ int EVP_PKEY_type(int type);
714int EVP_PKEY_bits(EVP_PKEY *pkey); 679int EVP_PKEY_bits(EVP_PKEY *pkey);
715int EVP_PKEY_size(EVP_PKEY *pkey); 680int EVP_PKEY_size(EVP_PKEY *pkey);
716int EVP_PKEY_assign(EVP_PKEY *pkey,int type,char *key); 681int EVP_PKEY_assign(EVP_PKEY *pkey,int type,char *key);
717#ifndef NO_RSA 682
718int EVP_PKEY_set1_RSA(EVP_PKEY *pkey,RSA *key); 683#ifndef OPENSSL_NO_RSA
719RSA * EVP_PKEY_get1_RSA(EVP_PKEY *pkey); 684struct rsa_st;
685int EVP_PKEY_set1_RSA(EVP_PKEY *pkey,struct rsa_st *key);
686struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
720#endif 687#endif
721#ifndef NO_DSA 688#ifndef OPENSSL_NO_DSA
722int EVP_PKEY_set1_DSA(EVP_PKEY *pkey,DSA *key); 689struct dsa_st;
723DSA * EVP_PKEY_get1_DSA(EVP_PKEY *pkey); 690int EVP_PKEY_set1_DSA(EVP_PKEY *pkey,struct dsa_st *key);
691struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
724#endif 692#endif
725#ifndef NO_DH 693#ifndef OPENSSL_NO_DH
726int EVP_PKEY_set1_DH(EVP_PKEY *pkey,DH *key); 694struct dh_st;
727DH * EVP_PKEY_get1_DH(EVP_PKEY *pkey); 695int EVP_PKEY_set1_DH(EVP_PKEY *pkey,struct dh_st *key);
696struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
728#endif 697#endif
698
699
729EVP_PKEY * EVP_PKEY_new(void); 700EVP_PKEY * EVP_PKEY_new(void);
730void EVP_PKEY_free(EVP_PKEY *pkey); 701void EVP_PKEY_free(EVP_PKEY *pkey);
731EVP_PKEY * d2i_PublicKey(int type,EVP_PKEY **a, unsigned char **pp, 702EVP_PKEY * d2i_PublicKey(int type,EVP_PKEY **a, unsigned char **pp,
@@ -755,20 +726,20 @@ int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c,ASN1_TYPE *type);
755 726
756/* PKCS5 password based encryption */ 727/* PKCS5 password based encryption */
757int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, 728int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
758 ASN1_TYPE *param, EVP_CIPHER *cipher, EVP_MD *md, 729 ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md,
759 int en_de); 730 int en_de);
760int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, 731int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
761 unsigned char *salt, int saltlen, int iter, 732 unsigned char *salt, int saltlen, int iter,
762 int keylen, unsigned char *out); 733 int keylen, unsigned char *out);
763int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, 734int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
764 ASN1_TYPE *param, EVP_CIPHER *cipher, EVP_MD *md, 735 ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md,
765 int en_de); 736 int en_de);
766 737
767void PKCS5_PBE_add(void); 738void PKCS5_PBE_add(void);
768 739
769int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen, 740int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
770 ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de); 741 ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
771int EVP_PBE_alg_add(int nid, EVP_CIPHER *cipher, EVP_MD *md, 742int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
772 EVP_PBE_KEYGEN *keygen); 743 EVP_PBE_KEYGEN *keygen);
773void EVP_PBE_cleanup(void); 744void EVP_PBE_cleanup(void);
774 745
@@ -776,6 +747,7 @@ void EVP_PBE_cleanup(void);
776/* The following lines are auto generated by the script mkerr.pl. Any changes 747/* The following lines are auto generated by the script mkerr.pl. Any changes
777 * made after this point may be overwritten when the script is next run. 748 * made after this point may be overwritten when the script is next run.
778 */ 749 */
750void ERR_load_EVP_strings(void);
779 751
780/* Error codes for the EVP functions. */ 752/* Error codes for the EVP functions. */
781 753
@@ -785,6 +757,8 @@ void EVP_PBE_cleanup(void);
785#define EVP_F_EVP_CIPHER_CTX_CTRL 124 757#define EVP_F_EVP_CIPHER_CTX_CTRL 124
786#define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 758#define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122
787#define EVP_F_EVP_DECRYPTFINAL 101 759#define EVP_F_EVP_DECRYPTFINAL 101
760#define EVP_F_EVP_DIGESTINIT 128
761#define EVP_F_EVP_ENCRYPTFINAL 127
788#define EVP_F_EVP_MD_CTX_COPY 110 762#define EVP_F_EVP_MD_CTX_COPY 110
789#define EVP_F_EVP_OPENINIT 102 763#define EVP_F_EVP_OPENINIT 102
790#define EVP_F_EVP_PBE_ALG_ADD 115 764#define EVP_F_EVP_PBE_ALG_ADD 115
@@ -799,6 +773,7 @@ void EVP_PBE_cleanup(void);
799#define EVP_F_EVP_PKEY_GET1_DSA 120 773#define EVP_F_EVP_PKEY_GET1_DSA 120
800#define EVP_F_EVP_PKEY_GET1_RSA 121 774#define EVP_F_EVP_PKEY_GET1_RSA 121
801#define EVP_F_EVP_PKEY_NEW 106 775#define EVP_F_EVP_PKEY_NEW 106
776#define EVP_F_EVP_RIJNDAEL 126
802#define EVP_F_EVP_SIGNFINAL 107 777#define EVP_F_EVP_SIGNFINAL 107
803#define EVP_F_EVP_VERIFYFINAL 108 778#define EVP_F_EVP_VERIFYFINAL 108
804#define EVP_F_PKCS5_PBE_KEYIVGEN 117 779#define EVP_F_PKCS5_PBE_KEYIVGEN 117
@@ -807,12 +782,15 @@ void EVP_PBE_cleanup(void);
807#define EVP_F_RC5_CTRL 125 782#define EVP_F_RC5_CTRL 125
808 783
809/* Reason codes. */ 784/* Reason codes. */
785#define EVP_R_BAD_BLOCK_LENGTH 136
810#define EVP_R_BAD_DECRYPT 100 786#define EVP_R_BAD_DECRYPT 100
787#define EVP_R_BAD_KEY_LENGTH 137
811#define EVP_R_BN_DECODE_ERROR 112 788#define EVP_R_BN_DECODE_ERROR 112
812#define EVP_R_BN_PUBKEY_ERROR 113 789#define EVP_R_BN_PUBKEY_ERROR 113
813#define EVP_R_CIPHER_PARAMETER_ERROR 122 790#define EVP_R_CIPHER_PARAMETER_ERROR 122
814#define EVP_R_CTRL_NOT_IMPLEMENTED 132 791#define EVP_R_CTRL_NOT_IMPLEMENTED 132
815#define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED 133 792#define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED 133
793#define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138
816#define EVP_R_DECODE_ERROR 114 794#define EVP_R_DECODE_ERROR 114
817#define EVP_R_DIFFERENT_KEY_TYPES 101 795#define EVP_R_DIFFERENT_KEY_TYPES 101
818#define EVP_R_ENCODE_ERROR 115 796#define EVP_R_ENCODE_ERROR 115
@@ -827,6 +805,7 @@ void EVP_PBE_cleanup(void);
827#define EVP_R_KEYGEN_FAILURE 120 805#define EVP_R_KEYGEN_FAILURE 120
828#define EVP_R_MISSING_PARAMETERS 103 806#define EVP_R_MISSING_PARAMETERS 103
829#define EVP_R_NO_CIPHER_SET 131 807#define EVP_R_NO_CIPHER_SET 131
808#define EVP_R_NO_DIGEST_SET 139
830#define EVP_R_NO_DSA_PARAMETERS 116 809#define EVP_R_NO_DSA_PARAMETERS 116
831#define EVP_R_NO_SIGN_FUNCTION_CONFIGURED 104 810#define EVP_R_NO_SIGN_FUNCTION_CONFIGURED 104
832#define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105 811#define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105
@@ -848,4 +827,3 @@ void EVP_PBE_cleanup(void);
848} 827}
849#endif 828#endif
850#endif 829#endif
851