X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=doc%2Fcrypto%2FEVP_OpenInit.pod;h=2e710da945b0c5ffddd18def7e9ca6a45907e4a9;hb=64cee65ebc4a5a23d9f6d6f73cb25e78a80af5c2;hp=9707a4b3997d722bf8dbcc694803baa1cc5783dc;hpb=9886f420145883100ada06a1184eff195a133b39;p=oweals%2Fopenssl.git diff --git a/doc/crypto/EVP_OpenInit.pod b/doc/crypto/EVP_OpenInit.pod index 9707a4b399..2e710da945 100644 --- a/doc/crypto/EVP_OpenInit.pod +++ b/doc/crypto/EVP_OpenInit.pod @@ -10,9 +10,9 @@ EVP_OpenInit, EVP_OpenUpdate, EVP_OpenFinal - EVP envelope decryption int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek, int ekl,unsigned char *iv,EVP_PKEY *priv); - void EVP_OpenUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, + int EVP_OpenUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, unsigned char *in, int inl); - void EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, + int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); =head1 DESCRIPTION @@ -21,7 +21,7 @@ The EVP envelope routines are a high level interface to envelope decryption. They decrypt a public key encrypted symmetric key and then decrypt data using it. -EVP_OpenInit() initialises a cipher context B for decryption +EVP_OpenInit() initializes a cipher context B for decryption with cipher B. It decrypts the encrypted symmetric key of length B bytes passed in the B parameter using the private key B. The IV is supplied in the B parameter. @@ -29,20 +29,32 @@ The IV is supplied in the B parameter. EVP_OpenUpdate() and EVP_OpenFinal() have exactly the same properties as the EVP_DecryptUpdate() and EVP_DecryptFinal() routines, as documented on the L manual -page. +page. + +=head1 NOTES + +It is possible to call EVP_OpenInit() twice in the same way as +EVP_DecryptInit(). The first call should have B set to NULL +and (after setting any cipher parameters) it should be called again +with B set to NULL. + +If the cipher passed in the B parameter is a variable length +cipher then the key length will be set to the value of the recovered +key length. If the cipher is a fixed length cipher then the recovered +key length must match the fixed cipher length. =head1 RETURN VALUES -EVP_OpenInit() returns -1 on error or an non zero integer (actually the +EVP_OpenInit() returns 0 on error or a non zero integer (actually the recovered secret key size) if successful. -EVP_SealUpdate() does not return a value. +EVP_OpenUpdate() returns 1 for success or 0 for failure. -EVP_SealFinal() returns 0 if the decrypt failed or 1 for success. +EVP_OpenFinal() returns 0 if the decrypt failed or 1 for success. =head1 SEE ALSO -L,L +L, L, L, L