/* list of configured algorithm (remaining), with some few alias */
static const OPT_PAIR doit_choices[] = {
-#ifndef OPENSSL_NO_MD2
+#if !defined(OPENSSL_NO_MD2) && !defined(OPENSSL_NO_DEPRECATED_3_0)
{"md2", D_MD2},
#endif
#ifndef OPENSSL_NO_MDC2
/* Nb of iterations to do per algorithm and key-size */
static long c[ALGOR_NUM][SIZE_NUM];
-#ifndef OPENSSL_NO_MD2
+#if !defined(OPENSSL_NO_MD2) && !defined(OPENSSL_NO_DEPRECATED_3_0)
static int EVP_Digest_MD2_loop(void *args)
{
loopargs_t *tempargs = *(loopargs_t **) args;
signal(SIGALRM, alarmed);
#endif /* SIGALRM */
-#ifndef OPENSSL_NO_MD2
+#if !defined(OPENSSL_NO_MD2) && !defined(OPENSSL_NO_DEPRECATED_3_0)
if (doit[D_MD2]) {
for (testnum = 0; testnum < size_num; testnum++) {
print_message(names[D_MD2], c[D_MD2][testnum], lengths[testnum],
printf("built on: %s\n", OpenSSL_version(OPENSSL_BUILT_ON));
printf("options:");
printf("%s ", BN_options());
-#ifndef OPENSSL_NO_MD2
+#if !defined(OPENSSL_NO_MD2) && !defined(OPENSSL_NO_DEPRECATED_3_0)
printf("%s ", MD2_options());
#endif
#ifndef OPENSSL_NO_RC4
if (options) {
printf("options: ");
printf(" %s", BN_options());
-#ifndef OPENSSL_NO_MD2
- printf(" %s", MD2_options());
-#endif
#ifndef OPENSSL_NO_RC4
printf(" %s", RC4_options());
#endif
* https://www.openssl.org/source/license.html
*/
+/*
+ * MD2 low level APIs are deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
#include <openssl/md2.h>
#include "crypto/evp.h"
#include "legacy_meth.h"
LIBS=../../libcrypto
-SOURCE[../../libcrypto]=\
- md2_dgst.c md2_one.c
+
+SOURCE[../../libcrypto]=md2_dgst.c md2_one.c
+
+# When all deprecated symbols are removed, libcrypto doesn't export the
+# MD2 functions, so we must include them directly in liblegacy.a
+IF[{- $disabled{"deprecated"}
+ && (defined $config{"api"} && $config{"api"} >= 30000) -}]
+ SOURCE[../../providers/liblegacy.a]=md2_dgst.c md2_one.c
+ENDIF
* https://www.openssl.org/source/license.html
*/
+/*
+ * MD2 low level APIs are deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
* https://www.openssl.org/source/license.html
*/
+/*
+ * MD2 low level APIs are deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/md2.h>
#include <openssl/md2.h>
+Deprecated since OpenSSL 3.0, can be hidden entirely by defining
+B<OPENSSL_API_COMPAT> with a suitable version value, see
+L<openssl_user_macros(7)>:
+
unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md);
int MD2_Init(MD2_CTX *c);
=head1 DESCRIPTION
+All of the functions described on this page are deprecated.
+Applications should instead use L<EVP_DigestInit_ex(3)>, L<EVP_DigestUpdate(3)>
+and L<EVP_DigestFinal_ex(3)>.
+
MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit output.
MD2(), MD4(), and MD5() compute the MD2, MD4, and MD5 message digest
L<EVP_DigestInit(3)>
+=head1 HISTORY
+
+All of these functions were deprecated in OpenSSL 3.0.
+
=head1 COPYRIGHT
Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
extern "C" {
# endif
+# define MD2_DIGEST_LENGTH 16
+
+# if !defined(OPENSSL_NO_DEPRECATED_3_0)
+
typedef unsigned char MD2_INT;
-# define MD2_DIGEST_LENGTH 16
-# define MD2_BLOCK 16
+# define MD2_BLOCK 16
typedef struct MD2state_st {
unsigned int num;
MD2_INT cksm[MD2_BLOCK];
MD2_INT state[MD2_BLOCK];
} MD2_CTX;
+# endif
-const char *MD2_options(void);
-int MD2_Init(MD2_CTX *c);
-int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len);
-int MD2_Final(unsigned char *md, MD2_CTX *c);
-unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md);
+DEPRECATEDIN_3_0(const char *MD2_options(void))
+DEPRECATEDIN_3_0(int MD2_Init(MD2_CTX *c))
+DEPRECATEDIN_3_0(int MD2_Update(MD2_CTX *c, const unsigned char *data,
+ size_t len))
+DEPRECATEDIN_3_0(int MD2_Final(unsigned char *md, MD2_CTX *c))
+DEPRECATEDIN_3_0(unsigned char *MD2(const unsigned char *d, size_t n,
+ unsigned char *md))
# ifdef __cplusplus
}
# endif
# endif
-
#endif
* https://www.openssl.org/source/license.html
*/
+/*
+ * MD2 low level APIs are deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
#include <openssl/crypto.h>
#include <openssl/md2.h>
#include "prov/digestcommon.h"
* https://www.openssl.org/source/license.html
*/
+/*
+ * MD2 low level APIs are deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
#include <string.h>
#include <openssl/provider.h>
d2i_ASN1_BMPSTRING 2383 3_0_0 EXIST::FUNCTION:
PKCS12_SAFEBAG_create0_p8inf 2384 3_0_0 EXIST::FUNCTION:
OBJ_cmp 2385 3_0_0 EXIST::FUNCTION:
-MD2 2386 3_0_0 EXIST::FUNCTION:MD2
+MD2 2386 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,MD2
X509_PUBKEY_new 2387 3_0_0 EXIST::FUNCTION:
BN_CTX_end 2388 3_0_0 EXIST::FUNCTION:
BIO_get_retry_BIO 2389 3_0_0 EXIST::FUNCTION:
Camellia_decrypt 2466 3_0_0 EXIST::FUNCTION:CAMELLIA
X509_signature_print 2467 3_0_0 EXIST::FUNCTION:
EVP_camellia_128_ecb 2468 3_0_0 EXIST::FUNCTION:CAMELLIA
-MD2_Final 2469 3_0_0 EXIST::FUNCTION:MD2
+MD2_Final 2469 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,MD2
OCSP_REQ_CTX_add1_header 2470 3_0_0 EXIST::FUNCTION:OCSP
NETSCAPE_SPKAC_it 2471 3_0_0 EXIST::FUNCTION:
ASIdOrRange_free 2472 3_0_0 EXIST::FUNCTION:RFC3779
ERR_load_EVP_strings 3241 3_0_0 EXIST::FUNCTION:
X509_ATTRIBUTE_set1_data 3242 3_0_0 EXIST::FUNCTION:
d2i_X509_fp 3243 3_0_0 EXIST::FUNCTION:STDIO
-MD2_Init 3244 3_0_0 EXIST::FUNCTION:MD2
+MD2_Init 3244 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,MD2
ERR_get_error_line 3245 3_0_0 EXIST::FUNCTION:
X509_CRL_get_ext_by_NID 3246 3_0_0 EXIST::FUNCTION:
OPENSSL_INIT_free 3247 3_0_0 EXIST::FUNCTION:
X509_issuer_and_serial_cmp 3590 3_0_0 EXIST::FUNCTION:
OCSP_response_create 3591 3_0_0 EXIST::FUNCTION:OCSP
SHA224 3592 3_0_0 EXIST::FUNCTION:
-MD2_options 3593 3_0_0 EXIST::FUNCTION:MD2
+MD2_options 3593 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,MD2
X509_REQ_it 3595 3_0_0 EXIST::FUNCTION:
RAND_bytes 3596 3_0_0 EXIST::FUNCTION:
PKCS7_free 3597 3_0_0 EXIST::FUNCTION:
UI_method_get_closer 3623 3_0_0 EXIST::FUNCTION:
ENGINE_get_ex_data 3624 3_0_0 EXIST::FUNCTION:ENGINE
BN_print_fp 3625 3_0_0 EXIST::FUNCTION:STDIO
-MD2_Update 3626 3_0_0 EXIST::FUNCTION:MD2
+MD2_Update 3626 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,MD2
ENGINE_free 3628 3_0_0 EXIST::FUNCTION:ENGINE
d2i_X509_ATTRIBUTE 3629 3_0_0 EXIST::FUNCTION:
TS_RESP_free 3630 3_0_0 EXIST::FUNCTION:TS