X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=doc%2Fman3%2FEVP_MD_fetch.pod;h=96536048bcd178863a7774905a808fe6b36287eb;hp=17481089f065db27a088f6c7f8f3e0a6b95ad06d;hb=b7c913c820a80f8534ead1dc49b569280fcb1f9a;hpb=fdf6c0b6b72756ba69be589b2aaecdd51e4ec12a diff --git a/doc/man3/EVP_MD_fetch.pod b/doc/man3/EVP_MD_fetch.pod index 17481089f0..96536048bc 100644 --- a/doc/man3/EVP_MD_fetch.pod +++ b/doc/man3/EVP_MD_fetch.pod @@ -21,13 +21,13 @@ calculate the digest of input data using functions such as L, L and L. Digest implementations may be obtained in one of three ways, i.e. implicit -lookup, explicit lookup or user defined. +fetch, explicit fetch or user defined. =over 4 -=item Implicit Lookup +=item Implicit Fetch -With implicit lookup an application can use functions such as L, +With implicit fetch an application can use functions such as L, L or L to obtain an B object. When used in a function like L the actual implementation to be used will be fetched implicitly using default search criteria. Typically, @@ -35,9 +35,9 @@ be used will be fetched implicitly using default search criteria. Typically, have been loaded), this will return an implementation of the appropriate algorithm from the default provider. -=item Explicit Lookup +=item Explicit Fetch -With explicit lookup an application uses the EVP_MD_fetch() function to obtain +With explicit fetch an application uses the EVP_MD_fetch() function to obtain an algorithm implementation. An implementation with the given name and satisfying the search criteria specified in the B parameter will be looked for within the available providers and returned. See L @@ -83,6 +83,18 @@ The return value from a call to EVP_MD_fetch() must be freed by the caller using L. Note that EVP_MD objects are reference counted. See L. +=head1 NOTES + +Where an application that previously used implicit fetch is converted to use +explicit fetch care should be taken with the L function. +Specifically, this function returns the EVP_MD object orginally passed to +EVP_DigestInit_ex() (or other similar function). With implicit fetch the +returned EVP_MD object is guaranteed to be available throughout the application +lifetime. However, with explicit fetch EVP_MD objects are reference counted. +EVP_MD_CTX_md does not increment the reference count and so the returned EVP_MD +object may not be accessible beyond the lifetime of the EVP_MD_CTX it is +associated with. + =head1 RETURN VALUES EVP_MD_fetch() returns a pointer to the algorithm implementation represented by