#define HASH SHA1
#endif
+#ifndef NO_SHA
#include <stdio.h>
#include <time.h>
#include "cryptlib.h"
return(ok);
}
-
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_SHA
#include <stdio.h>
#include <time.h>
#include "cryptlib.h"
if (ctx != NULL) BN_CTX_free(ctx);
return(ok);
}
-
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_DES
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
&(ctx->iv[0]),
ctx->encrypt);
}
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_DES
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
{
des_ncbc_encrypt(in,out,inl,ctx->c.des_ks,&(ctx->iv[0]),ctx->encrypt);
}
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_DES
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
ctx->c.des_ede.ks3,
&(ctx->iv[0]),&ctx->num,ctx->encrypt);
}
+#endif
#include <openssl/evp.h>
#include <openssl/objects.h>
+#ifndef NO_DES
static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
unsigned char *iv,int enc);
static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
&(ctx->iv[0]),
&ctx->num,ctx->encrypt);
}
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_DES
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
ctx->encrypt);
}
}
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_DES
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
des_ecb_encrypt(&(in[i]),&(out[i]),ctx->c.des_ks,ctx->encrypt);
}
}
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_DES
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
ctx->c.des_ede.ks2, ctx->c.des_ede.ks3,
&(ctx->iv[0]),&ctx->num);
}
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_DES
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
{
des_ofb64_encrypt(in,out,inl,ctx->c.des_ks,&(ctx->iv[0]),&ctx->num);
}
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_DES
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
&(ctx->c.desx_cbc.outw[0]),
ctx->encrypt);
}
+#endif
}
#ifdef NO_DES
-int des_read_pw_string(char *buf,int len,char *prompt,int verify);
+int des_read_pw_string(char *buf,int len,const char *prompt,int verify);
#endif
int EVP_read_pw_string(char *buf, int len, const char *prompt, int verify)
#include <openssl/objects.h>
#include <openssl/x509.h>
+#ifndef NO_SHA
static EVP_MD dsa_md=
{
NID_dsaWithSHA,
{
return(&dsa_md);
}
-
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_SHA
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
{
return(&dss1_md);
}
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_MD2
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
{
return(&md2_md);
}
-
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_MD5
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
{
return(&md5_md);
}
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_MDC2
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
{
return(&mdc2_md);
}
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_SHA
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
{
return(&sha_md);
}
-
+#endif
* [including the GNU Public Licence.]
*/
+#ifndef NO_SHA
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
{
return(&sha1_md);
}
+#endif
# DO NOT DELETE THIS LINE -- make depend depends on it.
md_rand.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h
-md_rand.o: ../../include/openssl/md5.h ../../include/openssl/opensslv.h
-md_rand.o: ../../include/openssl/rand.h ../../include/openssl/stack.h
+md_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
+md_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
rand_lib.o: ../../include/openssl/rand.h
randfile.o: ../../include/openssl/e_os.h ../../include/openssl/rand.h
#include <openssl/crypto.h>
#if !defined(USE_MD5_RAND) && !defined(USE_SHA1_RAND) && !defined(USE_MDC2_RAND) && !defined(USE_MD2_RAND)
-#ifndef NO_MD5
-#define USE_MD5_RAND
-#elif !defined(NO_SHA1)
+#if !defined(NO_SHA) && !defined(NO_SHA1)
#define USE_SHA1_RAND
-#elif !defined(NO_MDC2)
+#elif !defined(NO_MD5)
+#define USE_MD5_RAND
+#elif !defined(NO_MDC2) && !defined(NO_DES)
#define USE_MDC2_RAND
#elif !defined(NO_MD2)
#define USE_MD2_RAND
#else
-We need a message digest of some type
+#error No message digest algorithm available
#endif
#endif
/* EME_OAEP as defined in RFC 2437 (PKCS #1 v2.0) */
-#ifndef NO_SHA
+#if !defined(NO_SHA) && !defined(NO_SHA1)
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/bn.h>
#ifndef NO_SHA0
void SHA_Init(SHA_CTX *c);
-void SHA_Update(SHA_CTX *c, unsigned char *data, unsigned long len);
+void SHA_Update(SHA_CTX *c, const unsigned char *data, unsigned long len);
void SHA_Final(unsigned char *md, SHA_CTX *c);
-unsigned char *SHA(unsigned char *d, unsigned long n,unsigned char *md);
+unsigned char *SHA(const unsigned char *d, unsigned long n,unsigned char *md);
void SHA_Transform(SHA_CTX *c, unsigned char *data);
#endif
#ifndef NO_SHA1
void SHA1_Init(SHA_CTX *c);
-void SHA1_Update(SHA_CTX *c, unsigned char *data, unsigned long len);
+void SHA1_Update(SHA_CTX *c, const unsigned char *data, unsigned long len);
void SHA1_Final(unsigned char *md, SHA_CTX *c);
-unsigned char *SHA1(unsigned char *d, unsigned long n,unsigned char *md);
+unsigned char *SHA1(const unsigned char *d, unsigned long n,unsigned char *md);
void SHA1_Transform(SHA_CTX *c, unsigned char *data);
#endif
#ifdef __cplusplus
#include <openssl/sha.h>
#ifndef NO_SHA1
-unsigned char *SHA1(unsigned char *d, unsigned long n, unsigned char *md)
+unsigned char *SHA1(const unsigned char *d, unsigned long n, unsigned char *md)
{
SHA_CTX c;
static unsigned char m[SHA_DIGEST_LENGTH];
c->num=0;
}
-void SHA1_Update(SHA_CTX *c, register unsigned char *data,
+void SHA1_Update(SHA_CTX *c, const register unsigned char *data,
unsigned long len)
{
register SHA_LONG *p;
c->num=0;
}
-void SHA_Update(SHA_CTX *c, register unsigned char *data, unsigned long len)
+void SHA_Update(SHA_CTX *c, const register unsigned char *data,
+ unsigned long len)
{
register SHA_LONG *p;
int ew,ec,sw,sc;
#include <openssl/sha.h>
#ifndef NO_SHA0
-unsigned char *SHA(unsigned char *d, unsigned long n, unsigned char *md)
+unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md)
{
SHA_CTX c;
static unsigned char m[SHA_DIGEST_LENGTH];
#include <stdio.h>
#include <openssl/rsa.h>
#include <openssl/objects.h>
+#include <openssl/md5.h>
#include "ssl_locl.h"
static long ssl2_default_timeout(void );
#include <openssl/buffer.h>
#include <openssl/rand.h>
#include <openssl/objects.h>
+#include <openssl/md5.h>
+#include <openssl/sha.h>
#include <openssl/evp.h>
#include "ssl_locl.h"
*/
#include <stdio.h>
+#include <openssl/md5.h>
+#include <openssl/sha.h>
#include <openssl/evp.h>
#include "ssl_locl.h"
*/
#include <stdio.h>
+#include <openssl/md5.h>
+#include <openssl/sha.h>
#include <openssl/objects.h>
#include "ssl_locl.h"
#include <openssl/buffer.h>
#include <openssl/rand.h>
#include <openssl/objects.h>
+#include <openssl/md5.h>
+#include <openssl/sha.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
#include "ssl_locl.h"
EVP_add_digest_alias(SN_md5,"ssl2-md5");
EVP_add_digest_alias(SN_md5,"ssl3-md5");
#endif
-#ifndef NO_SHA1
+#ifndef NO_SHA
EVP_add_digest(EVP_sha1()); /* RSA with sha1 */
EVP_add_digest_alias(SN_sha1,"ssl3-sha1");
#endif
-#if !defined(NO_SHA1) && !defined(NO_DSA)
+#if !defined(NO_SHA) && !defined(NO_DSA)
EVP_add_digest(EVP_dss1()); /* DSA with sha1 */
#endif
#include <stdio.h>
#include <openssl/comp.h>
+#include <openssl/md5.h>
+#include <openssl/sha.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include "ssl_locl.h"