return failure code if I/O error
[oweals/openssl.git] / crypto / cms / cms.h
index ee1b406bddcb059be3b64d8be01955056564bfb0..25f88745f23e86e76f9aa854f451e554f76617b6 100644 (file)
@@ -130,7 +130,7 @@ int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
 CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
 int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
 
-int CMS_final(CMS_ContentInfo *cms, BIO *data, int flags);
+int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags);
 
 CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
                                                BIO *data, unsigned int flags);
@@ -172,7 +172,7 @@ CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
                                const EVP_CIPHER *cipher, unsigned int flags);
 
 int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
-                               BIO *data, BIO *dcont,
+                               BIO *dcont, BIO *out,
                                unsigned int flags);
        
 int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
@@ -390,9 +390,9 @@ void ERR_load_CMS_strings(void);
 
 /* Reason codes. */
 #define CMS_R_ADD_SIGNER_ERROR                          99
+#define CMS_R_CERTIFICATE_ALREADY_PRESENT               175
 #define CMS_R_CERTIFICATE_HAS_NO_KEYID                  160
 #define CMS_R_CERTIFICATE_VERIFY_ERROR                  100
-#define CMS_R_CERTIFICTATE_ALREADY_PRESENT              175
 #define CMS_R_CIPHER_INITIALISATION_ERROR               101
 #define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR     102
 #define CMS_R_CMS_DATAFINAL_ERROR                       103