提交 dbad1690 编写于 作者: B Ben Laurie

Really add the EVP and all of the DES changes.

上级 3ba5d1cf
......@@ -12,6 +12,15 @@
*) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7
+) applies to 0.9.7 only
+) Rationalise EVP so it can be extended: don't include a union of
cipher/digest structures, add init/cleanup functions. This also reduces
the number of header dependencies.
[Ben Laurie]
+) Make DES key schedule conform to the usual scheme, as well as correcting
its structure.
[Ben Laurie]
+) Enhanced support for IA-64 Unix platforms (well, Linux and HP-UX).
[Andy Polyakov]
......
此差异已折叠。
......@@ -15,12 +15,12 @@
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#ifndef OPENSSL_NO_DES
# include <openssl/des.h>
#endif
#ifndef NO_MD5CRYPT_1
# include <openssl/evp.h>
# include <openssl/md5.h>
#endif
......@@ -311,7 +311,7 @@ static char *md5crypt(const char *passwd, const char *magic, const char *salt)
unsigned char buf[MD5_DIGEST_LENGTH];
char *salt_out;
int n, i;
EVP_MD_CTX md;
EVP_MD_CTX md,md2;
size_t passwd_len, salt_len;
passwd_len = strlen(passwd);
......@@ -326,6 +326,7 @@ static char *md5crypt(const char *passwd, const char *magic, const char *salt)
salt_len = strlen(salt_out);
assert(salt_len <= 8);
EVP_MD_CTX_init(&md);
EVP_DigestInit(&md,EVP_md5());
EVP_DigestUpdate(&md, passwd, passwd_len);
EVP_DigestUpdate(&md, "$", 1);
......@@ -333,15 +334,13 @@ static char *md5crypt(const char *passwd, const char *magic, const char *salt)
EVP_DigestUpdate(&md, "$", 1);
EVP_DigestUpdate(&md, salt_out, salt_len);
{
EVP_MD_CTX md2;
EVP_MD_CTX_init(&md2);
EVP_DigestInit(&md2,EVP_md5());
EVP_DigestUpdate(&md2, passwd, passwd_len);
EVP_DigestUpdate(&md2, salt_out, salt_len);
EVP_DigestUpdate(&md2, passwd, passwd_len);
EVP_DigestFinal(&md2, buf, NULL);
EVP_DigestInit(&md2,EVP_md5());
EVP_DigestUpdate(&md2, passwd, passwd_len);
EVP_DigestUpdate(&md2, salt_out, salt_len);
EVP_DigestUpdate(&md2, passwd, passwd_len);
EVP_DigestFinal(&md2, buf, NULL);
}
for (i = passwd_len; i > sizeof buf; i -= sizeof buf)
EVP_DigestUpdate(&md, buf, sizeof buf);
EVP_DigestUpdate(&md, buf, i);
......@@ -356,8 +355,6 @@ static char *md5crypt(const char *passwd, const char *magic, const char *salt)
for (i = 0; i < 1000; i++)
{
EVP_MD_CTX md2;
EVP_DigestInit(&md2,EVP_md5());
EVP_DigestUpdate(&md2, (i & 1) ? (unsigned char *) passwd : buf,
(i & 1) ? passwd_len : sizeof buf);
......@@ -369,6 +366,7 @@ static char *md5crypt(const char *passwd, const char *magic, const char *salt)
(i & 1) ? sizeof buf : passwd_len);
EVP_DigestFinal(&md2, buf, NULL);
}
EVP_MD_CTX_cleanup(&md2);
{
/* transform buf into output string */
......@@ -406,6 +404,7 @@ static char *md5crypt(const char *passwd, const char *magic, const char *salt)
*output = 0;
assert(strlen(out_buf) < sizeof(out_buf));
}
EVP_MD_CTX_cleanup(&md);
return out_buf;
}
......
......@@ -787,9 +787,9 @@ int MAIN(int argc, char **argv)
#endif
#ifndef OPENSSL_NO_DES
des_set_key_unchecked(&key,sch);
des_set_key_unchecked(&key2,sch2);
des_set_key_unchecked(&key3,sch3);
des_set_key_unchecked(&key,&sch);
des_set_key_unchecked(&key2,&sch2);
des_set_key_unchecked(&key3,&sch3);
#endif
#ifndef OPENSSL_NO_IDEA
idea_set_encrypt_key(key16,&idea_ks);
......@@ -990,6 +990,8 @@ int MAIN(int argc, char **argv)
if (doit[D_HMAC])
{
HMAC_CTX hctx;
HMAC_CTX_init(&hctx);
HMAC_Init(&hctx,(unsigned char *)"This is a key...",
16,EVP_md5());
......@@ -1008,7 +1010,7 @@ int MAIN(int argc, char **argv)
count,names[D_HMAC],d);
results[D_HMAC][j]=((double)count)/d*lengths[j];
}
HMAC_cleanup(&hctx);
HMAC_CTX_cleanup(&hctx);
}
#endif
#ifndef OPENSSL_NO_SHA
......@@ -1068,11 +1070,11 @@ int MAIN(int argc, char **argv)
print_message(names[D_CBC_DES],c[D_CBC_DES][j],lengths[j]);
Time_F(START,usertime);
for (count=0,run=1; COND(c[D_CBC_DES][j]); count++)
des_ncbc_encrypt(buf,buf,lengths[j],sch,
des_ncbc_encrypt(buf,buf,lengths[j],&sch,
&iv,DES_ENCRYPT);
d=Time_F(STOP,usertime);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
count,names[D_CBC_DES],d);
count,names[D_CBC_DES],d);
results[D_CBC_DES][j]=((double)count)/d*lengths[j];
}
}
......@@ -1085,7 +1087,7 @@ int MAIN(int argc, char **argv)
Time_F(START,usertime);
for (count=0,run=1; COND(c[D_EDE3_DES][j]); count++)
des_ede3_cbc_encrypt(buf,buf,lengths[j],
sch,sch2,sch3,
&sch,&sch2,&sch3,
&iv,DES_ENCRYPT);
d=Time_F(STOP,usertime);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
......
......@@ -62,6 +62,11 @@
#include "apps.h"
#include <openssl/evp.h>
#include <openssl/crypto.h>
#include <openssl/md2.h>
#include <openssl/rc4.h>
#include <openssl/des.h>
#include <openssl/idea.h>
#include <openssl/blowfish.h>
#undef PROG
#define PROG version_main
......
此差异已折叠。
......@@ -82,6 +82,7 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
int i,inl=0,outl=0,outll=0;
X509_ALGOR *a;
EVP_MD_CTX_init(&ctx);
for (i=0; i<2; i++)
{
if (i == 0)
......@@ -141,7 +142,7 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
signature->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07);
signature->flags|=ASN1_STRING_FLAG_BITS_LEFT;
err:
memset(&ctx,0,sizeof(ctx));
EVP_MD_CTX_cleanup(&ctx);
if (buf_in != NULL)
{ memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); }
if (buf_out != NULL)
......@@ -160,6 +161,7 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
int i,inl=0,outl=0,outll=0;
X509_ALGOR *a;
EVP_MD_CTX_init(&ctx);
for (i=0; i<2; i++)
{
if (i == 0)
......@@ -216,7 +218,7 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
signature->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07);
signature->flags|=ASN1_STRING_FLAG_BITS_LEFT;
err:
memset(&ctx,0,sizeof(ctx));
EVP_MD_CTX_cleanup(&ctx);
if (buf_in != NULL)
{ memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); }
if (buf_out != NULL)
......
......@@ -81,6 +81,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
unsigned char *p,*buf_in=NULL;
int ret= -1,i,inl;
EVP_MD_CTX_init(&ctx);
i=OBJ_obj2nid(a->algorithm);
type=EVP_get_digestbyname(OBJ_nid2sn(i));
if (type == NULL)
......@@ -117,6 +118,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
/* memset(&ctx,0,sizeof(ctx)); */
ret=1;
err:
EVP_MD_CTX_cleanup(&ctx);
return(ret);
}
......@@ -131,6 +133,7 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
unsigned char *buf_in=NULL;
int ret= -1,i,inl;
EVP_MD_CTX_init(&ctx);
i=OBJ_obj2nid(a->algorithm);
type=EVP_get_digestbyname(OBJ_nid2sn(i));
if (type == NULL)
......@@ -165,6 +168,7 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
/* memset(&ctx,0,sizeof(ctx)); */
ret=1;
err:
EVP_MD_CTX_cleanup(&ctx);
return(ret);
}
......
......@@ -108,13 +108,13 @@ clean:
# DO NOT DELETE THIS LINE -- make depend depends on it.
bf_cfb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
bf_cfb64.o: ../../include/openssl/opensslconf.h bf_cfb64.c bf_locl.h
bf_cfb64.o: ../../include/openssl/opensslconf.h bf_locl.h
bf_ecb.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
bf_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
bf_ecb.o: bf_ecb.c bf_locl.h
bf_ecb.o: bf_locl.h
bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h
bf_enc.o: ../../include/openssl/opensslconf.h bf_locl.h
bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c
bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h
bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
bf_skey.o: ../../include/openssl/opensslconf.h bf_locl.h bf_pi.h bf_skey.c
bf_skey.o: ../../include/openssl/opensslconf.h bf_locl.h bf_pi.h
......@@ -95,155 +95,132 @@ b_dump.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
b_dump.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
b_dump.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
b_dump.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
b_dump.o: ../cryptlib.h b_dump.c
b_dump.o: ../cryptlib.h
b_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
b_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
b_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
b_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
b_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
b_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
b_print.o: ../cryptlib.h b_print.c
b_print.o: ../cryptlib.h
b_sock.o: ../../e_os.h ../../include/openssl/bio.h
b_sock.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
b_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
b_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
b_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
b_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
b_sock.o: ../cryptlib.h b_sock.c
b_sock.o: ../cryptlib.h
bf_buff.o: ../../e_os.h ../../include/openssl/asn1.h
bf_buff.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
bf_buff.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
bf_buff.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
bf_buff.o: ../../include/openssl/des.h ../../include/openssl/dh.h
bf_buff.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
bf_buff.o: ../../include/openssl/err.h ../../include/openssl/evp.h
bf_buff.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
bf_buff.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
bf_buff.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
bf_buff.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
bf_buff.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bf_buff.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
bf_buff.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bf_buff.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
bf_buff.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
bf_buff.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
bf_buff.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
bf_buff.o: ../../include/openssl/rc5.h ../../include/openssl/rd_fst.h
bf_buff.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
bf_buff.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
bf_buff.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
bf_buff.o: ../../include/openssl/symhacks.h ../cryptlib.h bf_buff.c
bf_buff.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bf_buff.o: ../cryptlib.h
bf_nbio.o: ../../e_os.h ../../include/openssl/asn1.h
bf_nbio.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
bf_nbio.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
bf_nbio.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
bf_nbio.o: ../../include/openssl/des.h ../../include/openssl/dh.h
bf_nbio.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
bf_nbio.o: ../../include/openssl/err.h ../../include/openssl/evp.h
bf_nbio.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
bf_nbio.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
bf_nbio.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
bf_nbio.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
bf_nbio.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bf_nbio.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
bf_nbio.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bf_nbio.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
bf_nbio.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
bf_nbio.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
bf_nbio.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
bf_nbio.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
bf_nbio.o: ../../include/openssl/rd_fst.h ../../include/openssl/rijndael.h
bf_nbio.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
bf_nbio.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
bf_nbio.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bf_nbio.o: ../cryptlib.h bf_nbio.c
bf_nbio.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
bf_nbio.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
bf_nbio.o: ../../include/openssl/symhacks.h ../cryptlib.h
bf_null.o: ../../e_os.h ../../include/openssl/asn1.h
bf_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
bf_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
bf_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
bf_null.o: ../../include/openssl/des.h ../../include/openssl/dh.h
bf_null.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
bf_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h
bf_null.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
bf_null.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
bf_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
bf_null.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
bf_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bf_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
bf_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bf_null.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
bf_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
bf_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
bf_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
bf_null.o: ../../include/openssl/rc5.h ../../include/openssl/rd_fst.h
bf_null.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
bf_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
bf_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
bf_null.o: ../../include/openssl/symhacks.h ../cryptlib.h bf_null.c
bf_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bf_null.o: ../cryptlib.h
bio_cb.o: ../../e_os.h ../../include/openssl/bio.h
bio_cb.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bio_cb.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bio_cb.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bio_cb.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bio_cb.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bio_cb.o: ../cryptlib.h bio_cb.c
bio_cb.o: ../cryptlib.h
bio_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
bio_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bio_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bio_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bio_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bio_err.o: bio_err.c
bio_lib.o: ../../e_os.h ../../include/openssl/bio.h
bio_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bio_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bio_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bio_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bio_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bio_lib.o: ../cryptlib.h bio_lib.c
bio_lib.o: ../cryptlib.h
bss_acpt.o: ../../e_os.h ../../include/openssl/bio.h
bss_acpt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bss_acpt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bss_acpt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bss_acpt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bss_acpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bss_acpt.o: ../cryptlib.h bss_acpt.c
bss_acpt.o: ../cryptlib.h
bss_bio.o: ../../e_os.h ../../include/openssl/bio.h
bss_bio.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
bss_bio.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
bss_bio.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
bss_bio.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
bss_bio.o: ../../include/openssl/symhacks.h bss_bio.c
bss_bio.o: ../../include/openssl/symhacks.h
bss_conn.o: ../../e_os.h ../../include/openssl/bio.h
bss_conn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bss_conn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bss_conn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bss_conn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bss_conn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bss_conn.o: ../cryptlib.h bss_conn.c
bss_conn.o: ../cryptlib.h
bss_fd.o: ../../e_os.h ../../include/openssl/bio.h
bss_fd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bss_fd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bss_fd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bss_fd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bss_fd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bss_fd.o: ../cryptlib.h bss_fd.c
bss_fd.o: ../cryptlib.h
bss_file.o: ../../e_os.h ../../include/openssl/bio.h
bss_file.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bss_file.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bss_file.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bss_file.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bss_file.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bss_file.o: ../cryptlib.h bss_file.c
bss_file.o: ../cryptlib.h
bss_log.o: ../../e_os.h ../../include/openssl/bio.h
bss_log.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bss_log.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bss_log.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bss_log.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bss_log.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bss_log.o: ../cryptlib.h bss_log.c
bss_log.o: ../cryptlib.h
bss_mem.o: ../../e_os.h ../../include/openssl/bio.h
bss_mem.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bss_mem.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bss_mem.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bss_mem.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bss_mem.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bss_mem.o: ../cryptlib.h bss_mem.c
bss_mem.o: ../cryptlib.h
bss_null.o: ../../e_os.h ../../include/openssl/bio.h
bss_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bss_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bss_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bss_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bss_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bss_null.o: ../cryptlib.h bss_null.c
bss_null.o: ../cryptlib.h
bss_sock.o: ../../e_os.h ../../include/openssl/bio.h
bss_sock.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bss_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bss_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bss_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bss_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bss_sock.o: ../cryptlib.h bss_sock.c
bss_sock.o: ../cryptlib.h
......@@ -186,153 +186,152 @@ bn_add.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_add.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_add.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_add.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_add.o: ../cryptlib.h bn_add.c bn_lcl.h
bn_add.o: ../cryptlib.h bn_lcl.h
bn_asm.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_asm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_asm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_asm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_asm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_asm.o: ../cryptlib.h bn_asm.c bn_lcl.h
bn_asm.o: ../cryptlib.h bn_lcl.h
bn_blind.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_blind.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_blind.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_blind.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_blind.o: ../cryptlib.h bn_blind.c bn_lcl.h
bn_blind.o: ../cryptlib.h bn_lcl.h
bn_ctx.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_ctx.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_ctx.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_ctx.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_ctx.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_ctx.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_ctx.o: ../cryptlib.h bn_ctx.c bn_lcl.h
bn_ctx.o: ../cryptlib.h bn_lcl.h
bn_div.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_div.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_div.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_div.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_div.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_div.o: ../cryptlib.h bn_div.c bn_lcl.h
bn_div.o: ../cryptlib.h bn_lcl.h
bn_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
bn_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
bn_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
bn_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
bn_err.o: ../../include/openssl/symhacks.h bn_err.c
bn_err.o: ../../include/openssl/symhacks.h
bn_exp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_exp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_exp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_exp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_exp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_exp.o: ../cryptlib.h bn_exp.c bn_lcl.h
bn_exp.o: ../cryptlib.h bn_lcl.h
bn_exp2.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_exp2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_exp2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_exp2.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_exp2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_exp2.o: ../cryptlib.h bn_exp2.c bn_lcl.h
bn_exp2.o: ../cryptlib.h bn_lcl.h
bn_gcd.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_gcd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_gcd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_gcd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_gcd.o: ../cryptlib.h bn_gcd.c bn_lcl.h
bn_gcd.o: ../cryptlib.h bn_lcl.h
bn_kron.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
bn_kron.o: ../../include/openssl/opensslconf.h bn_kron.c bn_lcl.h
bn_kron.o: ../../include/openssl/opensslconf.h bn_lcl.h
bn_lib.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_lib.o: ../cryptlib.h bn_lcl.h bn_lib.c
bn_lib.o: ../cryptlib.h bn_lcl.h
bn_mod.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_mod.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_mod.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_mod.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_mod.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_mod.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_mod.o: ../cryptlib.h bn_lcl.h bn_mod.c
bn_mod.o: ../cryptlib.h bn_lcl.h
bn_mont.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_mont.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_mont.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_mont.o: ../cryptlib.h bn_lcl.h bn_mont.c
bn_mont.o: ../cryptlib.h bn_lcl.h
bn_mpi.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_mpi.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_mpi.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_mpi.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_mpi.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_mpi.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_mpi.o: ../cryptlib.h bn_lcl.h bn_mpi.c
bn_mpi.o: ../cryptlib.h bn_lcl.h
bn_mul.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_mul.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_mul.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_mul.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_mul.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_mul.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_mul.o: ../cryptlib.h bn_lcl.h bn_mul.c
bn_mul.o: ../cryptlib.h bn_lcl.h
bn_prime.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_prime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_prime.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_prime.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
bn_prime.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
bn_prime.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_prime.c
bn_prime.o: bn_prime.h
bn_prime.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_prime.h
bn_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_print.o: ../cryptlib.h bn_lcl.h bn_print.c
bn_print.o: ../cryptlib.h bn_lcl.h
bn_rand.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_rand.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
bn_rand.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
bn_rand.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_rand.c
bn_rand.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h
bn_recp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_recp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_recp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_recp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_recp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_recp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_recp.o: ../cryptlib.h bn_lcl.h bn_recp.c
bn_recp.o: ../cryptlib.h bn_lcl.h
bn_shift.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_shift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_shift.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_shift.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_shift.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_shift.o: ../cryptlib.h bn_lcl.h bn_shift.c
bn_shift.o: ../cryptlib.h bn_lcl.h
bn_sqr.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_sqr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_sqr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_sqr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_sqr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_sqr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_sqr.o: ../cryptlib.h bn_lcl.h bn_sqr.c
bn_sqr.o: ../cryptlib.h bn_lcl.h
bn_sqrt.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_sqrt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_sqrt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_sqrt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_sqrt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_sqrt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_sqrt.o: ../cryptlib.h bn_lcl.h bn_sqrt.c
bn_sqrt.o: ../cryptlib.h bn_lcl.h
bn_word.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_word.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
bn_word.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
bn_word.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_word.o: ../cryptlib.h bn_lcl.h bn_word.c
bn_word.o: ../cryptlib.h bn_lcl.h
......@@ -84,11 +84,11 @@ buf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
buf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
buf_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
buf_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
buf_err.o: ../../include/openssl/symhacks.h buf_err.c
buf_err.o: ../../include/openssl/symhacks.h
buffer.o: ../../e_os.h ../../include/openssl/bio.h
buffer.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
buffer.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
buffer.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
buffer.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
buffer.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
buffer.o: ../cryptlib.h buffer.c
buffer.o: ../cryptlib.h
......@@ -110,16 +110,16 @@ clean:
c_cfb64.o: ../../e_os.h ../../include/openssl/cast.h
c_cfb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
c_cfb64.o: c_cfb64.c cast_lcl.h
c_cfb64.o: cast_lcl.h
c_ecb.o: ../../e_os.h ../../include/openssl/cast.h
c_ecb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
c_ecb.o: ../../include/openssl/opensslv.h c_ecb.c cast_lcl.h
c_ecb.o: ../../include/openssl/opensslv.h cast_lcl.h
c_enc.o: ../../e_os.h ../../include/openssl/cast.h
c_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
c_enc.o: c_enc.c cast_lcl.h
c_enc.o: cast_lcl.h
c_ofb64.o: ../../e_os.h ../../include/openssl/cast.h
c_ofb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
c_ofb64.o: c_ofb64.c cast_lcl.h
c_ofb64.o: cast_lcl.h
c_skey.o: ../../e_os.h ../../include/openssl/cast.h
c_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
c_skey.o: c_skey.c cast_lcl.h cast_s.h
c_skey.o: cast_lcl.h cast_s.h
......@@ -88,14 +88,14 @@ c_rle.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
c_rle.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
c_rle.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
c_rle.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
c_rle.o: ../../include/openssl/symhacks.h c_rle.c
c_rle.o: ../../include/openssl/symhacks.h
c_zlib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
c_zlib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h
c_zlib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
c_zlib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
c_zlib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
c_zlib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
c_zlib.o: ../../include/openssl/symhacks.h c_zlib.c
c_zlib.o: ../../include/openssl/symhacks.h
comp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
comp_lib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h
comp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
......@@ -103,4 +103,3 @@ comp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
comp_lib.o: ../../include/openssl/opensslconf.h
comp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
comp_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
comp_lib.o: comp_lib.c
......@@ -86,7 +86,6 @@ conf_api.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
conf_api.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
conf_api.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
conf_api.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
conf_api.o: conf_api.c
conf_def.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
conf_def.o: ../../include/openssl/conf.h ../../include/openssl/conf_api.h
conf_def.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
......@@ -94,18 +93,16 @@ conf_def.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
conf_def.o: ../../include/openssl/opensslconf.h
conf_def.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
conf_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
conf_def.o: conf_def.c conf_def.h
conf_def.o: conf_def.h
conf_err.o: ../../include/openssl/bio.h ../../include/openssl/conf.h
conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
conf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
conf_err.o: ../../include/openssl/opensslconf.h
conf_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
conf_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
conf_err.o: conf_err.c
conf_lib.o: ../../include/openssl/bio.h ../../include/openssl/conf.h
conf_lib.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h
conf_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
conf_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
conf_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
conf_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
conf_lib.o: conf_lib.c
......@@ -88,7 +88,7 @@ dh_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
dh_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
dh_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
dh_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dh_asn1.o: ../cryptlib.h dh_asn1.c
dh_asn1.o: ../cryptlib.h
dh_check.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
dh_check.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dh_check.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h
......@@ -96,62 +96,47 @@ dh_check.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dh_check.o: ../../include/openssl/opensslconf.h
dh_check.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
dh_check.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dh_check.o: ../cryptlib.h dh_check.c
dh_check.o: ../cryptlib.h
dh_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dh_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
dh_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
dh_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
dh_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
dh_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dh_err.o: dh_err.c
dh_gen.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
dh_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dh_gen.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h
dh_gen.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dh_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
dh_gen.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
dh_gen.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_gen.c
dh_gen.o: ../../include/openssl/symhacks.h ../cryptlib.h
dh_key.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
dh_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
dh_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
dh_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
dh_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
dh_key.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
dh_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h
dh_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
dh_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
dh_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
dh_key.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
dh_key.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
dh_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
dh_key.o: ../../include/openssl/engine.h ../../include/openssl/err.h
dh_key.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
dh_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
dh_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
dh_key.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
dh_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
dh_key.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
dh_key.o: ../../include/openssl/rc5.h ../../include/openssl/rd_fst.h
dh_key.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
dh_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
dh_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
dh_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
dh_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
dh_key.o: ../cryptlib.h dh_key.c
dh_key.o: ../cryptlib.h
dh_lib.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
dh_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
dh_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
dh_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
dh_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
dh_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
dh_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
dh_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
dh_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
dh_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
dh_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
dh_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
dh_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
dh_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
dh_lib.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
dh_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
dh_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
dh_lib.o: ../../include/openssl/rc5.h ../../include/openssl/rd_fst.h
dh_lib.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
dh_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
dh_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
dh_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
dh_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
dh_lib.o: ../cryptlib.h dh_lib.c
dh_lib.o: ../cryptlib.h
......@@ -90,33 +90,26 @@ dsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dsa_asn1.o: ../../include/openssl/opensslconf.h
dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
dsa_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dsa_asn1.o: ../cryptlib.h dsa_asn1.c
dsa_asn1.o: ../cryptlib.h
dsa_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dsa_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
dsa_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
dsa_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dsa_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
dsa_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
dsa_err.o: ../../include/openssl/symhacks.h dsa_err.c
dsa_err.o: ../../include/openssl/symhacks.h
dsa_gen.o: ../../e_os.h ../../include/openssl/asn1.h
dsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
dsa_gen.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
dsa_gen.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
dsa_gen.o: ../../include/openssl/des.h ../../include/openssl/dh.h
dsa_gen.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h
dsa_gen.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
dsa_gen.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
dsa_gen.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
dsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dsa_gen.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
dsa_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
dsa_gen.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
dsa_gen.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
dsa_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
dsa_gen.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
dsa_gen.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
dsa_gen.o: ../../include/openssl/rd_fst.h ../../include/openssl/rijndael.h
dsa_gen.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
dsa_gen.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
dsa_gen.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
dsa_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dsa_gen.o: ../cryptlib.h dsa_gen.c
dsa_gen.o: ../cryptlib.h
dsa_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
dsa_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dsa_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
......@@ -124,93 +117,65 @@ dsa_key.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
dsa_key.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
dsa_key.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
dsa_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
dsa_key.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_key.c
dsa_key.o: ../../include/openssl/symhacks.h ../cryptlib.h
dsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h
dsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
dsa_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
dsa_lib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
dsa_lib.o: ../../include/openssl/des.h ../../include/openssl/dh.h
dsa_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
dsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
dsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
dsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
dsa_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
dsa_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
dsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
dsa_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
dsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
dsa_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
dsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h
dsa_lib.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
dsa_lib.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
dsa_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
dsa_lib.o: ../../include/openssl/rd_fst.h ../../include/openssl/rijndael.h
dsa_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
dsa_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
dsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
dsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dsa_lib.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
dsa_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h dsa_lib.c
dsa_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
dsa_ossl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
dsa_ossl.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
dsa_ossl.o: ../../include/openssl/des.h ../../include/openssl/dh.h
dsa_ossl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
dsa_ossl.o: ../../include/openssl/engine.h ../../include/openssl/err.h
dsa_ossl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
dsa_ossl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
dsa_ossl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
dsa_ossl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
dsa_ossl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h
dsa_ossl.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
dsa_ossl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
dsa_ossl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
dsa_ossl.o: ../../include/openssl/rd_fst.h ../../include/openssl/rijndael.h
dsa_ossl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
dsa_ossl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
dsa_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
dsa_ossl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dsa_ossl.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
dsa_ossl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h dsa_ossl.c
dsa_ossl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
dsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h
dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
dsa_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
dsa_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
dsa_sign.o: ../../include/openssl/des.h ../../include/openssl/dh.h
dsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
dsa_sign.o: ../../include/openssl/engine.h ../../include/openssl/err.h
dsa_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
dsa_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
dsa_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
dsa_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h
dsa_sign.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
dsa_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
dsa_sign.o: ../../include/openssl/rd_fst.h ../../include/openssl/rijndael.h
dsa_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
dsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
dsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dsa_sign.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
dsa_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h dsa_sign.c
dsa_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h
dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
dsa_vrf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
dsa_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
dsa_vrf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
dsa_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
dsa_vrf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
dsa_vrf.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
dsa_vrf.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
dsa_vrf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
dsa_vrf.o: ../../include/openssl/engine.h ../../include/openssl/err.h
dsa_vrf.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
dsa_vrf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
dsa_vrf.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
dsa_vrf.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
dsa_vrf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
dsa_vrf.o: ../../include/openssl/rc5.h ../../include/openssl/rd_fst.h
dsa_vrf.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
dsa_vrf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
dsa_vrf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
dsa_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
dsa_vrf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
dsa_vrf.o: ../cryptlib.h dsa_vrf.c
dsa_vrf.o: ../cryptlib.h
......@@ -78,6 +78,7 @@
#include <openssl/bn.h>
#include <openssl/dsa.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
DSA *DSA_generate_parameters(int bits,
unsigned char *seed_in, int seed_len,
......
......@@ -87,7 +87,7 @@ dso_dl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
dso_dl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dso_dl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
dso_dl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
dso_dl.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_dl.c
dso_dl.o: ../../include/openssl/symhacks.h ../cryptlib.h
dso_dlfcn.o: ../../e_os.h ../../include/openssl/bio.h
dso_dlfcn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dso_dlfcn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
......@@ -95,20 +95,20 @@ dso_dlfcn.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dso_dlfcn.o: ../../include/openssl/opensslconf.h
dso_dlfcn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
dso_dlfcn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dso_dlfcn.o: ../cryptlib.h dso_dlfcn.c
dso_dlfcn.o: ../cryptlib.h
dso_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
dso_err.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
dso_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dso_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
dso_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
dso_err.o: ../../include/openssl/symhacks.h dso_err.c
dso_err.o: ../../include/openssl/symhacks.h
dso_lib.o: ../../e_os.h ../../include/openssl/bio.h
dso_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dso_lib.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
dso_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dso_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
dso_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
dso_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_lib.c
dso_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h
dso_null.o: ../../e_os.h ../../include/openssl/bio.h
dso_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dso_null.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
......@@ -116,7 +116,7 @@ dso_null.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dso_null.o: ../../include/openssl/opensslconf.h
dso_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
dso_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dso_null.o: ../cryptlib.h dso_null.c
dso_null.o: ../cryptlib.h
dso_openssl.o: ../../e_os.h ../../include/openssl/bio.h
dso_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dso_openssl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
......@@ -124,14 +124,14 @@ dso_openssl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dso_openssl.o: ../../include/openssl/opensslconf.h
dso_openssl.o: ../../include/openssl/opensslv.h
dso_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
dso_openssl.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_openssl.c
dso_openssl.o: ../../include/openssl/symhacks.h ../cryptlib.h
dso_vms.o: ../../e_os.h ../../include/openssl/bio.h
dso_vms.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dso_vms.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
dso_vms.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dso_vms.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
dso_vms.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
dso_vms.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_vms.c
dso_vms.o: ../../include/openssl/symhacks.h ../cryptlib.h
dso_win32.o: ../../e_os.h ../../include/openssl/bio.h
dso_win32.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
dso_win32.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
......@@ -139,4 +139,4 @@ dso_win32.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
dso_win32.o: ../../include/openssl/opensslconf.h
dso_win32.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
dso_win32.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
dso_win32.o: ../cryptlib.h dso_win32.c
dso_win32.o: ../cryptlib.h
......@@ -84,45 +84,44 @@ clean:
ec_cvt.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
ec_cvt.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
ec_cvt.o: ../../include/openssl/symhacks.h ec_cvt.c ec_lcl.h
ec_cvt.o: ../../include/openssl/symhacks.h ec_lcl.h
ec_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ec_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ec_err.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ec_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ec_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ec_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ec_err.o: ec_err.c
ec_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ec_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ec_lib.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ec_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ec_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ec_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ec_lib.o: ec_lcl.h ec_lib.c
ec_lib.o: ec_lcl.h
ec_mult.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ec_mult.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ec_mult.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ec_mult.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ec_mult.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ec_mult.o: ec_lcl.h ec_mult.c
ec_mult.o: ec_lcl.h
ecp_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ecp_mont.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ecp_mont.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ecp_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ecp_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ecp_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ecp_mont.o: ec_lcl.h ecp_mont.c
ecp_mont.o: ec_lcl.h
ecp_nist.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
ecp_nist.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
ecp_nist.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_nist.c
ecp_nist.o: ../../include/openssl/symhacks.h ec_lcl.h
ecp_recp.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
ecp_recp.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
ecp_recp.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_recp.c
ecp_recp.o: ../../include/openssl/symhacks.h ec_lcl.h
ecp_smpl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ecp_smpl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ecp_smpl.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ecp_smpl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ecp_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ecp_smpl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ecp_smpl.o: ec_lcl.h ecp_smpl.c
ecp_smpl.o: ec_lcl.h
此差异已折叠。
......@@ -84,36 +84,28 @@ err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
err.o: ../../include/openssl/symhacks.h ../cryptlib.h err.c
err.o: ../../include/openssl/symhacks.h ../cryptlib.h
err_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
err_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
err_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
err_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
err_all.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
err_all.o: ../../include/openssl/des.h ../../include/openssl/dh.h
err_all.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
err_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
err_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h
err_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
err_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
err_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
err_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
err_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
err_all.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
err_all.o: ../../include/openssl/ec.h ../../include/openssl/engine.h
err_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h
err_all.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
err_all.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h
err_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
err_all.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
err_all.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
err_all.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
err_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
err_all.o: ../../include/openssl/rd_fst.h ../../include/openssl/rijndael.h
err_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
err_all.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
err_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
err_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
err_all.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
err_all.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
err_all.o: err_all.c
err_prn.o: ../../e_os.h ../../include/openssl/bio.h
err_prn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
err_prn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
err_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
err_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
err_prn.o: ../cryptlib.h err_prn.c
err_prn.o: ../cryptlib.h
此差异已折叠。
......@@ -96,7 +96,7 @@ static int md_new(BIO *bi)
{
EVP_MD_CTX *ctx;
ctx=(EVP_MD_CTX *)OPENSSL_malloc(sizeof(EVP_MD_CTX));
ctx=EVP_MD_CTX_create();
if (ctx == NULL) return(0);
bi->init=0;
......@@ -108,7 +108,7 @@ static int md_new(BIO *bi)
static int md_free(BIO *a)
{
if (a == NULL) return(0);
OPENSSL_free(a->ptr);
EVP_MD_CTX_destroy(a->ptr);
a->ptr=NULL;
a->init=0;
a->flags=0;
......@@ -121,7 +121,7 @@ static int md_read(BIO *b, char *out, int outl)
EVP_MD_CTX *ctx;
if (out == NULL) return(0);
ctx=(EVP_MD_CTX *)b->ptr;
ctx=b->ptr;
if ((ctx == NULL) || (b->next_bio == NULL)) return(0);
......@@ -145,7 +145,7 @@ static int md_write(BIO *b, const char *in, int inl)
EVP_MD_CTX *ctx;
if ((in == NULL) || (inl <= 0)) return(0);
ctx=(EVP_MD_CTX *)b->ptr;
ctx=b->ptr;
if ((ctx != NULL) && (b->next_bio != NULL))
ret=BIO_write(b->next_bio,in,inl);
......@@ -170,7 +170,7 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
long ret=1;
BIO *dbio;
ctx=(EVP_MD_CTX *)b->ptr;
ctx=b->ptr;
switch (cmd)
{
......@@ -184,7 +184,7 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
case BIO_C_GET_MD:
if (b->init)
{
ppmd=(const EVP_MD **)ptr;
ppmd=ptr;
*ppmd=ctx->digest;
}
else
......@@ -193,7 +193,7 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
case BIO_C_GET_MD_CTX:
if (b->init)
{
pctx=(EVP_MD_CTX **)ptr;
pctx=ptr;
*pctx=ctx;
}
else
......@@ -206,14 +206,14 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
break;
case BIO_C_SET_MD:
md=(EVP_MD *)ptr;
md=ptr;
EVP_DigestInit(ctx,md);
b->init=1;
break;
case BIO_CTRL_DUP:
dbio=(BIO *)ptr;
dctx=(EVP_MD_CTX *)dbio->ptr;
memcpy(dctx,ctx,sizeof(ctx));
dbio=ptr;
dctx=dbio->ptr;
EVP_MD_CTX_copy(dctx,ctx);
b->init=1;
break;
default:
......@@ -243,7 +243,7 @@ static int md_gets(BIO *bp, char *buf, int size)
unsigned int ret;
ctx=(EVP_MD_CTX *)bp->ptr;
ctx=bp->ptr;
if (size < ctx->digest->md_size)
return(0);
EVP_DigestFinal(ctx,(unsigned char *)buf,&ret);
......
......@@ -199,6 +199,8 @@ static int ok_new(BIO *bi)
ctx->blockout= 0;
ctx->sigio=1;
EVP_MD_CTX_init(&ctx->md);
bi->init=0;
bi->ptr=(char *)ctx;
bi->flags=0;
......@@ -208,6 +210,7 @@ static int ok_new(BIO *bi)
static int ok_free(BIO *a)
{
if (a == NULL) return(0);
EVP_MD_CTX_cleanup(&((BIO_OK_CTX *)a->ptr)->md);
memset(a->ptr,0,sizeof(BIO_OK_CTX));
OPENSSL_free(a->ptr);
a->ptr=NULL;
......@@ -353,7 +356,7 @@ static long ok_ctrl(BIO *b, int cmd, long num, void *ptr)
long ret=1;
int i;
ctx=(BIO_OK_CTX *)b->ptr;
ctx=b->ptr;
switch (cmd)
{
......@@ -411,14 +414,14 @@ static long ok_ctrl(BIO *b, int cmd, long num, void *ptr)
ret=(long)ctx->cont;
break;
case BIO_C_SET_MD:
md=(EVP_MD *)ptr;
EVP_DigestInit(&(ctx->md),md);
md=ptr;
EVP_DigestInit(&ctx->md,md);
b->init=1;
break;
case BIO_C_GET_MD:
if (b->init)
{
ppmd=(const EVP_MD **)ptr;
ppmd=ptr;
*ppmd=ctx->md.digest;
}
else
......@@ -462,14 +465,17 @@ static void sig_out(BIO* b)
BIO_OK_CTX *ctx;
EVP_MD_CTX *md;
ctx=(BIO_OK_CTX *)b->ptr;
md= &(ctx->md);
ctx=b->ptr;
md=&ctx->md;
if(ctx->buf_len+ 2* md->digest->md_size > OK_BLOCK_SIZE) return;
EVP_DigestInit(md, md->digest);
RAND_pseudo_bytes(&(md->md.base[0]), md->digest->md_size);
memcpy(&(ctx->buf[ctx->buf_len]), &(md->md.base[0]), md->digest->md_size);
/* FIXME: there's absolutely no guarantee this makes any sense at all,
* particularly now EVP_MD_CTX has been restructured.
*/
RAND_pseudo_bytes(md->md_data, md->digest->md_size);
memcpy(&(ctx->buf[ctx->buf_len]), md->md_data, md->digest->md_size);
longswap(&(ctx->buf[ctx->buf_len]), md->digest->md_size);
ctx->buf_len+= md->digest->md_size;
......@@ -487,14 +493,14 @@ static void sig_in(BIO* b)
unsigned char tmp[EVP_MAX_MD_SIZE];
int ret= 0;
ctx=(BIO_OK_CTX *)b->ptr;
md= &(ctx->md);
ctx=b->ptr;
md=&ctx->md;
if(ctx->buf_len- ctx->buf_off < 2* md->digest->md_size) return;
EVP_DigestInit(md, md->digest);
memcpy(&(md->md.base[0]), &(ctx->buf[ctx->buf_off]), md->digest->md_size);
longswap(&(md->md.base[0]), md->digest->md_size);
memcpy(md->md_data, &(ctx->buf[ctx->buf_off]), md->digest->md_size);
longswap(md->md_data, md->digest->md_size);
ctx->buf_off+= md->digest->md_size;
EVP_DigestUpdate(md, WELLKNOWN, strlen(WELLKNOWN));
......@@ -523,8 +529,8 @@ static void block_out(BIO* b)
EVP_MD_CTX *md;
unsigned long tl;
ctx=(BIO_OK_CTX *)b->ptr;
md= &(ctx->md);
ctx=b->ptr;
md=&ctx->md;
tl= ctx->buf_len- OK_BLOCK_BLOCK;
tl= swapem(tl);
......@@ -543,8 +549,8 @@ static void block_in(BIO* b)
long tl= 0;
unsigned char tmp[EVP_MAX_MD_SIZE];
ctx=(BIO_OK_CTX *)b->ptr;
md= &(ctx->md);
ctx=b->ptr;
md=&ctx->md;
memcpy(&tl, ctx->buf, OK_BLOCK_BLOCK);
tl= swapem(tl);
......
......@@ -61,35 +61,60 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
void EVP_MD_CTX_init(EVP_MD_CTX *ctx)
{
memset(ctx,'\0',sizeof *ctx);
}
EVP_MD_CTX *EVP_MD_CTX_create(void)
{
EVP_MD_CTX *ctx=OPENSSL_malloc(sizeof *ctx);
EVP_MD_CTX_init(ctx);
return ctx;
}
int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type)
{
ctx->digest=type;
return type->init(&(ctx->md));
if(ctx->digest != type)
{
OPENSSL_free(ctx->md_data);
ctx->digest=type;
ctx->md_data=OPENSSL_malloc(type->ctx_size);
}
return type->init(ctx->md_data);
}
int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data,
unsigned int count)
{
return ctx->digest->update(&(ctx->md.base[0]),data,(unsigned long)count);
return ctx->digest->update(ctx->md_data,data,(unsigned long)count);
}
/* The caller can assume that this removes any secret data from the context */
int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size)
{
int ret;
ret = ctx->digest->final(md,&(ctx->md.base[0]));
ret=ctx->digest->final(md,ctx->md_data);
if (size != NULL)
*size=ctx->digest->md_size;
memset(&(ctx->md),0,sizeof(ctx->md));
/* FIXME: add a cleanup function to the ctx? */
memset(ctx->md_data,0,ctx->digest->ctx_size);
return ret;
}
int EVP_MD_CTX_copy(EVP_MD_CTX *out, EVP_MD_CTX *in)
int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in)
{
if ((in == NULL) || (in->digest == NULL)) {
EVPerr(EVP_F_EVP_MD_CTX_COPY,EVP_R_INPUT_NOT_INITIALIZED);
return 0;
}
memcpy((char *)out,(char *)in,in->digest->ctx_size);
EVP_MD_CTX_cleanup(out);
memcpy(out,in,sizeof *out);
out->md_data=OPENSSL_malloc(out->digest->ctx_size);
/* FIXME: we really need a per-MD copy function */
memcpy(out->md_data,in->md_data,out->digest->ctx_size);
return 1;
}
......@@ -97,9 +122,29 @@ int EVP_Digest(void *data, unsigned int count,
unsigned char *md, unsigned int *size, const EVP_MD *type)
{
EVP_MD_CTX ctx;
if (!EVP_DigestInit(&ctx, type))
return 0;
if (!EVP_DigestUpdate(&ctx, data, count))
return 0;
return EVP_DigestFinal(&ctx, md, size);
int ret;
EVP_MD_CTX_init(&ctx);
ret=EVP_DigestInit(&ctx, type)
&& EVP_DigestUpdate(&ctx, data, count)
&& EVP_DigestFinal(&ctx, md, size);
EVP_MD_CTX_cleanup(&ctx);
return ret;
}
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx)
{
EVP_MD_CTX_cleanup(ctx);
OPENSSL_free(ctx);
}
/* This call frees resources associated with the context */
int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
{
/* assume ctx->md_data was cleaned in EVP_Digest_Final */
OPENSSL_free(ctx->md_data);
memset(ctx,'\0',sizeof *ctx);
return 1;
}
......@@ -53,6 +53,7 @@
#include <openssl/err.h>
#include <string.h>
#include <assert.h>
#include <openssl/rijndael.h>
static int aes_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
......@@ -70,8 +71,7 @@ static const EVP_CIPHER name##_cipher_st = \
aes_init, \
ciph_func, \
NULL, \
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ \
sizeof((((EVP_CIPHER_CTX *)NULL)->c.rijndael)), \
sizeof(RIJNDAEL_KEY), \
EVP_CIPHER_set_asn1_iv, \
EVP_CIPHER_get_asn1_iv, \
NULL, \
......@@ -93,7 +93,7 @@ IMPLEMENT_AES_CIPHER(aes_256_cbc, aes_cbc, 32, 32, EVP_CIPH_CBC_MODE)
static int aes_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
RIJNDAEL_KEY *k=&ctx->c.rijndael;
RIJNDAEL_KEY *k=ctx->cipher_data;
if (enc)
k->rounds = rijndaelKeySetupEnc(k->rd_key, key, ctx->key_len * 8);
else
......@@ -105,7 +105,7 @@ static int aes_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
static int aes_ecb(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
RIJNDAEL_KEY *k=&ctx->c.rijndael;
RIJNDAEL_KEY *k=ctx->cipher_data;
while(inl > 0)
{
if(ctx->encrypt)
......@@ -126,7 +126,7 @@ static int aes_cbc(EVP_CIPHER_CTX *ctx, unsigned char *out,
{
int n;
unsigned char tmp[16];
RIJNDAEL_KEY *k=&ctx->c.rijndael;
RIJNDAEL_KEY *k=ctx->cipher_data;
while(inl > 0)
{
if(ctx->encrypt)
......
......@@ -62,18 +62,26 @@
#include <openssl/evp.h>
#include "evp_locl.h"
#include <openssl/objects.h>
#include <openssl/blowfish.h>
static int bf_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
IMPLEMENT_BLOCK_CIPHER(bf, bf_ks, BF, bf_ks, NID_bf, 8, 16, 8,
typedef struct
{
BF_KEY ks;
} EVP_BF_KEY;
#define data(ctx) EVP_C_DATA(EVP_BF_KEY,ctx)
IMPLEMENT_BLOCK_CIPHER(bf, ks, BF, EVP_BF_KEY, NID_bf, 8, 16, 8,
EVP_CIPH_VARIABLE_LENGTH, bf_init_key, NULL,
EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL)
static int bf_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
BF_set_key(&(ctx->c.bf_ks),EVP_CIPHER_CTX_key_length(ctx),key);
BF_set_key(&data(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx),key);
return 1;
}
......
......@@ -63,19 +63,27 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include "evp_locl.h"
#include <openssl/cast.h>
static int cast_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv,int enc);
IMPLEMENT_BLOCK_CIPHER(cast5, cast_ks, CAST, cast_ks,
NID_cast5, 8, EVP_CAST5_KEY_SIZE, 8,
typedef struct
{
CAST_KEY ks;
} EVP_CAST_KEY;
#define data(ctx) EVP_C_DATA(EVP_CAST_KEY,ctx)
IMPLEMENT_BLOCK_CIPHER(cast5, ks, CAST, EVP_CAST_KEY,
NID_cast5, 8, CAST_KEY_LENGTH, 8,
EVP_CIPH_VARIABLE_LENGTH, cast_init_key, NULL,
EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL)
static int cast_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
CAST_set_key(&(ctx->c.cast_ks),EVP_CIPHER_CTX_key_length(ctx),key);
CAST_set_key(&data(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx),key);
return 1;
}
......
......@@ -62,6 +62,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include "evp_locl.h"
#include <openssl/des.h>
static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
......@@ -72,21 +73,21 @@ static int des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
BLOCK_CIPHER_ecb_loop()
des_ecb_encrypt((des_cblock *)(in + i), (des_cblock *)(out + i), ctx->c.des_ks, ctx->encrypt);
des_ecb_encrypt((des_cblock *)(in + i), (des_cblock *)(out + i), ctx->cipher_data, ctx->encrypt);
return 1;
}
static int des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
des_ofb64_encrypt(in, out, (long)inl, ctx->c.des_ks, (des_cblock *)ctx->iv, &ctx->num);
des_ofb64_encrypt(in, out, (long)inl, ctx->cipher_data, (des_cblock *)ctx->iv, &ctx->num);
return 1;
}
static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
des_ncbc_encrypt(in, out, (long)inl, ctx->c.des_ks,
des_ncbc_encrypt(in, out, (long)inl, ctx->cipher_data,
(des_cblock *)ctx->iv, ctx->encrypt);
return 1;
}
......@@ -94,12 +95,12 @@ static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
static int des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
des_cfb64_encrypt(in, out, (long)inl, ctx->c.des_ks,
des_cfb64_encrypt(in, out, (long)inl, ctx->cipher_data,
(des_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
return 1;
}
BLOCK_CIPHER_defs(des, des_ks, NID_des, 8, 8, 8,
BLOCK_CIPHER_defs(des, des_key_schedule, NID_des, 8, 8, 8,
0, des_init_key, NULL,
EVP_CIPHER_set_asn1_iv,
EVP_CIPHER_get_asn1_iv,
......@@ -111,7 +112,7 @@ static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
{
des_cblock *deskey = (des_cblock *)key;
des_set_key_unchecked(deskey,ctx->c.des_ks);
des_set_key_unchecked(deskey,ctx->cipher_data);
return 1;
}
......
......@@ -62,6 +62,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include "evp_locl.h"
#include <openssl/des.h>
static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv,int enc);
......@@ -69,6 +70,15 @@ static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv,int enc);
typedef struct
{
des_key_schedule ks1;/* key schedule */
des_key_schedule ks2;/* key schedule (for ede) */
des_key_schedule ks3;/* key schedule (for ede3) */
} DES_EDE_KEY;
#define data(ctx) ((DES_EDE_KEY *)(ctx)->cipher_data)
/* Because of various casts and different args can't use IMPLEMENT_BLOCK_CIPHER */
static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
......@@ -76,8 +86,9 @@ static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
{
BLOCK_CIPHER_ecb_loop()
des_ecb3_encrypt((des_cblock *)(in + i), (des_cblock *)(out + i),
ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3,
ctx->encrypt);
&data(ctx)->ks1, &data(ctx)->ks2,
&data(ctx)->ks3,
ctx->encrypt);
return 1;
}
......@@ -85,8 +96,8 @@ static int des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
des_ede3_ofb64_encrypt(in, out, (long)inl,
ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3,
(des_cblock *)ctx->iv, &ctx->num);
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
(des_cblock *)ctx->iv, &ctx->num);
return 1;
}
......@@ -105,8 +116,8 @@ static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
}
#endif /* KSSL_DEBUG */
des_ede3_cbc_encrypt(in, out, (long)inl,
ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3,
(des_cblock *)ctx->iv, ctx->encrypt);
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
(des_cblock *)ctx->iv, ctx->encrypt);
return 1;
}
......@@ -114,12 +125,12 @@ static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
des_ede3_cfb64_encrypt(in, out, (long)inl,
ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3,
(des_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
(des_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
return 1;
}
BLOCK_CIPHER_defs(des_ede, des_ede, NID_des_ede, 8, 16, 8,
BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8,
0, des_ede_init_key, NULL,
EVP_CIPHER_set_asn1_iv,
EVP_CIPHER_get_asn1_iv,
......@@ -130,7 +141,7 @@ BLOCK_CIPHER_defs(des_ede, des_ede, NID_des_ede, 8, 16, 8,
#define des_ede3_cbc_cipher des_ede_cbc_cipher
#define des_ede3_ecb_cipher des_ede_ecb_cipher
BLOCK_CIPHER_defs(des_ede3, des_ede, NID_des_ede3, 8, 24, 8,
BLOCK_CIPHER_defs(des_ede3, DES_EDE_KEY, NID_des_ede3, 8, 24, 8,
0, des_ede3_init_key, NULL,
EVP_CIPHER_set_asn1_iv,
EVP_CIPHER_get_asn1_iv,
......@@ -141,11 +152,10 @@ static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
{
des_cblock *deskey = (des_cblock *)key;
des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
memcpy( (char *)ctx->c.des_ede.ks3,
(char *)ctx->c.des_ede.ks1,
sizeof(ctx->c.des_ede.ks1));
des_set_key_unchecked(&deskey[0],&data(ctx)->ks1);
des_set_key_unchecked(&deskey[1],&data(ctx)->ks2);
memcpy(&data(ctx)->ks3,&data(ctx)->ks1,
sizeof(data(ctx)->ks1));
return 1;
}
......@@ -164,9 +174,9 @@ static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
}
#endif /* KSSL_DEBUG */
des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3);
des_set_key_unchecked(&deskey[0],&data(ctx)->ks1);
des_set_key_unchecked(&deskey[1],&data(ctx)->ks2);
des_set_key_unchecked(&deskey[2],&data(ctx)->ks3);
return 1;
}
......
......@@ -63,6 +63,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include "evp_locl.h"
#include <openssl/idea.h>
static int idea_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv,int enc);
......@@ -75,17 +76,22 @@ static int idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
BLOCK_CIPHER_ecb_loop()
idea_ecb_encrypt(in + i, out + i, &ctx->c.idea_ks);
idea_ecb_encrypt(in + i, out + i, ctx->cipher_data);
return 1;
}
/* Can't use IMPLEMENT_BLOCK_CIPHER because idea_ecb_encrypt is different */
BLOCK_CIPHER_func_cbc(idea, idea, idea_ks)
BLOCK_CIPHER_func_ofb(idea, idea, idea_ks)
BLOCK_CIPHER_func_cfb(idea, idea, idea_ks)
typedef struct
{
IDEA_KEY_SCHEDULE ks;
} EVP_IDEA_KEY;
BLOCK_CIPHER_func_cbc(idea, idea, EVP_IDEA_KEY, ks)
BLOCK_CIPHER_func_ofb(idea, idea, EVP_IDEA_KEY, ks)
BLOCK_CIPHER_func_cfb(idea, idea, EVP_IDEA_KEY, ks)
BLOCK_CIPHER_defs(idea, idea_ks, NID_idea, 8, 16, 8,
BLOCK_CIPHER_defs(idea, IDEA_KEY_SCHEDULE, NID_idea, 8, 16, 8,
0, idea_init_key, NULL,
EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL)
......@@ -96,13 +102,13 @@ static int idea_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
if (EVP_CIPHER_CTX_mode(ctx) == EVP_CIPH_OFB_MODE) enc = 1;
else if (EVP_CIPHER_CTX_mode(ctx) == EVP_CIPH_CFB_MODE) enc = 1;
}
if (enc) idea_set_encrypt_key(key,&(ctx->c.idea_ks));
if (enc) idea_set_encrypt_key(key,ctx->cipher_data);
else
{
IDEA_KEY_SCHEDULE tmp;
idea_set_encrypt_key(key,&tmp);
idea_set_decrypt_key(&tmp,&(ctx->c.idea_ks));
idea_set_decrypt_key(&tmp,ctx->cipher_data);
memset((unsigned char *)&tmp,0,
sizeof(IDEA_KEY_SCHEDULE));
}
......
......@@ -87,7 +87,7 @@ const EVP_CIPHER *EVP_enc_null(void)
static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
memset(&(ctx->c),0,sizeof(ctx->c));
/* memset(&(ctx->c),0,sizeof(ctx->c));*/
return 1;
}
......
......@@ -63,6 +63,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include "evp_locl.h"
#include <openssl/rc2.h>
static int rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv,int enc);
......@@ -72,9 +73,17 @@ static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
static int rc2_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr);
IMPLEMENT_BLOCK_CIPHER(rc2, rc2.ks, RC2, rc2, NID_rc2,
typedef struct
{
int key_bits; /* effective key bits */
RC2_KEY ks; /* key schedule */
} EVP_RC2_KEY;
#define data(ctx) ((EVP_RC2_KEY *)(ctx)->cipher_data)
IMPLEMENT_BLOCK_CIPHER(rc2, ks, RC2, EVP_RC2_KEY, NID_rc2,
8,
EVP_RC2_KEY_SIZE, 8,
RC2_KEY_LENGTH, 8,
EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT,
rc2_init_key, NULL,
rc2_set_asn1_type_and_iv, rc2_get_asn1_type_and_iv,
......@@ -92,8 +101,7 @@ static const EVP_CIPHER r2_64_cbc_cipher=
rc2_init_key,
rc2_cbc_cipher,
NULL,
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2)),
sizeof(EVP_RC2_KEY),
rc2_set_asn1_type_and_iv,
rc2_get_asn1_type_and_iv,
rc2_ctrl,
......@@ -108,8 +116,7 @@ static const EVP_CIPHER r2_40_cbc_cipher=
rc2_init_key,
rc2_cbc_cipher,
NULL,
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2)),
sizeof(EVP_RC2_KEY),
rc2_set_asn1_type_and_iv,
rc2_get_asn1_type_and_iv,
rc2_ctrl,
......@@ -129,8 +136,8 @@ const EVP_CIPHER *EVP_rc2_40_cbc(void)
static int rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
RC2_set_key(&(ctx->c.rc2.ks),EVP_CIPHER_CTX_key_length(ctx),
key,ctx->c.rc2.key_bits);
RC2_set_key(&data(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx),
key,data(ctx)->key_bits);
return 1;
}
......@@ -196,26 +203,26 @@ static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
static int rc2_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
{
switch(type) {
case EVP_CTRL_INIT:
c->c.rc2.key_bits = EVP_CIPHER_CTX_key_length(c) * 8;
return 1;
switch(type)
{
case EVP_CTRL_INIT:
data(c)->key_bits = EVP_CIPHER_CTX_key_length(c) * 8;
return 1;
case EVP_CTRL_GET_RC2_KEY_BITS:
*(int *)ptr = c->c.rc2.key_bits;
return 1;
case EVP_CTRL_GET_RC2_KEY_BITS:
*(int *)ptr = data(c)->key_bits;
return 1;
case EVP_CTRL_SET_RC2_KEY_BITS:
if(arg > 0) {
c->c.rc2.key_bits = arg;
return 1;
case EVP_CTRL_SET_RC2_KEY_BITS:
if(arg > 0)
{
data(c)->key_bits = arg;
return 1;
}
return 0;
return 0;
default:
return -1;
default:
return -1;
}
}
......
......@@ -62,6 +62,19 @@
#include "cryptlib.h"
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/rc4.h>
/* FIXME: surely this is available elsewhere? */
#define EVP_RC4_KEY_SIZE 16
typedef struct
{
/* FIXME: what is the key for? */
unsigned char key[EVP_RC4_KEY_SIZE];
RC4_KEY ks; /* working key */
} EVP_RC4_KEY;
#define data(ctx) ((EVP_RC4_KEY *)(ctx)->cipher_data)
static int rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv,int enc);
......@@ -75,8 +88,7 @@ static const EVP_CIPHER r4_cipher=
rc4_init_key,
rc4_cipher,
NULL,
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc4)),
sizeof(EVP_RC4_KEY),
NULL,
NULL,
NULL
......@@ -90,8 +102,7 @@ static const EVP_CIPHER r4_40_cipher=
rc4_init_key,
rc4_cipher,
NULL,
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc4)),
sizeof(EVP_RC4_KEY),
NULL,
NULL,
NULL
......@@ -110,16 +121,16 @@ const EVP_CIPHER *EVP_rc4_40(void)
static int rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
memcpy(&(ctx->c.rc4.key[0]),key,EVP_CIPHER_CTX_key_length(ctx));
RC4_set_key(&(ctx->c.rc4.ks),EVP_CIPHER_CTX_key_length(ctx),
ctx->c.rc4.key);
memcpy(&data(ctx)->key[0],key,EVP_CIPHER_CTX_key_length(ctx));
RC4_set_key(&data(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx),
data(ctx)->key);
return 1;
}
static int rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
RC4(&(ctx->c.rc4.ks),inl,in,out);
RC4(&data(ctx)->ks,inl,in,out);
return 1;
}
#endif
......@@ -63,55 +63,62 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include "evp_locl.h"
#include <openssl/rc5.h>
static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv,int enc);
static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr);
IMPLEMENT_BLOCK_CIPHER(rc5_32_12_16, rc5.ks, RC5_32, rc5, NID_rc5,
8, EVP_RC5_32_12_16_KEY_SIZE, 8,
EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT,
r_32_12_16_init_key, NULL,
NULL, NULL, rc5_ctrl)
typedef struct
{
int rounds; /* number of rounds */
RC5_32_KEY ks; /* key schedule */
} EVP_RC5_KEY;
#define data(ctx) EVP_C_DATA(EVP_RC5_KEY,ctx)
IMPLEMENT_BLOCK_CIPHER(rc5_32_12_16, ks, RC5_32, EVP_RC5_KEY, NID_rc5,
8, RC5_32_KEY_LENGTH, 8,
EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT,
r_32_12_16_init_key, NULL,
NULL, NULL, rc5_ctrl)
static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
{
switch(type) {
case EVP_CTRL_INIT:
c->c.rc5.rounds = RC5_12_ROUNDS;
return 1;
switch(type)
{
case EVP_CTRL_INIT:
data(c)->rounds = RC5_12_ROUNDS;
return 1;
case EVP_CTRL_GET_RC5_ROUNDS:
*(int *)ptr = c->c.rc5.rounds;
return 1;
case EVP_CTRL_GET_RC5_ROUNDS:
*(int *)ptr = data(c)->rounds;
return 1;
case EVP_CTRL_SET_RC5_ROUNDS:
switch(arg) {
case RC5_8_ROUNDS:
case RC5_12_ROUNDS:
case RC5_16_ROUNDS:
c->c.rc5.rounds = arg;
return 1;
case EVP_CTRL_SET_RC5_ROUNDS:
switch(arg)
{
case RC5_8_ROUNDS:
case RC5_12_ROUNDS:
case RC5_16_ROUNDS:
data(c)->rounds = arg;
return 1;
default:
EVPerr(EVP_F_RC5_CTRL, EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS);
return 0;
default:
EVPerr(EVP_F_RC5_CTRL, EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS);
return 0;
}
default:
return -1;
default:
return -1;
}
}
static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
RC5_32_set_key(&(ctx->c.rc5.ks),EVP_CIPHER_CTX_key_length(ctx),
key,ctx->c.rc5.rounds);
RC5_32_set_key(&data(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx),
key,data(ctx)->rounds);
return 1;
}
......
......@@ -61,11 +61,23 @@
#include "cryptlib.h"
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/des.h>
static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv,int enc);
static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl);
typedef struct
{
des_key_schedule ks;/* key schedule */
des_cblock inw;
des_cblock outw;
} DESX_CBC_KEY;
#define data(ctx) ((DESX_CBC_KEY *)(ctx)->cipher_data)
static const EVP_CIPHER d_xcbc_cipher=
{
NID_desx_cbc,
......@@ -74,8 +86,7 @@ static const EVP_CIPHER d_xcbc_cipher=
desx_cbc_init_key,
desx_cbc_cipher,
NULL,
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
sizeof((((EVP_CIPHER_CTX *)NULL)->c.desx_cbc)),
sizeof(DESX_CBC_KEY),
EVP_CIPHER_set_asn1_iv,
EVP_CIPHER_get_asn1_iv,
NULL
......@@ -91,9 +102,9 @@ static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
{
des_cblock *deskey = (des_cblock *)key;
des_set_key_unchecked(deskey,ctx->c.desx_cbc.ks);
memcpy(&(ctx->c.desx_cbc.inw[0]),&(key[8]),8);
memcpy(&(ctx->c.desx_cbc.outw[0]),&(key[16]),8);
des_set_key_unchecked(deskey,&data(ctx)->ks);
memcpy(&data(ctx)->inw[0],&key[8],8);
memcpy(&data(ctx)->outw[0],&key[16],8);
return 1;
}
......@@ -101,11 +112,11 @@ static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
des_xcbc_encrypt(in,out,inl,ctx->c.desx_cbc.ks,
(des_cblock *)&(ctx->iv[0]),
&ctx->c.desx_cbc.inw,
&ctx->c.desx_cbc.outw,
ctx->encrypt);
des_xcbc_encrypt(in,out,inl,&data(ctx)->ks,
(des_cblock *)&(ctx->iv[0]),
&data(ctx)->inw,
&data(ctx)->outw,
ctx->encrypt);
return 1;
}
#endif
......@@ -70,6 +70,7 @@
#ifndef OPENSSL_NO_BIO
#include <openssl/bio.h>
#endif
#if 0
#ifndef OPENSSL_NO_MD2
#include <openssl/md2.h>
#endif
......@@ -112,12 +113,15 @@
#ifndef OPENSSL_NO_AES
#include <openssl/rijndael.h>
#endif
#endif // 0
/*
#define EVP_RC2_KEY_SIZE 16
#define EVP_RC4_KEY_SIZE 16
#define EVP_BLOWFISH_KEY_SIZE 16
#define EVP_CAST5_KEY_SIZE 16
#define EVP_RC5_32_12_16_KEY_SIZE 16
*/
#define EVP_MAX_MD_SIZE (16+20) /* The SSLv3 md5+sha1 type */
#define EVP_MAX_KEY_LENGTH 32
#define EVP_MAX_IV_LENGTH 16
......@@ -275,7 +279,7 @@ typedef struct env_md_st
int (*verify)();
int required_pkey_type[5]; /*EVP_PKEY_xxx */
int block_size;
int ctx_size; /* how big does the ctx need to be */
int ctx_size; /* how big does the ctx->md_data need to be */
} EVP_MD;
......@@ -307,6 +311,7 @@ typedef struct env_md_st
typedef struct env_md_ctx_st
{
const EVP_MD *digest;
#if 0
union {
unsigned char base[4];
#ifndef OPENSSL_NO_MD2
......@@ -328,6 +333,8 @@ typedef struct env_md_ctx_st
MDC2_CTX mdc2;
#endif
} md;
#endif
void *md_data;
} EVP_MD_CTX;
typedef struct evp_cipher_st EVP_CIPHER;
......@@ -345,7 +352,7 @@ struct evp_cipher_st
int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl);/* encrypt/decrypt data */
int (*cleanup)(EVP_CIPHER_CTX *); /* cleanup ctx */
int ctx_size; /* how big the ctx needs to be */
int ctx_size; /* how big ctx->cipher_data needs to be */
int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Populate a ASN1_TYPE with parameters */
int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Get parameters from a ASN1_TYPE */
int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr); /* Miscellaneous operations */
......@@ -404,6 +411,7 @@ struct evp_cipher_ctx_st
void *app_data; /* application stuff */
int key_len; /* May change for variable length cipher */
unsigned long flags; /* Various flags */
#if 0
union
{
#ifndef OPENSSL_NO_RC4
......@@ -458,6 +466,8 @@ struct evp_cipher_ctx_st
struct session_op *dev_crypto;
#endif
} c;
#endif // 0
void *cipher_data; /* per EVP data */
int final_used;
int block_mask;
unsigned char final[EVP_MAX_BLOCK_LENGTH];/* possible final block */
......@@ -562,7 +572,11 @@ void BIO_set_md(BIO *,const EVP_MD *md);
OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS);
int EVP_MD_CTX_copy(EVP_MD_CTX *out,EVP_MD_CTX *in);
void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
EVP_MD_CTX *EVP_MD_CTX_create(void);
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
int EVP_MD_CTX_copy(EVP_MD_CTX *out,const EVP_MD_CTX *in);
int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
int EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d,
unsigned int cnt);
......
......@@ -76,8 +76,12 @@ int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
unsigned char *key, unsigned char *iv, int enc)
{
if(enc && (enc != -1)) enc = 1;
if (cipher) {
if (cipher)
{
if(ctx->cipher_data)
OPENSSL_free(ctx->cipher_data);
ctx->cipher=cipher;
ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
ctx->key_len = cipher->key_len;
ctx->flags = 0;
if(ctx->cipher->flags & EVP_CIPH_CTRL_INIT) {
......@@ -339,6 +343,7 @@ int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c)
{
if(!c->cipher->cleanup(c)) return 0;
}
OPENSSL_free(c->cipher_data);
memset(c,0,sizeof(EVP_CIPHER_CTX));
return 1;
}
......
......@@ -118,6 +118,7 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
if (data == NULL) return(nkey);
EVP_MD_CTX_init(&c);
for (;;)
{
EVP_DigestInit(&c,md);
......@@ -161,7 +162,7 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
}
if ((nkey == 0) && (niv == 0)) break;
}
memset(&c,0,sizeof(c));
EVP_MD_CTX_cleanup(&c);
memset(&(md_buf[0]),0,EVP_MAX_MD_SIZE);
return(type->key_len);
}
......
......@@ -66,40 +66,40 @@
inl -= 8; \
for(i=0; i <= inl; i+=8) \
#define BLOCK_CIPHER_func_ecb(cname, cprefix, kname) \
#define BLOCK_CIPHER_func_ecb(cname, cprefix, kstruct, ksched) \
static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
{\
BLOCK_CIPHER_ecb_loop() \
cprefix##_ecb_encrypt(in + i, out + i, &ctx->c.kname, ctx->encrypt);\
cprefix##_ecb_encrypt(in + i, out + i, &((kstruct *)ctx->cipher_data)->ksched, ctx->encrypt);\
return 1;\
}
#define BLOCK_CIPHER_func_ofb(cname, cprefix, kname) \
#define BLOCK_CIPHER_func_ofb(cname, cprefix, kstruct, ksched) \
static int cname##_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
{\
cprefix##_ofb64_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv, &ctx->num);\
cprefix##_ofb64_encrypt(in, out, (long)inl, &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num);\
return 1;\
}
#define BLOCK_CIPHER_func_cbc(cname, cprefix, kname) \
#define BLOCK_CIPHER_func_cbc(cname, cprefix, kstruct, ksched) \
static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
{\
cprefix##_cbc_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv, ctx->encrypt);\
cprefix##_cbc_encrypt(in, out, (long)inl, &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, ctx->encrypt);\
return 1;\
}
#define BLOCK_CIPHER_func_cfb(cname, cprefix, kname) \
#define BLOCK_CIPHER_func_cfb(cname, cprefix, kstruct, ksched) \
static int cname##_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
{\
cprefix##_cfb64_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv, &ctx->num, ctx->encrypt);\
cprefix##_cfb64_encrypt(in, out, (long)inl, &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
return 1;\
}
#define BLOCK_CIPHER_all_funcs(cname, cprefix, kname) \
BLOCK_CIPHER_func_cbc(cname, cprefix, kname) \
BLOCK_CIPHER_func_cfb(cname, cprefix, kname) \
BLOCK_CIPHER_func_ecb(cname, cprefix, kname) \
BLOCK_CIPHER_func_ofb(cname, cprefix, kname)
#define BLOCK_CIPHER_all_funcs(cname, cprefix, kstruct, ksched) \
BLOCK_CIPHER_func_cbc(cname, cprefix, kstruct, ksched) \
BLOCK_CIPHER_func_cfb(cname, cprefix, kstruct, ksched) \
BLOCK_CIPHER_func_ecb(cname, cprefix, kstruct, ksched) \
BLOCK_CIPHER_func_ofb(cname, cprefix, kstruct, ksched)
#define BLOCK_CIPHER_def1(cname, nmode, mode, MODE, kstruct, nid, block_size, \
key_len, iv_len, flags, init_key, cleanup, \
......@@ -110,8 +110,7 @@ static const EVP_CIPHER cname##_##mode = { \
init_key, \
cname##_##mode##_cipher, \
cleanup, \
sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\
sizeof(kstruct), \
set_asn1, get_asn1,\
ctrl, \
NULL \
......@@ -213,11 +212,11 @@ static const EVP_CIPHER cname##_ecb = {\
const EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; }
*/
#define IMPLEMENT_BLOCK_CIPHER(cname, ksched, cprefix, kstruct, nid, \
block_size, key_len, iv_len, flags, init_key, \
cleanup, set_asn1, get_asn1, ctrl) \
BLOCK_CIPHER_all_funcs(cname, cprefix, kstruct, ksched) \
BLOCK_CIPHER_defs(cname, kstruct, nid, block_size, key_len, iv_len, \
flags, init_key, cleanup, set_asn1, get_asn1, ctrl)
#define IMPLEMENT_BLOCK_CIPHER(cname, kname, cprefix, kstruct, \
nid, block_size, key_len, iv_len, flags, \
init_key, cleanup, set_asn1, get_asn1, ctrl) \
BLOCK_CIPHER_all_funcs(cname, cprefix, kname) \
BLOCK_CIPHER_defs(cname, kstruct, nid, block_size, key_len, iv_len, flags,\
init_key, cleanup, set_asn1, get_asn1, ctrl)
#define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data)
......@@ -62,6 +62,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/md2.h>
static const EVP_MD md2_md=
{
......
......@@ -62,6 +62,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/md4.h>
static const EVP_MD md4_md=
{
......
......@@ -62,6 +62,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/md5.h>
static const EVP_MD md5_md=
{
......
......@@ -62,6 +62,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/mdc2.h>
static const EVP_MD mdc2_md=
{
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册