improve abort message, when RC5/IDEA in libcrypto (dummy) is called.

This commit is contained in:
itojun 2000-09-30 14:29:16 +00:00
parent 8d07b6ddd6
commit 563bf184ad
4 changed files with 32 additions and 16 deletions

View File

@ -64,21 +64,25 @@
#include <stdlib.h>
__warn_references(idea_cbc_encrypt,
"IDEA is a patented algorithm; use libcrypto_idea.a")
"IDEA is a patented algorithm; link against libcrypto_idea.a")
__warn_references(idea_encrypt,
"IDEA is a patented algorithm; use libcrypto_idea.a")
"IDEA is a patented algorithm; link against libcrypto_idea.a")
void idea_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int encrypt)
{
fprintf(stderr, "IDEA is a patented algorithm; use libcrypto_idea.a\n");
fprintf(stderr,
"IDEA is a patented algorithm; link against libcrypto_idea.a. "
"Aborting...\n");
exit(1);
}
void idea_encrypt(IDEA_INT *d, IDEA_KEY_SCHEDULE *key)
{
fprintf(stderr, "IDEA is a patented algorithm; use libcrypto_idea.a\n");
fprintf(stderr,
"IDEA is a patented algorithm; link against libcrypto_idea.a. "
"Aborting...\n");
exit(1);
}

View File

@ -64,20 +64,24 @@
#include <stdlib.h>
__warn_references(idea_set_encrypt_key,
"IDEA is a patented algorithm; use libcrypto_idea.a")
"IDEA is a patented algorithm; link against libcrypto_idea.a")
__warn_references(idea_set_decrypt_key,
"IDEA is a patented algorithm; use libcrypto_idea.a")
"IDEA is a patented algorithm; link against libcrypto_idea.a")
void idea_set_encrypt_key(unsigned char *key, IDEA_KEY_SCHEDULE *ks)
{
fprintf(stderr, "IDEA is a patented algorithm; use libcrypto_idea.a\n");
fprintf(stderr,
"IDEA is a patented algorithm; link against libcrypto_idea.a. "
"Aborting...\n");
exit(1);
}
void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk)
{
fprintf(stderr, "IDEA is a patented algorithm; use libcrypto_idea.a\n");
fprintf(stderr,
"IDEA is a patented algorithm; link against libcrypto_idea.a. "
"Aborting...\n");
exit(1);
}

View File

@ -65,30 +65,36 @@
#include <stdlib.h>
__warn_references(RC5_32_cbc_encrypt,
"RC5 is a patented algorithm; use libcrypto_rc5.a")
"RC5 is a patented algorithm; link against libcrypto_rc5.a")
__warn_references(RC5_32_encrypt,
"RC5 is a patented algorithm; use libcrypto_rc5.a")
"RC5 is a patented algorithm; link against libcrypto_rc5.a")
__warn_references(RC5_32_decrypt,
"RC5 is a patented algorithm; use libcrypto_rc5.a")
"RC5 is a patented algorithm; link against libcrypto_rc5.a")
void RC5_32_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
RC5_32_KEY *ks, unsigned char *iv, int encrypt)
{
fprintf(stderr, "RC5 is a patented algorithm; use libcrypto_rc5.a\n");
fprintf(stderr,
"RC5 is a patented algorithm; link against libcrypto_rc5.a. "
"Aborting...\n");
exit(1);
}
void RC5_32_encrypt(RC5_32_INT *d, RC5_32_KEY *key)
{
fprintf(stderr, "RC5 is a patented algorithm; use libcrypto_rc5.a\n");
fprintf(stderr,
"RC5 is a patented algorithm; link against libcrypto_rc5.a. "
"Aborting...\n");
exit(1);
}
void RC5_32_decrypt(RC5_32_INT *d, RC5_32_KEY *key)
{
fprintf(stderr, "RC5 is a patented algorithm; use libcrypto_rc5.a\n");
fprintf(stderr,
"RC5 is a patented algorithm; link against libcrypto_rc5.a. "
"Aborting...\n");
exit(1);
}

View File

@ -64,12 +64,14 @@
#include <stdlib.h>
__warn_references(RC5_32_set_key,
"RC5 is a patented algorithm; use libcrypto_rc5.a")
"RC5 is a patented algorithm; link against libcrypto_rc5.a")
void RC5_32_set_key(RC5_32_KEY *key, int len, unsigned char *data,
int rounds)
{
fprintf(stderr, "RC5 is a patented algorithm; use libcrypto_rc5.a\n");
fprintf(stderr,
"RC5 is a patented algorithm; link against libcrypto_rc5.a. "
"Aborting...\n");
exit(1);
}