summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-01-13 13:02:45 +1000
committerPauli <paul.dale@oracle.com>2020-01-19 10:38:49 +1000
commitda2d32f6db1c9fb33478af660daddcd1df369716 (patch)
treee35e8b89a18319fd8444d16a4fe5adad216fb8bc /include
parent621f74b3e3eeaa189c9d83dca7352612774ad23c (diff)
Deprecate the low level IDEA functions.
Use of the low level IDEA functions has been informally discouraged for a long time. We now formally deprecate them. Applications should instead use the EVP APIs, e.g. EVP_EncryptInit_ex, EVP_EncryptUpdate, EVP_EncryptFinal_ex, and the equivalently named decrypt functions. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10819)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/idea.h49
1 files changed, 29 insertions, 20 deletions
diff --git a/include/openssl/idea.h b/include/openssl/idea.h
index a0a0ceeb7e..a651ee2e72 100644
--- a/include/openssl/idea.h
+++ b/include/openssl/idea.h
@@ -23,33 +23,42 @@
extern "C" {
# endif
-typedef unsigned int IDEA_INT;
-
-# define IDEA_ENCRYPT 1
-# define IDEA_DECRYPT 0
-
# define IDEA_BLOCK 8
# define IDEA_KEY_LENGTH 16
+# ifndef OPENSSL_NO_DEPRECATED_3_0
+
+typedef unsigned int IDEA_INT;
+
+# define IDEA_ENCRYPT 1
+# define IDEA_DECRYPT 0
+
typedef struct idea_key_st {
IDEA_INT data[9][6];
} IDEA_KEY_SCHEDULE;
+#endif
-const char *IDEA_options(void);
-void IDEA_ecb_encrypt(const unsigned char *in, unsigned char *out,
- IDEA_KEY_SCHEDULE *ks);
-void IDEA_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks);
-void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk);
-void IDEA_cbc_encrypt(const unsigned char *in, unsigned char *out,
- long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,
- int enc);
-void IDEA_cfb64_encrypt(const unsigned char *in, unsigned char *out,
- long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,
- int *num, int enc);
-void IDEA_ofb64_encrypt(const unsigned char *in, unsigned char *out,
- long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,
- int *num);
-void IDEA_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks);
+DEPRECATEDIN_3_0(const char *IDEA_options(void))
+DEPRECATEDIN_3_0(void IDEA_ecb_encrypt(const unsigned char *in,
+ unsigned char *out,
+ IDEA_KEY_SCHEDULE *ks))
+DEPRECATEDIN_3_0(void IDEA_set_encrypt_key(const unsigned char *key,
+ IDEA_KEY_SCHEDULE *ks))
+DEPRECATEDIN_3_0(void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek,
+ IDEA_KEY_SCHEDULE *dk))
+DEPRECATEDIN_3_0(void IDEA_cbc_encrypt(const unsigned char *in,
+ unsigned char *out, long length,
+ IDEA_KEY_SCHEDULE *ks,
+ unsigned char *iv, int enc))
+DEPRECATEDIN_3_0(void IDEA_cfb64_encrypt(const unsigned char *in,
+ unsigned char *out, long length,
+ IDEA_KEY_SCHEDULE *ks,
+ unsigned char *iv, int *num, int enc))
+DEPRECATEDIN_3_0(void IDEA_ofb64_encrypt(const unsigned char *in,
+ unsigned char *out, long length,
+ IDEA_KEY_SCHEDULE *ks,
+ unsigned char *iv, int *num))
+DEPRECATEDIN_3_0(void IDEA_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks))
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define idea_options IDEA_options