DOC: fix documentation of som EVP_MD_CTX functions
[openssl.git] / doc / man3 / EVP_DigestInit.pod
1 =pod
2
3 =head1 NAME
4
5 EVP_MD_fetch, EVP_MD_up_ref, EVP_MD_free,
6 EVP_MD_get_params, EVP_MD_gettable_params,
7 EVP_MD_CTX_new, EVP_MD_CTX_reset, EVP_MD_CTX_free, EVP_MD_CTX_copy,
8 EVP_MD_CTX_copy_ex, EVP_MD_CTX_ctrl,
9 EVP_MD_CTX_set_params, EVP_MD_CTX_get_params,
10 EVP_MD_CTX_settable_params, EVP_MD_CTX_gettable_params,
11 EVP_MD_CTX_set_flags, EVP_MD_CTX_clear_flags, EVP_MD_CTX_test_flags,
12 EVP_Digest, EVP_DigestInit_ex, EVP_DigestInit, EVP_DigestUpdate,
13 EVP_DigestFinal_ex, EVP_DigestFinalXOF, EVP_DigestFinal,
14 EVP_MD_name, EVP_MD_provider,
15 EVP_MD_type, EVP_MD_pkey_type, EVP_MD_size, EVP_MD_block_size, EVP_MD_flags,
16 EVP_MD_CTX_name,
17 EVP_MD_CTX_md, EVP_MD_CTX_type, EVP_MD_CTX_size, EVP_MD_CTX_block_size,
18 EVP_MD_CTX_md_data, EVP_MD_CTX_update_fn, EVP_MD_CTX_set_update_fn,
19 EVP_md_null,
20 EVP_get_digestbyname, EVP_get_digestbynid, EVP_get_digestbyobj,
21 EVP_MD_CTX_pkey_ctx, EVP_MD_CTX_set_pkey_ctx,
22 EVP_MD_do_all_ex
23 - EVP digest routines
24
25 =head1 SYNOPSIS
26
27  #include <openssl/evp.h>
28
29  EVP_MD *EVP_MD_fetch(OPENSSL_CTX *ctx, const char *algorithm,
30                       const char *properties);
31  int EVP_MD_up_ref(EVP_MD *md);
32  void EVP_MD_free(EVP_MD *md);
33  int EVP_MD_get_params(const EVP_MD *digest, OSSL_PARAM params[]);
34  const OSSL_PARAM *EVP_MD_gettable_params(const EVP_MD *digest);
35  EVP_MD_CTX *EVP_MD_CTX_new(void);
36  int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
37  void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
38  void EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void* p2);
39  int EVP_MD_CTX_get_params(EVP_MD_CTX *ctx, OSSL_PARAM params[]);
40  int EVP_MD_CTX_set_params(EVP_MD_CTX *ctx, const OSSL_PARAM params[]);
41  const OSSL_PARAM *EVP_MD_CTX_settable_params(const EVP_MD *digest);
42  const OSSL_PARAM *EVP_MD_CTX_gettable_params(const EVP_MD *digest);
43  void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
44  void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
45  int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
46
47  int EVP_Digest(const void *data, size_t count, unsigned char *md,
48                 unsigned int *size, const EVP_MD *type, ENGINE *impl);
49  int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
50  int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
51  int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
52  int EVP_DigestFinalXOF(EVP_MD_CTX *ctx, unsigned char *md, size_t len);
53
54  int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
55
56  int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
57  int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
58
59  int EVP_MD_CTX_copy(EVP_MD_CTX *out, EVP_MD_CTX *in);
60
61  const char *EVP_MD_name(const EVP_MD *md);
62  const OSSL_PROVIDER *EVP_MD_provider(const EVP_MD *md);
63  int EVP_MD_type(const EVP_MD *md);
64  int EVP_MD_pkey_type(const EVP_MD *md);
65  int EVP_MD_size(const EVP_MD *md);
66  int EVP_MD_block_size(const EVP_MD *md);
67  unsigned long EVP_MD_flags(const EVP_MD *md);
68
69  const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
70  const char *EVP_MD_CTX_name(const EVP_MD_CTX *ctx);
71  int EVP_MD_CTX_size(const EVP_MD_CTX *ctx);
72  int EVP_MD_CTX_block_size(const EVP_MD_CTX *ctx);
73  int EVP_MD_CTX_type(const EVP_MD_CTX *ctx);
74  void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx);
75  int (*EVP_MD_CTX_update_fn(EVP_MD_CTX *ctx))(EVP_MD_CTX *ctx,
76                                               const void *data, size_t count);
77  void EVP_MD_CTX_set_update_fn(EVP_MD_CTX *ctx,
78                                int (*update)(EVP_MD_CTX *ctx,
79                                              const void *data, size_t count));
80
81  const EVP_MD *EVP_md_null(void);
82
83  const EVP_MD *EVP_get_digestbyname(const char *name);
84  const EVP_MD *EVP_get_digestbynid(int type);
85  const EVP_MD *EVP_get_digestbyobj(const ASN1_OBJECT *o);
86
87  EVP_PKEY_CTX *EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx);
88  void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx);
89
90  void EVP_MD_do_all_ex(OPENSSL_CTX *libctx,
91                        void (*fn)(EVP_MD *mac, void *arg),
92                        void *arg);
93
94 =head1 DESCRIPTION
95
96 The EVP digest routines are a high level interface to message digests,
97 and should be used instead of the digest-specific functions.
98
99 The B<EVP_MD> type is a structure for digest method implementation.
100
101 =over 4
102
103 =item EVP_MD_fetch()
104
105 Fetches the digest implementation for the given B<algorithm> from any
106 provider offering it, within the criteria given by the B<properties>.
107 See L<provider(7)/Fetching algorithms> for further information.
108
109 The returned value must eventually be freed with EVP_MD_free().
110
111 Fetched B<EVP_MD> structures are reference counted.
112
113 =item EVP_MD_up_ref()
114
115 Increments the reference count for an B<EVP_MD> structure.
116
117 =item EVP_MD_free()
118
119 Decrements the reference count for the fetched B<EVP_MD> structure.
120 If the reference count drops to 0 then the structure is freed.
121
122 =item EVP_MD_CTX_new()
123
124 Allocates and returns a digest context.
125
126 =item EVP_MD_CTX_reset()
127
128 Resets the digest context B<ctx>.  This can be used to reuse an already
129 existing context.
130
131 =item EVP_MD_CTX_free()
132
133 Cleans up digest context B<ctx> and frees up the space allocated to it.
134
135 =item EVP_MD_CTX_ctrl()
136
137 This is a legacy method. EVP_MD_CTX_set_params() and EVP_MD_CTX_get_params()
138 is the mechanism that should be used to set and get parameters that are used by
139 providers.
140 Performs digest-specific control actions on context B<ctx>. The control command
141 is indicated in B<cmd> and any additional arguments in B<p1> and B<p2>.
142 EVP_MD_CTX_ctrl() must be called after EVP_DigestInit_ex(). Other restrictions
143 may apply depending on the control type and digest implementation.
144 See L</CONTROLS> below for more information.
145
146 =item EVP_MD_get_params()
147
148 Retrieves the requested list of B<params> from a MD B<md>.
149 See L</PARAMETERS> below for more information.
150
151 =item EVP_MD_CTX_get_params()
152
153 Retrieves the requested list of B<params> from a MD context B<ctx>.
154 See L</PARAMETERS> below for more information.
155
156 =item EVP_MD_CTX_set_params()
157
158 Sets the list of B<params> into a MD context B<ctx>.
159 See L</PARAMETERS> below for more information.
160
161 =item EVP_MD_gettable_params(), EVP_MD_CTX_gettable_params(),
162 EVP_MD_CTX_settable_params()
163
164 Get a B<OSSL_PARAM> array that describes the retrievable and settable
165 parameters, i.e. parameters that can be used with EVP_MD_get_params(),
166 EVP_MD_CTX_get_params() and EVP_MD_CTX_set_params(), respectively.
167 See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
168
169 =item EVP_MD_CTX_set_flags(), EVP_MD_CTX_clear_flags(), EVP_MD_CTX_test_flags()
170
171 Sets, clears and tests B<ctx> flags.  See L</FLAGS> below for more information.
172
173 =item EVP_Digest()
174
175 A wrapper around the Digest Init_ex, Update and Final_ex functions.
176 Hashes B<count> bytes of data at B<data> using a digest B<type> from ENGINE
177 B<impl>. The digest value is placed in B<md> and its length is written at B<size>
178 if the pointer is not NULL. At most B<EVP_MAX_MD_SIZE> bytes will be written.
179 If B<impl> is NULL the default implementation of digest B<type> is used.
180
181 =item EVP_DigestInit_ex()
182
183 Sets up digest context B<ctx> to use a digest B<type>.
184 B<type> is typically supplied by a function such as EVP_sha1(), or a
185 value explicitly fetched with EVP_MD_fetch().
186
187 If B<impl> is non-NULL, its implementation of the digest B<type> is used if
188 there is one, and if not, the default implementation is used.
189
190 =item EVP_DigestUpdate()
191
192 Hashes B<cnt> bytes of data at B<d> into the digest context B<ctx>. This
193 function can be called several times on the same B<ctx> to hash additional
194 data.
195
196 =item EVP_DigestFinal_ex()
197
198 Retrieves the digest value from B<ctx> and places it in B<md>. If the B<s>
199 parameter is not NULL then the number of bytes of data written (i.e. the
200 length of the digest) will be written to the integer at B<s>, at most
201 B<EVP_MAX_MD_SIZE> bytes will be written.  After calling EVP_DigestFinal_ex()
202 no additional calls to EVP_DigestUpdate() can be made, but
203 EVP_DigestInit_ex() can be called to initialize a new digest operation.
204
205 =item EVP_DigestFinalXOF()
206
207 Interfaces to extendable-output functions, XOFs, such as SHAKE128 and SHAKE256.
208 It retrieves the digest value from B<ctx> and places it in B<len>-sized <B>md.
209 After calling this function no additional calls to EVP_DigestUpdate() can be
210 made, but EVP_DigestInit_ex() can be called to initialize a new operation.
211
212 =item EVP_MD_CTX_copy_ex()
213
214 Can be used to copy the message digest state from B<in> to B<out>. This is
215 useful if large amounts of data are to be hashed which only differ in the last
216 few bytes.
217
218 =item EVP_DigestInit()
219
220 Behaves in the same way as EVP_DigestInit_ex() except it always uses the
221 default digest implementation.
222
223 =item EVP_DigestFinal()
224
225 Similar to EVP_DigestFinal_ex() except the digest context B<ctx> is
226 automatically cleaned up.
227
228 =item EVP_MD_CTX_copy()
229
230 Similar to EVP_MD_CTX_copy_ex() except the destination B<out> does not have to
231 be initialized.
232
233 =item EVP_MD_name(),
234 EVP_MD_CTX_name()
235
236 Return the name of the given message digest.
237
238 =item EVP_MD_provider()
239
240 Returns an B<OSSL_PROVIDER> pointer to the provider that implements the given
241 B<EVP_MD>.
242
243 =item EVP_MD_size(),
244 EVP_MD_CTX_size()
245
246 Return the size of the message digest when passed an B<EVP_MD> or an
247 B<EVP_MD_CTX> structure, i.e. the size of the hash.
248
249 =item EVP_MD_block_size(),
250 EVP_MD_CTX_block_size()
251
252 Return the block size of the message digest when passed an B<EVP_MD> or an
253 B<EVP_MD_CTX> structure.
254
255 =item EVP_MD_type(),
256 EVP_MD_CTX_type()
257
258 Return the NID of the OBJECT IDENTIFIER representing the given message digest
259 when passed an B<EVP_MD> structure.  For example, C<EVP_MD_type(EVP_sha1())>
260 returns B<NID_sha1>. This function is normally used when setting ASN1 OIDs.
261
262 =item EVP_MD_CTX_md_data()
263
264 Return the digest method private data for the passed B<EVP_MD_CTX>.
265 The space is allocated by OpenSSL and has the size originally set with
266 EVP_MD_meth_set_app_datasize().
267
268 =item EVP_MD_CTX_md()
269
270 Returns the B<EVP_MD> structure corresponding to the passed B<EVP_MD_CTX>. This
271 will be the same B<EVP_MD> object originally passed to EVP_DigestInit_ex() (or
272 other similar function) when the EVP_MD_CTX was first initialised. Note that
273 where explicit fetch is in use (see L<EVP_MD_fetch(3)>) the value returned from
274 this function will not have its reference count incremented and therefore it
275 should not be used after the EVP_MD_CTX is freed.
276
277 =item EVP_MD_CTX_set_update_fn()
278
279 Sets the update function for B<ctx> to B<update>.
280 This is the function that is called by EVP_DigestUpdate. If not set, the
281 update function from the B<EVP_MD> type specified at initialization is used.
282
283 =item EVP_MD_CTX_update_fn()
284
285 Returns the update function for B<ctx>.
286
287 =item EVP_MD_flags()
288
289 Returns the B<md> flags. Note that these are different from the B<EVP_MD_CTX>
290 ones. See L<EVP_MD_meth_set_flags(3)> for more information.
291
292 =item EVP_MD_pkey_type()
293
294 Returns the NID of the public key signing algorithm associated with this
295 digest. For example EVP_sha1() is associated with RSA so this will return
296 B<NID_sha1WithRSAEncryption>. Since digests and signature algorithms are no
297 longer linked this function is only retained for compatibility reasons.
298
299 =item EVP_md_null()
300
301 A "null" message digest that does nothing: i.e. the hash it returns is of zero
302 length.
303
304 =item EVP_get_digestbyname(),
305 EVP_get_digestbynid(),
306 EVP_get_digestbyobj()
307
308 Returns an B<EVP_MD> structure when passed a digest name, a digest B<NID> or an
309 B<ASN1_OBJECT> structure respectively.
310
311 =item EVP_MD_CTX_pkey_ctx()
312
313 Returns the B<EVP_PKEY_CTX> assigned to B<ctx>. The returned pointer should not
314 be freed by the caller.
315
316 =item EVP_MD_CTX_set_pkey_ctx()
317
318 Assigns an B<EVP_PKEY_CTX> to B<EVP_MD_CTX>. This is usually used to provide
319 a customized B<EVP_PKEY_CTX> to L<EVP_DigestSignInit(3)> or
320 L<EVP_DigestVerifyInit(3)>. The B<pctx> passed to this function should be freed
321 by the caller. A NULL B<pctx> pointer is also allowed to clear the B<EVP_PKEY_CTX>
322 assigned to B<ctx>. In such case, freeing the cleared B<EVP_PKEY_CTX> or not
323 depends on how the B<EVP_PKEY_CTX> is created.
324
325 =item EVP_MD_do_all_ex()
326
327 Traverses all messages digests implemented by all activated providers
328 in the given library context I<libctx>, and for each of the implementations,
329 calls the given function I<fn> with the implementation method and the given
330 I<arg> as argument.
331
332 =back
333
334 =head1 PARAMETERS
335
336 See L<OSSL_PARAM(3)> for information about passing parameters.
337
338 EVP_MD_CTX_set_params() can be used with the following OSSL_PARAM keys:
339
340 =over 4
341
342 =item OSSL_PARAM_DIGEST_KEY_XOFLEN <unsigned integer>
343
344 Sets the digest length for extendable output functions.
345 It is used by the SHAKE algorithm and should not exceed what can be given
346 using a B<size_t>.
347
348 =item OSSL_PARAM_DIGEST_KEY_PAD_TYPE <integer>
349
350 Sets the pad type.
351 It is used by the MDC2 algorithm.
352
353 =back
354
355 EVP_MD_CTX_get_params() can be used with the following OSSL_PARAM keys:
356
357 =over 4
358
359 =item OSSL_PARAM_DIGEST_KEY_MICALG <UTF8 string>.
360
361 Gets the digest Message Integrity Check algorithm string. This is used when
362 creating S/MIME multipart/signed messages, as specified in RFC 3851.
363 It may be used by external engines or providers.
364
365 =back
366
367 =head1 CONTROLS
368
369 EVP_MD_CTX_ctrl() can be used to send the following standard controls:
370
371 =over 4
372
373 =item EVP_MD_CTRL_MICALG
374
375 Gets the digest Message Integrity Check algorithm string. This is used when
376 creating S/MIME multipart/signed messages, as specified in RFC 3851.
377 The string value is written to B<p2>.
378
379 =item EVP_MD_CTRL_XOF_LEN
380
381 This control sets the digest length for extendable output functions to B<p1>.
382 Sending this control directly should not be necessary, the use of
383 C<EVP_DigestFinalXOF()> is preferred.
384 Currently used by SHAKE.
385
386 =back
387
388 =head1 FLAGS
389
390 EVP_MD_CTX_set_flags(), EVP_MD_CTX_clear_flags() and EVP_MD_CTX_test_flags()
391 can be used the manipulate and test these B<EVP_MD_CTX> flags:
392
393 =over 4
394
395 =item EVP_MD_CTX_FLAG_ONESHOT
396
397 This flag instructs the digest to optimize for one update only, if possible.
398
399 =for comment EVP_MD_CTX_FLAG_CLEANED is internal, don't mention it
400
401 =for comment EVP_MD_CTX_FLAG_REUSE is internal, don't mention it
402
403 =for comment We currently avoid documenting flags that are only bit holder:
404 EVP_MD_CTX_FLAG_NON_FIPS_ALLOW, EVP_MD_CTX_FLAGS_PAD_*
405
406 =item EVP_MD_CTX_FLAG_NO_INIT
407
408 This flag instructs EVP_DigestInit() and similar not to initialise the
409 implementation specific data.
410
411 =item EVP_MD_CTX_FLAG_FINALISE
412
413 Some functions such as EVP_DigestSign only finalise copies of internal
414 contexts so additional data can be included after the finalisation call.
415 This is inefficient if this functionality is not required, and can be
416 disabled with this flag.
417
418 =back
419
420 =head1 RETURN VALUES
421
422 =over 4
423
424 =item EVP_MD_fetch()
425
426 Returns a pointer to a B<EVP_MD> for success or NULL for failure.
427
428 =item EVP_MD_up_ref()
429
430 Returns 1 for success or 0 for failure.
431
432 =item EVP_DigestInit_ex(),
433 EVP_DigestUpdate(),
434 EVP_DigestFinal_ex()
435
436 Returns 1 for
437 success and 0 for failure.
438
439 =item EVP_MD_CTX_ctrl()
440
441 Returns 1 if successful or 0 for failure.
442
443 =item EVP_MD_CTX_set_params(),
444 EVP_MD_CTX_get_params()
445
446 Returns 1 if successful or 0 for failure.
447
448 =item EVP_MD_CTX_settable_params(),
449 EVP_MD_CTX_gettable_params()
450
451 Return an array of constant B<OSSL_PARAM>s, or NULL if there is none
452 to get.
453
454 =item EVP_MD_CTX_copy_ex()
455
456 Returns 1 if successful or 0 for failure.
457
458 =item EVP_MD_type(),
459 EVP_MD_pkey_type()
460
461 Returns the NID of the corresponding OBJECT IDENTIFIER or NID_undef if none
462 exists.
463
464 =item EVP_MD_size(),
465 EVP_MD_block_size(),
466 EVP_MD_CTX_size(),
467 EVP_MD_CTX_block_size()
468
469 Returns the digest or block size in bytes.
470
471 =item EVP_md_null()
472
473 Returns a pointer to the B<EVP_MD> structure of the "null" message digest.
474
475 =item EVP_get_digestbyname(),
476 EVP_get_digestbynid(),
477 EVP_get_digestbyobj()
478
479 Returns either an B<EVP_MD> structure or NULL if an error occurs.
480
481 =item EVP_MD_CTX_set_pkey_ctx()
482
483 This function has no return value.
484
485 =back
486
487 =head1 NOTES
488
489 The B<EVP> interface to message digests should almost always be used in
490 preference to the low level interfaces. This is because the code then becomes
491 transparent to the digest used and much more flexible.
492
493 New applications should use the SHA-2 (such as L<EVP_sha256(3)>) or the SHA-3
494 digest algorithms (such as L<EVP_sha3_512(3)>). The other digest algorithms
495 are still in common use.
496
497 For most applications the B<impl> parameter to EVP_DigestInit_ex() will be
498 set to NULL to use the default digest implementation.
499
500 The functions EVP_DigestInit(), EVP_DigestFinal() and EVP_MD_CTX_copy() are
501 obsolete but are retained to maintain compatibility with existing code. New
502 applications should use EVP_DigestInit_ex(), EVP_DigestFinal_ex() and
503 EVP_MD_CTX_copy_ex() because they can efficiently reuse a digest context
504 instead of initializing and cleaning it up on each call and allow non default
505 implementations of digests to be specified.
506
507 If digest contexts are not cleaned up after use,
508 memory leaks will occur.
509
510 EVP_MD_CTX_name(), EVP_MD_CTX_size(), EVP_MD_CTX_block_size(),
511 EVP_MD_CTX_type(), EVP_get_digestbynid() and EVP_get_digestbyobj() are defined
512 as macros.
513
514 EVP_MD_CTX_ctrl() sends commands to message digests for additional configuration
515 or control.
516
517 =head1 EXAMPLES
518
519 This example digests the data "Test Message\n" and "Hello World\n", using the
520 digest name passed on the command line.
521
522  #include <stdio.h>
523  #include <string.h>
524  #include <openssl/evp.h>
525
526  int main(int argc, char *argv[])
527  {
528      EVP_MD_CTX *mdctx;
529      const EVP_MD *md;
530      char mess1[] = "Test Message\n";
531      char mess2[] = "Hello World\n";
532      unsigned char md_value[EVP_MAX_MD_SIZE];
533      unsigned int md_len, i;
534
535      if (argv[1] == NULL) {
536          printf("Usage: mdtest digestname\n");
537          exit(1);
538      }
539
540      md = EVP_get_digestbyname(argv[1]);
541      if (md == NULL) {
542          printf("Unknown message digest %s\n", argv[1]);
543          exit(1);
544      }
545
546      mdctx = EVP_MD_CTX_new();
547      EVP_DigestInit_ex(mdctx, md, NULL);
548      EVP_DigestUpdate(mdctx, mess1, strlen(mess1));
549      EVP_DigestUpdate(mdctx, mess2, strlen(mess2));
550      EVP_DigestFinal_ex(mdctx, md_value, &md_len);
551      EVP_MD_CTX_free(mdctx);
552
553      printf("Digest is: ");
554      for (i = 0; i < md_len; i++)
555          printf("%02x", md_value[i]);
556      printf("\n");
557
558      exit(0);
559  }
560
561 =head1 SEE ALSO
562
563 L<EVP_MD_meth_new(3)>,
564 L<dgst(1)>,
565 L<evp(7)>,
566 L<OSSL_PROVIDER(3)>,
567 L<OSSL_PARAM(3)>
568
569 The full list of digest algorithms are provided below.
570
571 L<EVP_blake2b512(3)>,
572 L<EVP_md2(3)>,
573 L<EVP_md4(3)>,
574 L<EVP_md5(3)>,
575 L<EVP_mdc2(3)>,
576 L<EVP_ripemd160(3)>,
577 L<EVP_sha1(3)>,
578 L<EVP_sha224(3)>,
579 L<EVP_sha3_224(3)>,
580 L<EVP_sm3(3)>,
581 L<EVP_whirlpool(3)>
582 L<provider(7)/Fetching algorithms>
583
584 =head1 HISTORY
585
586 The EVP_MD_CTX_create() and EVP_MD_CTX_destroy() functions were renamed to
587 EVP_MD_CTX_new() and EVP_MD_CTX_free() in OpenSSL 1.1.0, respectively.
588
589 The link between digests and signing algorithms was fixed in OpenSSL 1.0 and
590 later, so now EVP_sha1() can be used with RSA and DSA.
591
592 The EVP_dss1() function was removed in OpenSSL 1.1.0.
593
594 The EVP_MD_CTX_set_pkey_ctx() function was added in 1.1.1.
595
596 The EVP_MD_fetch(), EVP_MD_free(), EVP_MD_up_ref(), EVP_MD_CTX_set_params()
597 and EVP_MD_CTX_get_params() functions were added in 3.0.
598
599 =head1 COPYRIGHT
600
601 Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
602
603 Licensed under the Apache License 2.0 (the "License").  You may not use
604 this file except in compliance with the License.  You can obtain a copy
605 in the file LICENSE in the source distribution or at
606 L<https://www.openssl.org/source/license.html>.
607
608 =cut