2 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
59 #ifndef HEADER_ENVELOPE_H
60 #define HEADER_ENVELOPE_H
72 #if !defined(NO_SHA) || !defined(NO_SHA1)
94 #define EVP_RC2_KEY_SIZE 16
95 #define EVP_RC4_KEY_SIZE 16
96 #define EVP_BLOWFISH_KEY_SIZE 16
97 #define EVP_MAX_MD_SIZE 20
98 #define EVP_MAX_KEY_LENGTH 24
99 #define EVP_MAX_IV_LENGTH 8
121 #define EVP_PK_RSA 0x0001
122 #define EVP_PK_DSA 0x0002
123 #define EVP_PK_DH 0x0004
124 #define EVP_PKT_SIGN 0x0010
125 #define EVP_PKT_ENC 0x0020
126 #define EVP_PKT_EXCH 0x0040
127 #define EVP_PKS_RSA 0x0100
128 #define EVP_PKS_DSA 0x0200
129 #define EVP_PKT_EXP 0x1000 /* <= 512 bit key */
131 #define EVP_PKEY_NONE NID_undef
132 #define EVP_PKEY_RSA NID_rsaEncryption
133 #define EVP_PKEY_RSA2 NID_rsa
134 #define EVP_PKEY_DSA NID_dsa
135 #define EVP_PKEY_DSA2 NID_dsaWithSHA
136 #define EVP_PKEY_DSA3 NID_dsaWithSHA1
137 #define EVP_PKEY_DH NID_dhKeyAgreement
139 typedef struct evp_pkey_st
146 struct rsa_st *rsa; /* RSA */
147 struct dsa_st *dsa; /* DSA */
148 struct dh_st *dh; /* DH */
151 #ifdef HEADER_STACK_H
152 STACK /* X509_ATTRIBUTE */ *attributes; /* [ 0 ] */
154 char /* X509_ATTRIBUTE */ *attributes; /* [ 0 ] */
159 typedef struct env_md_st
170 int required_pkey_type[4]; /*EVP_PKEY_xxx */
173 #define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0}
176 #define EVP_PKEY_DSA_method DSA_sign,DSA_verify, \
177 {EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3,0}
179 #define EVP_PKEY_DSA_method EVP_PKEY_NULL_method
183 #define EVP_PKEY_RSA_method RSA_sign,RSA_verify, \
184 {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0}
185 #define EVP_PKEY_RSA_ASN1_OCTET_STRING_method \
186 RSA_sign_ASN1_OCTET_STRING, \
187 RSA_verify_ASN1_OCTET_STRING, \
188 {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0}
190 #define EVP_PKEY_RSA_method EVP_PKEY_NULL_method
191 #define EVP_PKEY_RSA_ASN1_OCTET_STRING_method EVP_PKEY_NULL_method
196 typedef struct env_md_ctx_st
200 unsigned char base[4];
207 #if !defined(NO_SHA) || !defined(NO_SHA1)
216 typedef struct evp_cipher_st
222 void (*init)(); /* init for encryption */
223 void (*do_cipher)(); /* encrypt data */
224 void (*cleanup)(); /* used by cipher method */
227 typedef struct evp_cipher_info_st
230 unsigned char iv[EVP_MAX_IV_LENGTH];
233 typedef struct evp_cipher_ctx_st
236 int encrypt; /* encrypt or decrypt */
237 int buf_len; /* number we have left */
238 unsigned char buf[8];
239 char *app_data; /* aplication stuff */
244 unsigned char key[EVP_RC4_KEY_SIZE];
245 RC4_KEY ks; /* working key */
251 des_key_schedule ks;/* key schedule */
256 C_Block oiv; /* original iv */
257 C_Block iv; /* working iv */
258 des_key_schedule ks;/* key schedule */
263 C_Block oiv; /* original iv */
264 C_Block iv; /* working iv */
267 des_key_schedule ks;/* key schedule */
272 C_Block oiv; /* original iv */
273 C_Block iv; /* working iv */
274 des_key_schedule ks;/* key schedule */
275 des_key_schedule ks2;/* key schedule (for ede) */
276 des_key_schedule ks3;/* key schedule (for ede3) */
277 int num; /* used by cfb mode */
282 C_Block oiv; /* original iv */
283 C_Block iv; /* working iv */
284 des_key_schedule ks1;/* ksched 1 */
285 des_key_schedule ks2;/* ksched 2 */
286 des_key_schedule ks3;/* ksched 3 */
292 IDEA_KEY_SCHEDULE ks;/* key schedule */
296 unsigned char oiv[8];/* original iv */
297 unsigned char iv[8]; /* working iv */
298 IDEA_KEY_SCHEDULE ks;/* key schedule */
302 unsigned char oiv[8];/* original iv */
303 unsigned char iv[8]; /* working iv */
304 IDEA_KEY_SCHEDULE ks;/* key schedule */
305 int num; /* used by cfb mode */
311 RC2_KEY ks;/* key schedule */
315 unsigned char oiv[8];/* original iv */
316 unsigned char iv[8]; /* working iv */
317 RC2_KEY ks;/* key schedule */
321 unsigned char oiv[8];/* original iv */
322 unsigned char iv[8]; /* working iv */
323 RC2_KEY ks;/* key schedule */
324 int num; /* used by cfb mode */
330 BF_KEY ks;/* key schedule */
334 unsigned char oiv[8];/* original iv */
335 unsigned char iv[8]; /* working iv */
336 BF_KEY ks;/* key schedule */
340 unsigned char oiv[8];/* original iv */
341 unsigned char iv[8]; /* working iv */
342 BF_KEY ks;/* key schedule */
343 int num; /* used by cfb mode */
349 typedef struct evp_Encode_Ctx_st
351 int num; /* number saved in a partial encode/decode */
352 int length; /* The length is either the output line length
353 * (in input bytes) or the shortest input line
354 * length that is ok. Once decoding begins,
355 * the length is adjusted up each time a longer
357 unsigned char enc_data[80]; /* data to encode */
358 int line_num; /* number read on current line */
361 #define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\
363 #define EVP_PKEY_assign_DSA(pkey,dsa) EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\
365 #define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,\
368 /* Add some extra combinations */
369 #define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a))
370 #define EVP_get_digestbyobj(a) EVP_get_digestbynid(OBJ_obj2nid(a))
371 #define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a))
372 #define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a))
374 #define EVP_MD_type(e) ((e)->type)
375 #define EVP_MD_pkey_type(e) ((e)->pkey_type)
376 #define EVP_MD_size(e) ((e)->md_size)
377 #define EVP_MD_CTX_size(e) ((e)->digest->md_size)
378 #define EVP_MD_CTX_type(e) ((e)->digest)
380 #define EVP_CIPHER_nid(e) ((e)->nid)
381 #define EVP_CIPHER_block_size(e) ((e)->block_size)
382 #define EVP_CIPHER_key_length(e) ((e)->key_len)
383 #define EVP_CIPHER_iv_length(e) ((e)->iv_len)
385 #define EVP_CIPHER_CTX_cipher(e) ((e)->cipher)
386 #define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid)
387 #define EVP_CIPHER_CTX_block_size(e) ((e)->cipher->block_size)
388 #define EVP_CIPHER_CTX_key_length(e) ((e)->cipher->key_len)
389 #define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len)
390 #define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data)
391 #define EVP_CIPHER_CTX_set_app_data(e,d) ((e)->app_data=(char *)(d))
393 #define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80)
394 #define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80)
396 #define EVP_SignInit(a,b) EVP_DigestInit(a,b)
397 #define EVP_SignUpdate(a,b,c) EVP_DigestUpdate(a,b,c)
398 #define EVP_VerifyInit(a,b) EVP_DigestInit(a,b)
399 #define EVP_VerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c)
400 #define EVP_OpenUpdate(a,b,c,d,e) EVP_DecryptUpdate(a,b,c,d,e)
401 #define EVP_SealUpdate(a,b,c,d,e) EVP_EncryptUpdate(a,b,c,d,e)
403 #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,0,(char *)md)
404 #define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp)
405 #define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp)
406 #define BIO_get_cipher_status(b) BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL)
408 #define EVP_Cipher(c,o,i,l) (c)->cipher->do_cipher((c),(o),(i),(l))
412 void EVP_DigestInit(EVP_MD_CTX *ctx, EVP_MD *type);
413 void EVP_DigestUpdate(EVP_MD_CTX *ctx,unsigned char *d,unsigned int cnt);
414 void EVP_DigestFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s);
416 int EVP_read_pw_string(char *buf,int length,char *prompt,int verify);
417 void EVP_set_pw_prompt(char *prompt);
418 char * EVP_get_pw_prompt(void);
420 int EVP_BytesToKey(EVP_CIPHER *type,EVP_MD *md,unsigned char *salt,
421 unsigned char *data, int datal, int count,
422 unsigned char *key,unsigned char *iv);
424 EVP_CIPHER *EVP_get_cipherbyname(char *name);
426 void EVP_EncryptInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,
427 unsigned char *key, unsigned char *iv);
428 void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
429 int *outl, unsigned char *in, int inl);
430 void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
432 void EVP_DecryptInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,
433 unsigned char *key, unsigned char *iv);
434 void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
435 int *outl, unsigned char *in, int inl);
436 int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
438 void EVP_CipherInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type, unsigned char *key,
439 unsigned char *iv,int enc);
440 void EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
441 int *outl, unsigned char *in, int inl);
442 int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
444 int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s,
447 int EVP_VerifyFinal(EVP_MD_CTX *ctx,unsigned char *sigbuf,
448 unsigned int siglen,EVP_PKEY *pkey);
450 int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek,
451 int ekl,unsigned char *iv,EVP_PKEY *priv);
452 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
454 int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek,
455 int *ekl, unsigned char *iv,EVP_PKEY **pubk, int npubk);
456 void EVP_SealFinal(EVP_CIPHER_CTX *ctx,unsigned char *out,int *outl);
458 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
459 void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,
460 int *outl,unsigned char *in,int inl);
461 void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl);
462 int EVP_EncodeBlock(unsigned char *t, unsigned char *f, int n);
464 void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
465 int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl,
466 unsigned char *in, int inl);
467 int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
468 char *out, int *outl);
469 int EVP_DecodeBlock(unsigned char *t, unsigned
472 void ERR_load_EVP_strings(void );
474 void EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
477 BIO_METHOD *BIO_f_md(void);
478 BIO_METHOD *BIO_f_base64(void);
479 BIO_METHOD *BIO_f_cipher(void);
480 void BIO_set_cipher(BIO *b,EVP_CIPHER *c,unsigned char *k,
481 unsigned char *i, int enc);
484 EVP_MD *EVP_md_null(void);
485 EVP_MD *EVP_md2(void);
486 EVP_MD *EVP_md5(void);
487 EVP_MD *EVP_sha(void);
488 EVP_MD *EVP_sha1(void);
489 EVP_MD *EVP_dss(void);
490 EVP_MD *EVP_dss1(void);
491 EVP_MD *EVP_mdc2(void);
493 EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */
494 EVP_CIPHER *EVP_des_ecb(void);
495 EVP_CIPHER *EVP_des_ede(void);
496 EVP_CIPHER *EVP_des_ede3(void);
497 EVP_CIPHER *EVP_des_cfb(void);
498 EVP_CIPHER *EVP_des_ede_cfb(void);
499 EVP_CIPHER *EVP_des_ede3_cfb(void);
500 EVP_CIPHER *EVP_des_ofb(void);
501 EVP_CIPHER *EVP_des_ede_ofb(void);
502 EVP_CIPHER *EVP_des_ede3_ofb(void);
503 EVP_CIPHER *EVP_des_cbc(void);
504 EVP_CIPHER *EVP_des_ede_cbc(void);
505 EVP_CIPHER *EVP_des_ede3_cbc(void);
506 EVP_CIPHER *EVP_desx_cbc(void);
507 EVP_CIPHER *EVP_rc4(void);
508 EVP_CIPHER *EVP_idea_ecb(void);
509 EVP_CIPHER *EVP_idea_cfb(void);
510 EVP_CIPHER *EVP_idea_ofb(void);
511 EVP_CIPHER *EVP_idea_cbc(void);
512 EVP_CIPHER *EVP_rc2_ecb(void);
513 EVP_CIPHER *EVP_rc2_cbc(void);
514 EVP_CIPHER *EVP_rc2_cfb(void);
515 EVP_CIPHER *EVP_rc2_ofb(void);
516 EVP_CIPHER *EVP_bf_ecb(void);
517 EVP_CIPHER *EVP_bf_cbc(void);
518 EVP_CIPHER *EVP_bf_cfb(void);
519 EVP_CIPHER *EVP_bf_ofb(void);
521 void SSLeay_add_all_algorithms(void);
522 void SSLeay_add_all_ciphers(void);
523 void SSLeay_add_all_digests(void);
525 int EVP_add_cipher(EVP_CIPHER *cipher);
526 int EVP_add_digest(EVP_MD *digest);
527 int EVP_add_alias(char *name,char *alias);
528 int EVP_delete_alias(char *name);
530 EVP_CIPHER *EVP_get_cipherbyname(char *name);
531 EVP_MD *EVP_get_digestbyname(char *name);
532 void EVP_cleanup(void);
534 int EVP_PKEY_type(int type);
535 int EVP_PKEY_size(EVP_PKEY *pkey);
536 int EVP_PKEY_assign(EVP_PKEY *pkey,int type,char *key);
537 EVP_PKEY * EVP_PKEY_new(void);
538 void EVP_PKEY_free(EVP_PKEY *pkey);
539 EVP_PKEY * d2i_PublicKey(int type,EVP_PKEY **a, unsigned char **pp,
541 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
543 EVP_PKEY * d2i_PrivateKey(int type,EVP_PKEY **a, unsigned char **pp,
545 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
547 int EVP_PKEY_copy_parameters(EVP_PKEY *to,EVP_PKEY *from);
548 int EVP_PKEY_missing_parameters(EVP_PKEY *pkey);
549 int EVP_PKEY_save_parameters(EVP_PKEY *pkey,int mode);
553 void EVP_DigestInit();
554 void EVP_DigestUpdate();
555 void EVP_DigestFinal();
557 int EVP_read_pw_string();
558 void EVP_set_pw_prompt();
559 char * EVP_get_pw_prompt();
561 int EVP_BytesToKey();
563 EVP_CIPHER *EVP_get_cipherbyname();
565 void EVP_EncryptInit();
566 void EVP_EncryptUpdate();
567 void EVP_EncryptFinal();
569 void EVP_DecryptInit();
570 void EVP_DecryptUpdate();
571 int EVP_DecryptFinal();
573 void EVP_CipherInit();
574 void EVP_CipherUpdate();
575 int EVP_CipherFinal();
579 int EVP_VerifyFinal();
585 void EVP_SealFinal();
587 void EVP_EncodeInit();
588 void EVP_EncodeUpdate();
589 void EVP_EncodeFinal();
590 int EVP_EncodeBlock();
592 void EVP_DecodeInit();
593 int EVP_DecodeUpdate();
594 int EVP_DecodeFinal();
595 int EVP_DecodeBlock();
597 void ERR_load_EVP_strings();
599 void EVP_CIPHER_CTX_cleanup();
602 BIO_METHOD *BIO_f_md();
603 BIO_METHOD *BIO_f_base64();
604 BIO_METHOD *BIO_f_cipher();
605 void BIO_set_cipher();
608 EVP_MD *EVP_md_null();
617 EVP_CIPHER *EVP_enc_null();
618 EVP_CIPHER *EVP_des_ecb();
619 EVP_CIPHER *EVP_des_ede();
620 EVP_CIPHER *EVP_des_ede3();
621 EVP_CIPHER *EVP_des_cfb();
622 EVP_CIPHER *EVP_des_ede_cfb();
623 EVP_CIPHER *EVP_des_ede3_cfb();
624 EVP_CIPHER *EVP_des_ofb();
625 EVP_CIPHER *EVP_des_ede_ofb();
626 EVP_CIPHER *EVP_des_ede3_ofb();
627 EVP_CIPHER *EVP_des_cbc();
628 EVP_CIPHER *EVP_des_ede_cbc();
629 EVP_CIPHER *EVP_des_ede3_cbc();
630 EVP_CIPHER *EVP_desx_cbc();
631 EVP_CIPHER *EVP_rc4();
632 EVP_CIPHER *EVP_idea_ecb();
633 EVP_CIPHER *EVP_idea_cfb();
634 EVP_CIPHER *EVP_idea_ofb();
635 EVP_CIPHER *EVP_idea_cbc();
636 EVP_CIPHER *EVP_rc2_ecb();
637 EVP_CIPHER *EVP_rc2_cbc();
638 EVP_CIPHER *EVP_rc2_cfb();
639 EVP_CIPHER *EVP_rc2_ofb();
640 EVP_CIPHER *EVP_bf_ecb();
641 EVP_CIPHER *EVP_bf_cbc();
642 EVP_CIPHER *EVP_bf_cfb();
643 EVP_CIPHER *EVP_bf_ofb();
645 void SSLeay_add_all_algorithms();
646 void SSLeay_add_all_ciphers();
647 void SSLeay_add_all_digests();
649 int EVP_add_cipher();
650 int EVP_add_digest();
652 int EVP_delete_alias();
654 EVP_CIPHER *EVP_get_cipherbyname();
655 EVP_MD *EVP_get_digestbyname();
660 int EVP_PKEY_assign();
661 EVP_PKEY * EVP_PKEY_new();
662 void EVP_PKEY_free();
663 EVP_PKEY * d2i_PublicKey();
666 EVP_PKEY * d2i_PrivateKey();
667 int i2d_PrivateKey();
669 int EVP_PKEY_copy_parameters();
670 int EVP_PKEY_missing_parameters();
671 int EVP_PKEY_save_parameters();
675 /* BEGIN ERROR CODES */
676 /* Error codes for the EVP functions. */
678 /* Function codes. */
679 #define EVP_F_D2I_PKEY 100
680 #define EVP_F_EVP_DECRYPTFINAL 101
681 #define EVP_F_EVP_OPENINIT 102
682 #define EVP_F_EVP_PKEY_COPY_PARAMETERS 103
683 #define EVP_F_EVP_PKEY_NEW 104
684 #define EVP_F_EVP_SEALINIT 105
685 #define EVP_F_EVP_SIGNFINAL 106
686 #define EVP_F_EVP_VERIFYFINAL 107
689 #define EVP_R_BAD_DECRYPT 100
690 #define EVP_R_DIFFERENT_KEY_TYPES 101
691 #define EVP_R_IV_TOO_LARGE 102
692 #define EVP_R_MISSING_PARMATERS 103
693 #define EVP_R_NO_SIGN_FUNCTION_CONFIGURED 104
694 #define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105
695 #define EVP_R_PUBLIC_KEY_NOT_RSA 106
696 #define EVP_R_UNSUPPORTED_CIPHER 107
697 #define EVP_R_WRONG_FINAL_BLOCK_LENGTH 108
698 #define EVP_R_WRONG_PUBLIC_KEY_TYPE 109