summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/include/make_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/include/make_crypto.c')
-rw-r--r--crypto/heimdal/include/make_crypto.c66
1 files changed, 39 insertions, 27 deletions
diff --git a/crypto/heimdal/include/make_crypto.c b/crypto/heimdal/include/make_crypto.c
index 2215f3f..2df17a5 100644
--- a/crypto/heimdal/include/make_crypto.c
+++ b/crypto/heimdal/include/make_crypto.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002 - 2003 Kungliga Tekniska Högskolan
+ * Copyright (c) 2002 - 2005 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: make_crypto.c,v 1.4.2.1 2003/05/05 20:10:27 joda Exp $");
+RCSID("$Id: make_crypto.c 19477 2006-12-20 19:51:53Z lha $");
#endif
#include <stdio.h>
#include <string.h>
@@ -49,49 +49,61 @@ main(int argc, char **argv)
fprintf(stderr, "Usage: make_crypto file\n");
exit(1);
}
+ if (strcmp(argv[1], "--version") == 0) {
+ printf("some version");
+ return 0;
+ }
f = fopen(argv[1], "w");
if(f == NULL) {
perror(argv[1]);
exit(1);
}
for(p = argv[1]; *p; p++)
- if(!isalnum((int)*p))
+ if(!isalnum((unsigned char)*p))
*p = '_';
fprintf(f, "#ifndef __%s__\n", argv[1]);
fprintf(f, "#define __%s__\n", argv[1]);
#ifdef HAVE_OPENSSL
+ fputs("#ifndef OPENSSL_DES_LIBDES_COMPATIBILITY\n", f);
fputs("#define OPENSSL_DES_LIBDES_COMPATIBILITY\n", f);
+ fputs("#endif\n", f);
+ fputs("#include <openssl/evp.h>\n", f);
fputs("#include <openssl/des.h>\n", f);
fputs("#include <openssl/rc4.h>\n", f);
+ fputs("#include <openssl/rc2.h>\n", f);
+ fputs("#include <openssl/md2.h>\n", f);
fputs("#include <openssl/md4.h>\n", f);
fputs("#include <openssl/md5.h>\n", f);
fputs("#include <openssl/sha.h>\n", f);
-#if ENABLE_AES
fputs("#include <openssl/aes.h>\n", f);
-#endif
+ fputs("#include <openssl/ui.h>\n", f);
+ fputs("#include <openssl/rand.h>\n", f);
+ fputs("#include <openssl/engine.h>\n", f);
+ fputs("#include <openssl/pkcs12.h>\n", f);
+ fputs("#include <openssl/pem.h>\n", f);
+ fputs("#include <openssl/hmac.h>\n", f);
+ fputs("#ifndef BN_is_negative\n", f);
+ fputs("#define BN_set_negative(bn, flag) ((bn)->neg=(flag)?1:0)\n", f);
+ fputs("#define BN_is_negative(bn) ((bn)->neg != 0)\n", f);
+ fputs("#endif\n", f);
#else
- fputs("#include <des.h>\n", f);
- fputs("#include <md4.h>\n", f);
- fputs("#include <md5.h>\n", f);
- fputs("#include <sha.h>\n", f);
- fputs("#include <rc4.h>\n", f);
-#ifdef HAVE_OLD_HASH_NAMES
- fputs("\n", f);
- fputs(" typedef struct md4 MD4_CTX;\n", f);
- fputs("#define MD4_Init md4_init\n", f);
- fputs("#define MD4_Update md4_update\n", f);
- fputs("#define MD4_Final(D, C) md4_finito((C), (D))\n", f);
- fputs("\n", f);
- fputs(" typedef struct md5 MD5_CTX;\n", f);
- fputs("#define MD5_Init md5_init\n", f);
- fputs("#define MD5_Update md5_update\n", f);
- fputs("#define MD5_Final(D, C) md5_finito((C), (D))\n", f);
- fputs("\n", f);
- fputs(" typedef struct sha SHA_CTX;\n", f);
- fputs("#define SHA1_Init sha_init\n", f);
- fputs("#define SHA1_Update sha_update\n", f);
- fputs("#define SHA1_Final(D, C) sha_finito((C), (D))\n", f);
-#endif
+ fputs("#ifdef KRB5\n", f);
+ fputs("#include <krb5-types.h>\n", f);
+ fputs("#endif\n", f);
+ fputs("#include <hcrypto/evp.h>\n", f);
+ fputs("#include <hcrypto/des.h>\n", f);
+ fputs("#include <hcrypto/md2.h>\n", f);
+ fputs("#include <hcrypto/md4.h>\n", f);
+ fputs("#include <hcrypto/md5.h>\n", f);
+ fputs("#include <hcrypto/sha.h>\n", f);
+ fputs("#include <hcrypto/rc4.h>\n", f);
+ fputs("#include <hcrypto/rc2.h>\n", f);
+ fputs("#include <hcrypto/aes.h>\n", f);
+ fputs("#include <hcrypto/ui.h>\n", f);
+ fputs("#include <hcrypto/rand.h>\n", f);
+ fputs("#include <hcrypto/engine.h>\n", f);
+ fputs("#include <hcrypto/pkcs12.h>\n", f);
+ fputs("#include <hcrypto/hmac.h>\n", f);
#endif
fprintf(f, "#endif /* __%s__ */\n", argv[1]);
fclose(f);
OpenPOWER on IntegriCloud