提交 61f5b6f3 编写于 作者: B Ben Laurie

Work with -pedantic!

上级 779cc0bc
......@@ -88,7 +88,7 @@ my %table=(
# Our development configs
"purify", "purify gcc:-g -DPURIFY -Wall:-lsocket -lnsl::::",
"debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:-lefence::::",
"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -O2 -Wall -Wshadow -Werror -pipe:::::",
"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -O2 -pedantic -Wall -Wshadow -Werror -pipe:::::",
"debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe:::::",
"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
"dist", "cc:-O:::::",
......
......@@ -78,9 +78,9 @@ EVP_CIPHER *enc;
#ifndef NOPROTO
int get_cert_chain(X509 *cert, STACK **chain);
int dump_certs_keys_p12(BIO *out, PKCS12 *p12, unsigned char *pass, int passlen, int options);
int dump_certs_pkeys_bags(BIO *out, STACK *bags, unsigned char *pass, int passlen, int options);
int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bags, unsigned char *pass, int passlen, int options);
int dump_certs_keys_p12(BIO *out, PKCS12 *p12, char *pass, int passlen, int options);
int dump_certs_pkeys_bags(BIO *out, STACK *bags, char *pass, int passlen, int options);
int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bags, char *pass, int passlen, int options);
int print_attribs(BIO *out, STACK *attrlst, char *name);
void hex_prin(BIO *out, unsigned char *buf, int len);
int alg_print(BIO *x, X509_ALGOR *alg);
......@@ -274,7 +274,7 @@ if (export_cert) {
char *catmp;
int i, pmatch = 0;
unsigned char keyid[EVP_MAX_MD_SIZE];
int keyidlen;
unsigned int keyidlen;
/* Get private key so we can match it to a certificate */
key = PEM_read_bio_PrivateKey(inkey ? inkey : in, NULL, NULL);
if (!inkey) BIO_reset(in);
......@@ -452,7 +452,7 @@ int dump_cert_text (BIO *out, X509 *x)
return 0;
}
int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, unsigned char *pass,
int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
int passlen, int options)
{
STACK *asafes, *bags;
......@@ -485,7 +485,7 @@ int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, unsigned char *pass,
return 1;
}
int dump_certs_pkeys_bags (BIO *out, STACK *bags, unsigned char *pass,
int dump_certs_pkeys_bags (BIO *out, STACK *bags, char *pass,
int passlen, int options)
{
int i;
......@@ -497,7 +497,7 @@ int dump_certs_pkeys_bags (BIO *out, STACK *bags, unsigned char *pass,
return 1;
}
int dump_certs_pkeys_bag (BIO *out, PKCS12_SAFEBAG *bag, unsigned char *pass,
int dump_certs_pkeys_bag (BIO *out, PKCS12_SAFEBAG *bag, char *pass,
int passlen, int options)
{
EVP_PKEY *pkey;
......
......@@ -76,8 +76,8 @@
#ifndef NOPROTO
static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int export,int keylength);
static int sv_body(char *hostname, int s, char *context);
static int www_body(char *hostname, int s, char *context);
static int sv_body(char *hostname, int s, unsigned char *context);
static int www_body(char *hostname, int s, unsigned char *context);
static void close_accept_socket(void );
static void sv_usage(void);
static int init_ssl_connection(SSL *s);
......@@ -556,7 +556,7 @@ static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
SSL_CTX_sess_get_cache_size(ssl_ctx));
}
static int sv_body(char *hostname, int s, char *context)
static int sv_body(char *hostname, int s, unsigned char *context)
{
char *buf=NULL;
fd_set readfds;
......@@ -586,7 +586,8 @@ static int sv_body(char *hostname, int s, char *context)
if (con == NULL) {
con=(SSL *)SSL_new(ctx);
if(context)
SSL_set_session_id_context(con, context, strlen(context));
SSL_set_session_id_context(con, context,
strlen((char *)context));
}
SSL_clear(con);
......@@ -871,7 +872,7 @@ static int load_CA(SSL_CTX *ctx, char *file)
}
#endif
static int www_body(char *hostname, int s, char *context)
static int www_body(char *hostname, int s, unsigned char *context)
{
char *buf=NULL;
int ret=1;
......@@ -904,7 +905,8 @@ static int www_body(char *hostname, int s, char *context)
if (!BIO_set_write_buffer_size(io,bufsize)) goto err;
if ((con=(SSL *)SSL_new(ctx)) == NULL) goto err;
if(context) SSL_set_session_id_context(con, context, strlen(context));
if(context) SSL_set_session_id_context(con, context,
strlen((char *)context));
sbio=BIO_new_socket(s,BIO_NOCLOSE);
if (s_nbio_test)
......
......@@ -209,7 +209,7 @@ int init_client_ip(int *sock, unsigned char ip[4], int port)
int nbio_sock_error(int sock)
{
int j,i;
unsigned int size;
int size;
size=sizeof(int);
i=getsockopt(sock,SOL_SOCKET,SO_ERROR,(char *)&j,&size);
......@@ -360,7 +360,7 @@ int do_accept(int acc_sock, int *sock, char **host)
int ret,i;
struct hostent *h1,*h2;
static struct sockaddr_in from;
unsigned int len;
int len;
/* struct linger ling; */
if (!sock_init()) return(0);
......
......@@ -39,8 +39,8 @@ LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o tmdiff.o $(ERRC).o
SRC= $(LIBSRC)
EXHEADER= crypto.h cryptall.h tmdiff.h opensslv.h
HEADER= cryptlib.h date.h opensslconf.h $(EXHEADER)
EXHEADER= crypto.h cryptall.h tmdiff.h opensslv.h opensslconf.h
HEADER= cryptlib.h date.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
......
此差异已折叠。
......@@ -471,7 +471,9 @@ void ASN1_STRING_free(ASN1_STRING *a);
ASN1_STRING * ASN1_STRING_dup(ASN1_STRING *a);
ASN1_STRING * ASN1_STRING_type_new(int type );
int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b);
int ASN1_STRING_set(ASN1_STRING *str,unsigned char *data, int len);
/* Since this is used to store all sorts of things, via macros, for now, make
its data void * */
int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a,unsigned char **pp);
ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,unsigned char **pp,
......
......@@ -324,28 +324,29 @@ ASN1_STRING *ASN1_STRING_dup(ASN1_STRING *str)
return(ret);
}
int ASN1_STRING_set(ASN1_STRING *str, unsigned char *data, int len)
int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
{
char *c;
unsigned char *c;
const char *data=_data;
if (len < 0)
{
if (data == NULL)
return(0);
else
len=strlen((char *)data);
len=strlen(data);
}
if ((str->length < len) || (str->data == NULL))
{
c=(char *)str->data;
c=str->data;
if (c == NULL)
str->data=(unsigned char *)Malloc(len+1);
str->data=Malloc(len+1);
else
str->data=(unsigned char *)Realloc(c,len+1);
str->data=Realloc(c,len+1);
if (str->data == NULL)
{
str->data=(unsigned char *)c;
str->data=c;
return(0);
}
}
......
......@@ -104,8 +104,8 @@ errors:
# DO NOT DELETE THIS LINE -- make depend depends on it.
bf_cfb64.o: bf_locl.h blowfish.h
bf_ecb.o: ../opensslv.h bf_locl.h blowfish.h
bf_enc.o: bf_locl.h blowfish.h
bf_ofb64.o: bf_locl.h blowfish.h
bf_skey.o: bf_locl.h bf_pi.h blowfish.h
bf_cfb64.o: ../opensslconf.h bf_locl.h blowfish.h
bf_ecb.o: ../opensslconf.h ../opensslv.h bf_locl.h blowfish.h
bf_enc.o: ../opensslconf.h bf_locl.h blowfish.h
bf_ofb64.o: ../opensslconf.h bf_locl.h blowfish.h
bf_skey.o: ../opensslconf.h bf_locl.h bf_pi.h blowfish.h
......@@ -106,7 +106,7 @@ bf_buff.o: ../../include/md2.h ../../include/md5.h ../../include/mdc2.h
bf_buff.o: ../../include/objects.h ../../include/rc2.h ../../include/rc4.h
bf_buff.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
bf_buff.o: ../../include/sha.h ../../include/stack.h ../cryptlib.h ../crypto.h
bf_buff.o: ../opensslv.h bio.h
bf_buff.o: ../opensslconf.h ../opensslv.h bio.h
bf_nbio.o: ../../include/asn1.h ../../include/blowfish.h ../../include/bn.h
bf_nbio.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h
bf_nbio.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h
......@@ -115,7 +115,7 @@ bf_nbio.o: ../../include/md2.h ../../include/md5.h ../../include/mdc2.h
bf_nbio.o: ../../include/objects.h ../../include/rand.h ../../include/rc2.h
bf_nbio.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
bf_nbio.o: ../../include/rsa.h ../../include/sha.h ../../include/stack.h
bf_nbio.o: ../cryptlib.h ../crypto.h ../opensslv.h bio.h
bf_nbio.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h bio.h
bf_null.o: ../../include/asn1.h ../../include/blowfish.h ../../include/bn.h
bf_null.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h
bf_null.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h
......@@ -124,7 +124,7 @@ bf_null.o: ../../include/md2.h ../../include/md5.h ../../include/mdc2.h
bf_null.o: ../../include/objects.h ../../include/rc2.h ../../include/rc4.h
bf_null.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
bf_null.o: ../../include/sha.h ../../include/stack.h ../cryptlib.h ../crypto.h
bf_null.o: ../opensslv.h bio.h
bf_null.o: ../opensslconf.h ../opensslv.h bio.h
bio_cb.o: ../../include/buffer.h ../../include/e_os.h ../../include/err.h
bio_cb.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslv.h bio.h
bio_err.o: ../../include/err.h ../../include/stack.h ../crypto.h ../opensslv.h
......
......@@ -196,11 +196,11 @@ int BIO_get_port(const char *str, unsigned short *port_ptr)
int BIO_sock_error(int sock)
{
int j,i;
unsigned int size;
int size;
size=sizeof(int);
i=getsockopt(sock,SOL_SOCKET,SO_ERROR,(char *)&j,&size);
i=getsockopt(sock,SOL_SOCKET,SO_ERROR,&j,&size);
if (i < 0)
return(1);
else
......@@ -593,7 +593,7 @@ int BIO_accept(int sock, char **addr)
static struct sockaddr_in from;
unsigned long l;
unsigned short port;
unsigned int len;
int len;
char *p;
memset((char *)&from,0,sizeof(from));
......
......@@ -499,7 +499,7 @@ BIO *BIO_new_fp();
BIO * BIO_new(BIO_METHOD *type);
int BIO_set(BIO *a,BIO_METHOD *type);
int BIO_free(BIO *a);
int BIO_read(BIO *b, char *data, int len);
int BIO_read(BIO *b, void *data, int len);
int BIO_gets(BIO *bp,char *buf, int size);
int BIO_write(BIO *b, const char *data, int len);
int BIO_puts(BIO *bp,const char *buf);
......
......@@ -137,7 +137,7 @@ int BIO_free(BIO *a)
return(1);
}
int BIO_read(BIO *b, char *out, int outl)
int BIO_read(BIO *b, void *out, int outl)
{
int i;
long (*cb)();
......
......@@ -161,56 +161,58 @@ $(ERRC).c: $(ERR).err
bn_add.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_add.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_add.o: ../opensslv.h bn.h bn_lcl.h
bn_add.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_asm.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_asm.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_asm.o: ../opensslv.h bn.h bn_lcl.h
bn_asm.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_blind.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_blind.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_blind.o: ../opensslv.h bn.h bn_lcl.h
bn_blind.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_div.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_div.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_div.o: ../opensslv.h bn.h bn_lcl.h
bn_err.o: ../../include/err.h bn.h
bn_div.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_err.o: ../../include/err.h ../opensslconf.h bn.h
bn_exp.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_exp.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_exp.o: ../opensslv.h bn.h bn_lcl.h
bn_exp.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_exp2.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_exp2.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_exp2.o: ../opensslv.h bn.h bn_lcl.h
bn_exp2.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_gcd.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_gcd.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_gcd.o: ../opensslv.h bn.h bn_lcl.h
bn_gcd.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_lib.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_lib.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_lib.o: ../opensslv.h bn.h bn_lcl.h
bn_lib.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_mont.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_mont.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_mont.o: ../opensslv.h bn.h bn_lcl.h
bn_mont.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_mpi.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_mpi.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_mpi.o: ../opensslv.h bn.h bn_lcl.h
bn_mpi.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_mul.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_mul.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_mul.o: ../opensslv.h bn.h bn_lcl.h
bn_mul.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_prime.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_prime.o: ../../include/err.h ../../include/rand.h ../../include/stack.h
bn_prime.o: ../cryptlib.h ../crypto.h ../opensslv.h bn.h bn_lcl.h bn_prime.h
bn_prime.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h bn.h
bn_prime.o: bn_lcl.h bn_prime.h
bn_print.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_print.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_print.o: ../opensslv.h bn.h bn_lcl.h
bn_print.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_rand.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_rand.o: ../../include/err.h ../../include/rand.h ../../include/stack.h
bn_rand.o: ../cryptlib.h ../crypto.h ../opensslv.h bn.h bn_lcl.h
bn_rand.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h bn.h
bn_rand.o: bn_lcl.h
bn_recp.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_recp.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_recp.o: ../opensslv.h bn.h bn_lcl.h
bn_recp.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_shift.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_shift.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_shift.o: ../opensslv.h bn.h bn_lcl.h
bn_shift.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_sqr.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_sqr.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_sqr.o: ../opensslv.h bn.h bn_lcl.h
bn_sqr.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
bn_word.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
bn_word.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
bn_word.o: ../opensslv.h bn.h bn_lcl.h
bn_word.o: ../opensslconf.h ../opensslv.h bn.h bn_lcl.h
......@@ -316,7 +316,7 @@ BIGNUM *BN_new(void);
void BN_init(BIGNUM *);
void BN_clear_free(BIGNUM *a);
BIGNUM *BN_copy(BIGNUM *a, BIGNUM *b);
BIGNUM *BN_bin2bn(unsigned char *s,int len,BIGNUM *ret);
BIGNUM *BN_bin2bn(const unsigned char *s,int len,BIGNUM *ret);
int BN_bn2bin(BIGNUM *a, unsigned char *to);
BIGNUM *BN_mpi2bn(unsigned char *s,int len,BIGNUM *ret);
int BN_bn2mpi(BIGNUM *a, unsigned char *to);
......
......@@ -571,7 +571,7 @@ int BN_set_word(BIGNUM *a, BN_ULONG w)
}
/* ignore negative */
BIGNUM *BN_bin2bn(unsigned char *s, int len, BIGNUM *ret)
BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)
{
unsigned int i,m;
unsigned int n;
......
......@@ -64,7 +64,7 @@ BUF_MEM *BUF_MEM_new(void)
{
BUF_MEM *ret;
ret=(BUF_MEM *)Malloc(sizeof(BUF_MEM));
ret=Malloc(sizeof(BUF_MEM));
if (ret == NULL)
{
BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);
......@@ -101,15 +101,15 @@ int BUF_MEM_grow(BUF_MEM *str, int len)
}
if (str->max >= len)
{
memset(&(str->data[str->length]),0,len-str->length);
memset(&str->data[str->length],0,len-str->length);
str->length=len;
return(len);
}
n=(len+3)/3*4;
if (str->data == NULL)
ret=(char *)Malloc(n);
ret=Malloc(n);
else
ret=(char *)Realloc(str->data,n);
ret=Realloc(str->data,n);
if (ret == NULL)
{
BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE);
......
......@@ -95,10 +95,12 @@ $(ERRC).c: $(ERR).err
c_rle.o: ../../include/asn1.h ../../include/bio.h ../../include/bn.h
c_rle.o: ../../include/crypto.h ../../include/objects.h
c_rle.o: ../../include/opensslv.h ../../include/stack.h comp.h
c_rle.o: ../../include/opensslv.h ../../include/stack.h ../opensslconf.h comp.h
c_zlib.o: ../../include/asn1.h ../../include/bio.h ../../include/bn.h
c_zlib.o: ../../include/crypto.h ../../include/objects.h
c_zlib.o: ../../include/opensslv.h ../../include/stack.h comp.h
c_zlib.o: ../../include/opensslv.h ../../include/stack.h ../opensslconf.h
c_zlib.o: comp.h
comp_lib.o: ../../include/asn1.h ../../include/bio.h ../../include/bn.h
comp_lib.o: ../../include/crypto.h ../../include/objects.h
comp_lib.o: ../../include/opensslv.h ../../include/stack.h comp.h
comp_lib.o: ../../include/opensslv.h ../../include/stack.h ../opensslconf.h
comp_lib.o: comp.h
......@@ -136,35 +136,35 @@ errors:
# DO NOT DELETE THIS LINE -- make depend depends on it.
cbc_cksm.o: des.h des_locl.h
cbc_enc.o: des.h des_locl.h
cfb64ede.o: des.h des_locl.h
cfb64enc.o: des.h des_locl.h
cfb_enc.o: des.h des_locl.h
des_enc.o: des.h des_locl.h
ecb3_enc.o: des.h des_locl.h
ecb_enc.o: ../opensslv.h des.h des_locl.h spr.h
ede_cbcm_enc.o: des.h des_locl.h
cbc_cksm.o: ../opensslconf.h des.h des_locl.h
cbc_enc.o: ../opensslconf.h des.h des_locl.h
cfb64ede.o: ../opensslconf.h des.h des_locl.h
cfb64enc.o: ../opensslconf.h des.h des_locl.h
cfb_enc.o: ../opensslconf.h des.h des_locl.h
des_enc.o: ../opensslconf.h des.h des_locl.h
ecb3_enc.o: ../opensslconf.h des.h des_locl.h
ecb_enc.o: ../opensslconf.h ../opensslv.h des.h des_locl.h spr.h
ede_cbcm_enc.o: ../opensslconf.h des.h des_locl.h
enc_read.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
enc_read.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
enc_read.o: ../opensslv.h des.h des_locl.h
enc_read.o: ../opensslconf.h ../opensslv.h des.h des_locl.h
enc_writ.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
enc_writ.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
enc_writ.o: ../opensslv.h des.h des_locl.h
fcrypt.o: des.h des.h des_locl.h des_locl.h
fcrypt_b.o: des.h des_locl.h
ofb64ede.o: des.h des_locl.h
ofb64enc.o: des.h des_locl.h
ofb_enc.o: des.h des_locl.h
pcbc_enc.o: des.h des_locl.h
qud_cksm.o: des.h des_locl.h
rand_key.o: des.h des_locl.h
read2pwd.o: des.h des_locl.h
enc_writ.o: ../opensslconf.h ../opensslv.h des.h des_locl.h
fcrypt.o: ../opensslconf.h ../opensslconf.h des.h des.h des_locl.h des_locl.h
fcrypt_b.o: ../opensslconf.h des.h des_locl.h
ofb64ede.o: ../opensslconf.h des.h des_locl.h
ofb64enc.o: ../opensslconf.h des.h des_locl.h
ofb_enc.o: ../opensslconf.h des.h des_locl.h
pcbc_enc.o: ../opensslconf.h des.h des_locl.h
qud_cksm.o: ../opensslconf.h des.h des_locl.h
rand_key.o: ../opensslconf.h des.h des_locl.h
read2pwd.o: ../opensslconf.h des.h des_locl.h
read_pwd.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
read_pwd.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
read_pwd.o: ../opensslv.h des.h des_locl.h
rpc_enc.o: des.h des_locl.h des_ver.h rpc_des.h
set_key.o: des.h des_locl.h podd.h sk.h
str2key.o: des.h des_locl.h
supp.o: des.h des_locl.h
xcbc_enc.o: des.h des_locl.h
read_pwd.o: ../opensslconf.h ../opensslv.h des.h des_locl.h
rpc_enc.o: ../opensslconf.h des.h des_locl.h des_ver.h rpc_des.h
set_key.o: ../opensslconf.h des.h des_locl.h podd.h sk.h
str2key.o: ../opensslconf.h des.h des_locl.h
supp.o: ../opensslconf.h des.h des_locl.h
xcbc_enc.o: ../opensslconf.h des.h des_locl.h
......@@ -182,9 +182,9 @@ void des_ede3_ofb64_encrypt(const unsigned char *in,unsigned char *out,
void des_xwhite_in2out(const des_cblock des_key,const des_cblock in_white,
des_cblock out_white);
int des_enc_read(int fd,char *buf,int len,des_key_schedule sched,
int des_enc_read(int fd,void *buf,int len,des_key_schedule sched,
des_cblock iv);
int des_enc_write(int fd,const char *buf,int len,des_key_schedule sched,
int des_enc_write(int fd,const void *buf,int len,des_key_schedule sched,
des_cblock iv);
char *des_fcrypt(const char *buf,const char *salt, char *ret);
#if defined(PERL5) || defined(__FreeBSD__)
......
......@@ -363,7 +363,7 @@ int main(int argc, char *argv[])
memcpy(iv3,cbc_iv,sizeof(cbc_iv));
memset(iv2,'\0',sizeof iv2);
des_ede3_cbcm_encrypt(cbc_out,cbc_in,i,ks,ks2,ks3,iv3,iv2,DES_DECRYPT);
if (memcmp(cbc_in,cbc_data,strlen(cbc_data)+1) != 0)
if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)+1) != 0)
{
int n;
......@@ -531,7 +531,7 @@ int main(int argc, char *argv[])
memcpy(iv3,cbc_iv,sizeof(cbc_iv));
des_ede3_cbc_encrypt(cbc_out,cbc_in,i,ks,ks2,ks3,iv3,DES_DECRYPT);
if (memcmp(cbc_in,cbc_data,strlen(cbc_data)+1) != 0)
if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)+1) != 0)
{
printf("des_ede3_cbc_encrypt decrypt error\n");
err=1;
......@@ -546,16 +546,16 @@ int main(int argc, char *argv[])
}
memset(cbc_out,0,40);
memset(cbc_in,0,40);
des_pcbc_encrypt(cbc_data,cbc_out,strlen(cbc_data)+1,ks,cbc_iv,
des_pcbc_encrypt(cbc_data,cbc_out,strlen((char *)cbc_data)+1,ks,cbc_iv,
DES_ENCRYPT);
if (memcmp(cbc_out,pcbc_ok,32) != 0)
{
printf("pcbc_encrypt encrypt error\n");
err=1;
}
des_pcbc_encrypt(cbc_out,cbc_in,strlen(cbc_data)+1,ks,cbc_iv,
des_pcbc_encrypt(cbc_out,cbc_in,strlen((char *)cbc_data)+1,ks,cbc_iv,
DES_DECRYPT);
if (memcmp(cbc_in,cbc_data,strlen(cbc_data)+1) != 0)
if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)+1) != 0)
{
printf("pcbc_encrypt decrypt error\n");
err=1;
......@@ -683,7 +683,7 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]);
printf("Doing cbc_cksum\n");
des_key_sched(cbc_key,ks);
cs=des_cbc_cksum(cbc_data,cret,strlen(cbc_data),ks,cbc_iv);
cs=des_cbc_cksum(cbc_data,cret,strlen((char *)cbc_data),ks,cbc_iv);
if (cs != cbc_cksum_ret)
{
printf("bad return value (%08lX), should be %08lX\n",
......@@ -701,7 +701,8 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]);
quad_cksum returns up to 4 groups of 8 bytes, this test gets it to
produce 2 groups then treats them as 4 groups of 4 bytes.
Ben 13 Feb 1999 */
cs=quad_cksum(cbc_data,(des_cblocks)qret,strlen(cbc_data),2,cbc_iv);
cs=quad_cksum(cbc_data,(des_cblocks)qret,strlen((char *)cbc_data),2,
cbc_iv);
{ /* Big-endian fix */
static DES_LONG l=1;
......@@ -763,14 +764,16 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]);
for (i=0; i<4; i++)
{
printf(" %d",i);
des_ncbc_encrypt(&(cbc_out[i]),cbc_in,strlen(cbc_data)+1,ks,
des_ncbc_encrypt(&(cbc_out[i]),cbc_in,
strlen((char *)cbc_data)+1,ks,
cbc_iv,DES_ENCRYPT);
}
printf("\noutput word alignment test");
for (i=0; i<4; i++)
{
printf(" %d",i);
des_ncbc_encrypt(cbc_out,&(cbc_in[i]),strlen(cbc_data)+1,ks,
des_ncbc_encrypt(cbc_out,&(cbc_in[i]),
strlen((char *)cbc_data)+1,ks,
cbc_iv,DES_ENCRYPT);
}
printf("\n");
......
......@@ -84,8 +84,8 @@ int des_rw_mode=DES_PCBC_MODE;
*/
int des_enc_read(int fd, char *buf, int len, des_key_schedule sched,
des_cblock iv)
int des_enc_read(int fd, void *buf, int len, des_key_schedule sched,
des_cblock iv)
{
/* data to be unencrypted */
int net_num=0;
......@@ -125,7 +125,7 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched,
* with the number of bytes we have - should always
* check the return value */
memcpy(buf,&(unnet[unnet_start]),
(unsigned int)unnet_left);
unnet_left);
/* eay 26/08/92 I had the next 2 lines
* reversed :-( */
i=unnet_left;
......@@ -133,7 +133,7 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched,
}
else
{
memcpy(buf,&(unnet[unnet_start]),(unsigned int)len);
memcpy(buf,&(unnet[unnet_start]),len);
unnet_start+=len;
unnet_left-=len;
i=len;
......@@ -184,9 +184,9 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched,
des_pcbc_encrypt(net,unnet,num,sched,iv,DES_DECRYPT);
else
des_cbc_encrypt(net,unnet,num,sched,iv,DES_DECRYPT);
memcpy(buf,unnet,(unsigned int)len);
memcpy(buf,unnet,len);
unnet_start=len;
unnet_left=(int)num-len;
unnet_left=num-len;
/* The following line is done because we return num
* as the number of bytes read. */
......@@ -211,7 +211,7 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched,
/* eay 26/08/92 fix a bug that returned more
* bytes than you asked for (returned len bytes :-( */
memcpy(buf,tmpbuf,(unsigned int)num);
memcpy(buf,tmpbuf,num);
}
else
{
......@@ -223,6 +223,6 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched,
DES_DECRYPT);
}
}
return((int)num);
return num;
}
......@@ -76,8 +76,8 @@
* - This code cannot handle non-blocking sockets.
*/
int des_enc_write(int fd, const char *buf, int len, des_key_schedule sched,
des_cblock iv)
int des_enc_write(int fd, const void *_buf, int len,
des_key_schedule sched, des_cblock iv)
{
#ifdef _LIBC
extern int srandom();
......@@ -85,12 +85,12 @@ int des_enc_write(int fd, const char *buf, int len, des_key_schedule sched,
extern int random();
extern int write();
#endif
const unsigned char *buf=_buf;
long rnum;
int i,j,k,outnum;
static unsigned char *outbuf=NULL;
unsigned char shortbuf[8];
char *p;
unsigned char *p;
const unsigned char *cp;
static int start=1;
......
......@@ -86,14 +86,15 @@ $(ERRC).c: $(ERR).err
dh_check.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
dh_check.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h
dh_check.o: ../cryptlib.h ../crypto.h ../opensslv.h dh.h
dh_err.o: ../../include/bn.h ../../include/err.h dh.h
dh_check.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h dh.h
dh_err.o: ../../include/bn.h ../../include/err.h ../opensslconf.h dh.h
dh_gen.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
dh_gen.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h
dh_gen.o: ../cryptlib.h ../crypto.h ../opensslv.h dh.h
dh_gen.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h dh.h
dh_key.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
dh_key.o: ../../include/e_os.h ../../include/err.h ../../include/rand.h
dh_key.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslv.h dh.h
dh_key.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslconf.h
dh_key.o: ../opensslv.h dh.h
dh_lib.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
dh_lib.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h
dh_lib.o: ../cryptlib.h ../crypto.h ../opensslv.h dh.h
dh_lib.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h dh.h
......@@ -94,23 +94,24 @@ dsa_asn1.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
dsa_asn1.o: ../../include/ripemd.h ../../include/rsa.h
dsa_asn1.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
dsa_asn1.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
dsa_asn1.o: ../crypto.h ../opensslv.h dsa.h
dsa_err.o: ../../include/bn.h ../../include/err.h dsa.h
dsa_asn1.o: ../crypto.h ../opensslconf.h ../opensslv.h dsa.h
dsa_err.o: ../../include/bn.h ../../include/err.h ../opensslconf.h dsa.h
dsa_gen.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
dsa_gen.o: ../../include/e_os.h ../../include/err.h ../../include/rand.h
dsa_gen.o: ../../include/sha.h ../../include/stack.h ../cryptlib.h ../crypto.h
dsa_gen.o: ../opensslv.h dsa.h
dsa_gen.o: ../opensslconf.h ../opensslv.h dsa.h
dsa_key.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
dsa_key.o: ../../include/e_os.h ../../include/err.h ../../include/rand.h
dsa_key.o: ../../include/sha.h ../../include/stack.h ../cryptlib.h ../crypto.h
dsa_key.o: ../opensslv.h dsa.h
dsa_key.o: ../opensslconf.h ../opensslv.h dsa.h
dsa_lib.o: ../../include/asn1.h ../../include/bio.h ../../include/bn.h
dsa_lib.o: ../../include/buffer.h ../../include/e_os.h ../../include/err.h
dsa_lib.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslv.h dsa.h
dsa_lib.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslconf.h
dsa_lib.o: ../opensslv.h dsa.h
dsa_sign.o: ../../include/asn1.h ../../include/bio.h ../../include/bn.h
dsa_sign.o: ../../include/buffer.h ../../include/e_os.h ../../include/err.h
dsa_sign.o: ../../include/rand.h ../../include/stack.h ../cryptlib.h
dsa_sign.o: ../crypto.h ../opensslv.h dsa.h
dsa_sign.o: ../crypto.h ../opensslconf.h ../opensslv.h dsa.h
dsa_vrf.o: ../../include/asn1.h ../../include/asn1_mac.h ../../include/bio.h
dsa_vrf.o: ../../include/blowfish.h ../../include/bn.h ../../include/buffer.h
dsa_vrf.o: ../../include/cast.h ../../include/des.h ../../include/dh.h
......@@ -121,4 +122,4 @@ dsa_vrf.o: ../../include/rand.h ../../include/rc2.h ../../include/rc4.h
dsa_vrf.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
dsa_vrf.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
dsa_vrf.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
dsa_vrf.o: ../crypto.h ../opensslv.h dsa.h
dsa_vrf.o: ../crypto.h ../opensslconf.h ../opensslv.h dsa.h
......@@ -121,17 +121,17 @@ void DSA_SIG_free(DSA_SIG *a);
int i2d_DSA_SIG(DSA_SIG *a, unsigned char **pp);
DSA_SIG * d2i_DSA_SIG(DSA_SIG **v, unsigned char **pp, long length);
DSA_SIG * DSA_do_sign(unsigned char *dgst,int dlen,DSA *dsa);
int DSA_do_verify(unsigned char *dgst,int dgst_len,
DSA_SIG *sig,DSA *dsa);
DSA_SIG * DSA_do_sign(const unsigned char *dgst,int dlen,DSA *dsa);
int DSA_do_verify(const unsigned char *dgst,int dgst_len,
DSA_SIG *sig,DSA *dsa);
DSA * DSA_new(void);
int DSA_size(DSA *);
/* next 4 return -1 on error */
int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp);
int DSA_sign(int type,unsigned char *dgst,int dlen,
int DSA_sign(int type,const unsigned char *dgst,int dlen,
unsigned char *sig, unsigned int *siglen, DSA *dsa);
int DSA_verify(int type,unsigned char *dgst,int dgst_len,
int DSA_verify(int type,const unsigned char *dgst,int dgst_len,
unsigned char *sigbuf, int siglen, DSA *dsa);
void DSA_free (DSA *r);
......
......@@ -65,7 +65,7 @@
#include "rand.h"
#include "asn1.h"
DSA_SIG * DSA_do_sign(unsigned char *dgst, int dlen, DSA *dsa)
DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
{
BIGNUM *kinv=NULL,*r=NULL,*s=NULL;
BIGNUM m;
......@@ -132,7 +132,7 @@ err:
/* unsigned char *sig: out */
/* unsigned int *siglen: out */
int DSA_sign(int type, unsigned char *dgst, int dlen, unsigned char *sig,
int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig,
unsigned int *siglen, DSA *dsa)
{
DSA_SIG *s;
......
......@@ -66,7 +66,8 @@
#include "asn1.h"
#include "asn1_mac.h"
int DSA_do_verify(unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa)
int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
DSA *dsa)
{
BN_CTX *ctx;
BIGNUM u1,u2,t1;
......@@ -143,7 +144,7 @@ int DSA_do_verify(unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa)
* 0: incorrect signature
* -1: error
*/
int DSA_verify(int type, unsigned char *dgst, int dgst_len,
int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
unsigned char *sigbuf, int siglen, DSA *dsa)
{
DSA_SIG *s;
......
......@@ -115,6 +115,8 @@ static unsigned char out_g[]={
0xc5,0x72,0xaf,0x53,0xe6,0xd7,0x88,0x02,
};
static const unsigned char str1[]="12345678901234567890";
static BIO *bio_err=NULL;
int main(int argc, char **argv)
......@@ -124,7 +126,7 @@ int main(int argc, char **argv)
unsigned char buf[256];
unsigned long h;
unsigned char sig[256];
int siglen;
unsigned int siglen;
if (bio_err == NULL)
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
......@@ -179,8 +181,8 @@ int main(int argc, char **argv)
goto end;
}
DSA_generate_key(dsa);
DSA_sign(0, "12345678901234567890", 20, sig, &siglen, dsa);
if (DSA_verify(0, "12345678901234567890", 20, sig, siglen, dsa) == 1)
DSA_sign(0, str1, 20, sig, &siglen, dsa);
if (DSA_verify(0, str1, 20, sig, siglen, dsa) == 1)
ret=1;
end:
if (!ret)
......
......@@ -91,7 +91,8 @@ err_all.o: ../../include/pkcs12.h ../../include/pkcs7.h ../../include/rc2.h
err_all.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
err_all.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
err_all.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h
err_all.o: ../../include/x509v3.h ../crypto.h ../opensslv.h err.h
err_all.o: ../../include/x509v3.h ../crypto.h ../opensslconf.h ../opensslv.h
err_all.o: err.h
err_prn.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
err_prn.o: ../../include/lhash.h ../../include/stack.h ../cryptlib.h
err_prn.o: ../crypto.h ../opensslv.h err.h
此差异已折叠。
......@@ -441,10 +441,11 @@ static long ok_ctrl(BIO *b, int cmd, long num, char *ptr)
return(ret);
}
static void longswap(char* ptr, int len)
static void longswap(void *_ptr, int len)
{
#ifndef L_ENDIAN
int i;
char *ptr=_ptr;
for(i= 0;i < len;i+= 4){
*((unsigned long *)&(ptr[i]))= swapem(*((unsigned long *)&(ptr[i])));
......
......@@ -395,7 +395,7 @@ typedef struct evp_Encode_Ctx_st
} EVP_ENCODE_CTX;
/* Password based encryption function */
typedef int (EVP_PBE_KEYGEN)(unsigned char *pass, int passlen,
typedef int (EVP_PBE_KEYGEN)(const char *pass, int passlen,
unsigned char *salt, int saltlen, int iter, EVP_CIPHER *cipher,
EVP_MD *md, unsigned char *key, unsigned char *iv);
......
/* p12_pbop.c */
/* evp_pbe.c */
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
* project 1999.
*/
......@@ -74,7 +74,7 @@ EVP_MD *md;
EVP_PBE_KEYGEN *keygen;
} EVP_PBE_CTL;
int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, unsigned char *pass, int passlen,
int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
unsigned char *salt, int saltlen, int iter, EVP_CIPHER_CTX *ctx,
int en_de)
{
......@@ -95,7 +95,7 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, unsigned char *pass, int passlen,
ERR_add_error_data(2, "TYPE=", obj_tmp);
return 0;
}
if (passlen == -1) passlen = strlen(pass);
if (passlen == -1) passlen = strlen((char *)pass);
pbetmp = (EVP_PBE_CTL *)sk_value (pbe_algs, i);
i = (*pbetmp->keygen)(pass, passlen, salt, saltlen, iter,
pbetmp->cipher, pbetmp->md, key, iv);
......@@ -109,15 +109,15 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, unsigned char *pass, int passlen,
/* Setup a PBE algorithm but take most parameters from AlgorithmIdentifier */
int EVP_PBE_ALGOR_CipherInit (X509_ALGOR *algor, unsigned char *pass,
int passlen, EVP_CIPHER_CTX *ctx, int en_de)
int EVP_PBE_ALGOR_CipherInit (X509_ALGOR *algor, const char *pass,
int passlen, EVP_CIPHER_CTX *ctx, int en_de)
{
PBEPARAM *pbe;
int saltlen, iter;
unsigned char *salt, *pbuf;
/* Extract useful info from algor */
pbuf = (char *) algor->parameter->value.sequence->data;
pbuf = algor->parameter->value.sequence->data;
if (!(pbe = d2i_PBEPARAM (NULL, &pbuf,
algor->parameter->value.sequence->length))) {
EVPerr(EVP_F_EVP_PBE_ALGOR_CIPHERINIT,EVP_R_DECODE_ERROR);
......
......@@ -85,4 +85,4 @@ hmac.o: ../../include/evp.h ../../include/idea.h ../../include/md2.h
hmac.o: ../../include/md5.h ../../include/mdc2.h ../../include/objects.h
hmac.o: ../../include/opensslv.h ../../include/rc2.h ../../include/rc4.h
hmac.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
hmac.o: ../../include/sha.h ../../include/stack.h hmac.h
hmac.o: ../../include/sha.h ../../include/stack.h ../opensslconf.h hmac.h
......@@ -60,7 +60,8 @@
#include <string.h>
#include "hmac.h"
void HMAC_Init(HMAC_CTX *ctx, unsigned char *key, int len, const EVP_MD *md)
void HMAC_Init(HMAC_CTX *ctx, const unsigned char *key, int len,
const EVP_MD *md)
{
int i,j,reset=0;
unsigned char pad[HMAC_MAX_MD_CBLOCK];
......
......@@ -80,7 +80,7 @@ typedef struct hmac_ctx_st
#ifndef NOPROTO
void HMAC_Init(HMAC_CTX *ctx, unsigned char *key, int len,
void HMAC_Init(HMAC_CTX *ctx, const unsigned char *key, int len,
const EVP_MD *md);
void HMAC_Update(HMAC_CTX *ctx,unsigned char *key, int len);
void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
......
......@@ -78,8 +78,8 @@ errors:
# DO NOT DELETE THIS LINE -- make depend depends on it.
i_cbc.o: idea.h idea_lcl.h
i_cfb64.o: idea.h idea_lcl.h
i_ecb.o: ../opensslv.h idea.h idea_lcl.h
i_ofb64.o: idea.h idea_lcl.h
i_skey.o: idea.h idea_lcl.h
i_cbc.o: ../opensslconf.h idea.h idea_lcl.h
i_cfb64.o: ../opensslconf.h idea.h idea_lcl.h
i_ecb.o: ../opensslconf.h ../opensslv.h idea.h idea_lcl.h
i_ofb64.o: ../opensslconf.h idea.h idea_lcl.h
i_skey.o: ../opensslconf.h idea.h idea_lcl.h
......@@ -78,7 +78,7 @@ errors:
# DO NOT DELETE THIS LINE -- make depend depends on it.
md2_dgst.o: ../opensslv.h md2.h
md2_dgst.o: ../opensslconf.h ../opensslv.h md2.h
md2_one.o: ../../include/bio.h ../../include/buffer.h ../../include/e_os.h
md2_one.o: ../../include/err.h ../../include/stack.h ../cryptlib.h ../crypto.h
md2_one.o: ../opensslv.h md2.h
md2_one.o: ../opensslconf.h ../opensslv.h md2.h
......@@ -80,5 +80,5 @@ errors:
mdc2_one.o: ../../include/bio.h ../../include/buffer.h ../../include/des.h
mdc2_one.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h
mdc2_one.o: ../cryptlib.h ../crypto.h ../opensslv.h mdc2.h
mdc2dgst.o: ../../include/des.h mdc2.h
mdc2_one.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h mdc2.h
mdc2dgst.o: ../../include/des.h ../opensslconf.h mdc2.h
......@@ -89,15 +89,17 @@ $(ERRC).c: $(ERR).err
o_names.o: ../../include/asn1.h ../../include/bio.h ../../include/bn.h
o_names.o: ../../include/crypto.h ../../include/lhash.h
o_names.o: ../../include/opensslv.h ../../include/stack.h objects.h
o_names.o: ../../include/opensslv.h ../../include/stack.h ../opensslconf.h
o_names.o: objects.h
obj_dat.o: ../../include/asn1.h ../../include/bio.h ../../include/bn.h
obj_dat.o: ../../include/buffer.h ../../include/crypto.h ../../include/e_os.h
obj_dat.o: ../../include/err.h ../../include/lhash.h ../../include/opensslv.h
obj_dat.o: ../../include/stack.h ../cryptlib.h obj_dat.h objects.h
obj_dat.o: ../../include/stack.h ../cryptlib.h ../opensslconf.h obj_dat.h
obj_dat.o: objects.h
obj_err.o: ../../include/asn1.h ../../include/bio.h ../../include/bn.h
obj_err.o: ../../include/crypto.h ../../include/err.h ../../include/opensslv.h
obj_err.o: ../../include/stack.h objects.h
obj_err.o: ../../include/stack.h ../opensslconf.h objects.h
obj_lib.o: ../../include/asn1.h ../../include/bio.h ../../include/bn.h
obj_lib.o: ../../include/buffer.h ../../include/crypto.h ../../include/e_os.h
obj_lib.o: ../../include/err.h ../../include/lhash.h ../../include/opensslv.h
obj_lib.o: ../../include/stack.h ../cryptlib.h objects.h
obj_lib.o: ../../include/stack.h ../cryptlib.h ../opensslconf.h objects.h
......@@ -94,8 +94,8 @@ pem_all.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
pem_all.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
pem_all.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
pem_all.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
pem_all.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
pem_all.o: pem.h pem2.h
pem_all.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
pem_all.o: ../opensslv.h pem.h pem2.h
pem_err.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
pem_err.o: ../../include/bn.h ../../include/cast.h ../../include/des.h
pem_err.o: ../../include/dh.h ../../include/dsa.h ../../include/err.h
......@@ -105,7 +105,7 @@ pem_err.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
pem_err.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
pem_err.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
pem_err.o: ../../include/x509.h ../../include/x509_vfy.h ../crypto.h
pem_err.o: ../opensslv.h pem.h pem2.h
pem_err.o: ../opensslconf.h ../opensslv.h pem.h pem2.h
pem_info.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
pem_info.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
pem_info.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -116,7 +116,7 @@ pem_info.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
pem_info.o: ../../include/ripemd.h ../../include/rsa.h
pem_info.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
pem_info.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
pem_info.o: ../crypto.h ../opensslv.h pem.h pem2.h
pem_info.o: ../crypto.h ../opensslconf.h ../opensslv.h pem.h pem2.h
pem_lib.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
pem_lib.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
pem_lib.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -127,7 +127,7 @@ pem_lib.o: ../../include/rand.h ../../include/rc2.h ../../include/rc4.h
pem_lib.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
pem_lib.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
pem_lib.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
pem_lib.o: ../crypto.h ../opensslv.h pem.h pem2.h
pem_lib.o: ../crypto.h ../opensslconf.h ../opensslv.h pem.h pem2.h
pem_seal.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
pem_seal.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
pem_seal.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -138,7 +138,7 @@ pem_seal.o: ../../include/rand.h ../../include/rc2.h ../../include/rc4.h
pem_seal.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
pem_seal.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
pem_seal.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
pem_seal.o: ../crypto.h ../opensslv.h pem.h pem2.h
pem_seal.o: ../crypto.h ../opensslconf.h ../opensslv.h pem.h pem2.h
pem_sign.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
pem_sign.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
pem_sign.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -149,4 +149,4 @@ pem_sign.o: ../../include/rand.h ../../include/rc2.h ../../include/rc4.h
pem_sign.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
pem_sign.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
pem_sign.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
pem_sign.o: ../crypto.h ../opensslv.h pem.h pem2.h
pem_sign.o: ../crypto.h ../opensslconf.h ../opensslv.h pem.h pem2.h
......@@ -591,7 +591,7 @@ int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data,
PEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE);
goto err;
}
strncpy(nameB->data,&(buf[11]),(unsigned int)i-6);
memcpy(nameB->data,&(buf[11]),i-6);
nameB->data[i-6]='\0';
break;
}
......@@ -616,7 +616,7 @@ int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data,
nohead=1;
break;
}
strncpy(&(headerB->data[hl]),buf,(unsigned int)i);
memcpy(&(headerB->data[hl]),buf,i);
headerB->data[hl+i]='\0';
hl+=i;
}
......@@ -644,7 +644,7 @@ int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data,
PEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE);
goto err;
}
strncpy(&(dataB->data[bl]),buf,(unsigned int)i);
memcpy(&(dataB->data[bl]),buf,i);
dataB->data[bl+i]='\0';
bl+=i;
if (end)
......@@ -669,7 +669,7 @@ int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data,
}
i=strlen(nameB->data);
if ( (strncmp(buf,"-----END ",9) != 0) ||
(strncmp(nameB->data,&(buf[9]),(unsigned int)i) != 0) ||
(strncmp(nameB->data,&(buf[9]),i) != 0) ||
(strncmp(&(buf[9+i]),"-----\n",6) != 0))
{
PEMerr(PEM_F_PEM_READ_BIO,PEM_R_BAD_END_LINE);
......
......@@ -99,8 +99,8 @@ p12_add.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
p12_add.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
p12_add.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
p12_add.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
p12_add.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
p12_add.o: pkcs12.h
p12_add.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
p12_add.o: ../opensslv.h pkcs12.h
p12_attr.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
p12_attr.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
p12_attr.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -111,7 +111,7 @@ p12_attr.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
p12_attr.o: ../../include/ripemd.h ../../include/rsa.h
p12_attr.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
p12_attr.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
p12_attr.o: ../crypto.h ../opensslv.h pkcs12.h
p12_attr.o: ../crypto.h ../opensslconf.h ../opensslv.h pkcs12.h
p12_bags.o: ../../include/asn1.h ../../include/asn1_mac.h ../../include/bio.h
p12_bags.o: ../../include/blowfish.h ../../include/bn.h ../../include/buffer.h
p12_bags.o: ../../include/cast.h ../../include/des.h ../../include/dh.h
......@@ -122,7 +122,7 @@ p12_bags.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
p12_bags.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
p12_bags.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
p12_bags.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
p12_bags.o: ../crypto.h ../opensslv.h pkcs12.h
p12_bags.o: ../crypto.h ../opensslconf.h ../opensslv.h pkcs12.h
p12_crpt.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
p12_crpt.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
p12_crpt.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -133,7 +133,7 @@ p12_crpt.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
p12_crpt.o: ../../include/ripemd.h ../../include/rsa.h
p12_crpt.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
p12_crpt.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
p12_crpt.o: ../crypto.h ../opensslv.h pkcs12.h
p12_crpt.o: ../crypto.h ../opensslconf.h ../opensslv.h pkcs12.h
p12_crt.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
p12_crt.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
p12_crt.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -143,8 +143,8 @@ p12_crt.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
p12_crt.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
p12_crt.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
p12_crt.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
p12_crt.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
p12_crt.o: pkcs12.h
p12_crt.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
p12_crt.o: ../opensslv.h pkcs12.h
p12_decr.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
p12_decr.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
p12_decr.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -155,7 +155,7 @@ p12_decr.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
p12_decr.o: ../../include/ripemd.h ../../include/rsa.h
p12_decr.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
p12_decr.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
p12_decr.o: ../crypto.h ../opensslv.h pkcs12.h
p12_decr.o: ../crypto.h ../opensslconf.h ../opensslv.h pkcs12.h
p12_init.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
p12_init.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
p12_init.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -166,7 +166,7 @@ p12_init.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
p12_init.o: ../../include/ripemd.h ../../include/rsa.h
p12_init.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
p12_init.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
p12_init.o: ../crypto.h ../opensslv.h pkcs12.h
p12_init.o: ../crypto.h ../opensslconf.h ../opensslv.h pkcs12.h
p12_key.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
p12_key.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
p12_key.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -176,8 +176,8 @@ p12_key.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
p12_key.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
p12_key.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
p12_key.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
p12_key.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
p12_key.o: pkcs12.h
p12_key.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
p12_key.o: ../opensslv.h pkcs12.h
p12_kiss.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
p12_kiss.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
p12_kiss.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -188,7 +188,7 @@ p12_kiss.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
p12_kiss.o: ../../include/ripemd.h ../../include/rsa.h
p12_kiss.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
p12_kiss.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
p12_kiss.o: ../crypto.h ../opensslv.h pkcs12.h
p12_kiss.o: ../crypto.h ../opensslconf.h ../opensslv.h pkcs12.h
p12_lib.o: ../../include/asn1.h ../../include/asn1_mac.h ../../include/bio.h
p12_lib.o: ../../include/blowfish.h ../../include/bn.h ../../include/buffer.h
p12_lib.o: ../../include/cast.h ../../include/des.h ../../include/dh.h
......@@ -199,7 +199,7 @@ p12_lib.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
p12_lib.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
p12_lib.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
p12_lib.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
p12_lib.o: ../crypto.h ../opensslv.h pkcs12.h
p12_lib.o: ../crypto.h ../opensslconf.h ../opensslv.h pkcs12.h
p12_mac.o: ../../include/asn1.h ../../include/asn1_mac.h ../../include/bio.h
p12_mac.o: ../../include/blowfish.h ../../include/bn.h ../../include/buffer.h
p12_mac.o: ../../include/cast.h ../../include/des.h ../../include/dh.h
......@@ -210,7 +210,7 @@ p12_mac.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
p12_mac.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
p12_mac.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
p12_mac.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
p12_mac.o: ../crypto.h ../opensslv.h pkcs12.h
p12_mac.o: ../crypto.h ../opensslconf.h ../opensslv.h pkcs12.h
p12_mutl.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
p12_mutl.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
p12_mutl.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -221,7 +221,7 @@ p12_mutl.o: ../../include/pkcs7.h ../../include/rand.h ../../include/rc2.h
p12_mutl.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
p12_mutl.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
p12_mutl.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h
p12_mutl.o: ../cryptlib.h ../crypto.h ../opensslv.h pkcs12.h
p12_mutl.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h pkcs12.h
p12_sbag.o: ../../include/asn1.h ../../include/asn1_mac.h ../../include/bio.h
p12_sbag.o: ../../include/blowfish.h ../../include/bn.h ../../include/buffer.h
p12_sbag.o: ../../include/cast.h ../../include/des.h ../../include/dh.h
......@@ -232,7 +232,7 @@ p12_sbag.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
p12_sbag.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
p12_sbag.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
p12_sbag.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
p12_sbag.o: ../crypto.h ../opensslv.h pkcs12.h
p12_sbag.o: ../crypto.h ../opensslconf.h ../opensslv.h pkcs12.h
p12_utl.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
p12_utl.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
p12_utl.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -242,8 +242,8 @@ p12_utl.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
p12_utl.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
p12_utl.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
p12_utl.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
p12_utl.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
p12_utl.o: pkcs12.h
p12_utl.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
p12_utl.o: ../opensslv.h pkcs12.h
pk12err.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
pk12err.o: ../../include/bn.h ../../include/cast.h ../../include/des.h
pk12err.o: ../../include/dh.h ../../include/dsa.h ../../include/err.h
......@@ -253,4 +253,4 @@ pk12err.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
pk12err.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
pk12err.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
pk12err.o: ../../include/x509.h ../../include/x509_vfy.h ../crypto.h
pk12err.o: ../opensslv.h pkcs12.h
pk12err.o: ../opensslconf.h ../opensslv.h pkcs12.h
......@@ -101,8 +101,9 @@ PKCS12_SAFEBAG *PKCS12_MAKE_KEYBAG (PKCS8_PRIV_KEY_INFO *p8)
/* Turn PKCS8 object into a shrouded keybag */
PKCS12_SAFEBAG *PKCS12_MAKE_SHKEYBAG (pbe_nid, pass, passlen, salt, saltlen, iter, p8)int pbe_nid;
unsigned char *pass;
PKCS12_SAFEBAG *PKCS12_MAKE_SHKEYBAG (pbe_nid, pass, passlen, salt, saltlen, iter, p8)
int pbe_nid;
const char *pass;
int passlen;
unsigned char *salt;
int saltlen;
......@@ -151,7 +152,7 @@ PKCS7 *PKCS12_pack_p7data (STACK *sk)
/* Turn a stack of SAFEBAGS into a PKCS#7 encrypted data ContentInfo */
PKCS7 *PKCS12_pack_p7encdata (int pbe_nid, unsigned char *pass, int passlen,
PKCS7 *PKCS12_pack_p7encdata (int pbe_nid, const char *pass, int passlen,
unsigned char *salt, int saltlen, int iter, STACK *bags)
{
PKCS7 *p7;
......@@ -184,7 +185,7 @@ PKCS7 *PKCS12_pack_p7encdata (int pbe_nid, unsigned char *pass, int passlen,
return p7;
}
X509_SIG *PKCS8_encrypt (int pbe_nid, unsigned char *pass, int passlen,
X509_SIG *PKCS8_encrypt (int pbe_nid, const char *pass, int passlen,
unsigned char *salt, int saltlen, int iter,
PKCS8_PRIV_KEY_INFO *p8inf)
{
......
......@@ -145,8 +145,8 @@ int PKCS8_add_keyusage (PKCS8_PRIV_KEY_INFO *p8, int usage)
/* Add a friendlyname to a safebag */
int PKCS12_add_friendlyname_asc (PKCS12_SAFEBAG *bag, unsigned char *name,
int namelen)
int PKCS12_add_friendlyname_asc (PKCS12_SAFEBAG *bag, const char *name,
int namelen)
{
unsigned char *uniname;
int ret, unilen;
......@@ -160,8 +160,8 @@ int PKCS12_add_friendlyname_asc (PKCS12_SAFEBAG *bag, unsigned char *name,
}
int PKCS12_add_friendlyname_uni (PKCS12_SAFEBAG *bag, unsigned char *name,
int namelen)
int PKCS12_add_friendlyname_uni (PKCS12_SAFEBAG *bag,
const unsigned char *name, int namelen)
{
X509_ATTRIBUTE *attrib;
ASN1_BMPSTRING *bmp;
......
......@@ -78,12 +78,12 @@ EVP_PBE_alg_add(NID_pbe_WithSHA1And40BitRC2_CBC, EVP_rc2_40_cbc(),
EVP_sha1(), PKCS12_PBE_keyivgen);
}
int PKCS12_PBE_keyivgen (unsigned char *pass, int passlen, unsigned char *salt,
int PKCS12_PBE_keyivgen (const char *pass, int passlen, unsigned char *salt,
int saltlen, int iter, EVP_CIPHER *cipher, EVP_MD *md,
unsigned char *key, unsigned char *iv)
{
if (!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_KEY_ID,
iter, EVP_CIPHER_key_length(cipher), key, md)) {
iter, EVP_CIPHER_key_length(cipher), key, md)) {
PKCS12err(PKCS12_F_PKCS12_PBE_KEYIVGEN,PKCS12_R_KEY_GEN_ERROR);
return 0;
}
......
......@@ -72,7 +72,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
X509 *tcert;
int i;
unsigned char keyid[EVP_MAX_MD_SIZE];
int keyidlen;
unsigned int keyidlen;
/* Set defaults */
if(!nid_cert) nid_cert = NID_pbe_WithSHA1And40BitRC2_CBC;
......@@ -115,7 +115,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
/* Turn certbags into encrypted authsafe */
authsafe = PKCS12_pack_p7encdata (nid_cert, pass, -1, NULL, 0,
iter, bags);
iter, bags);
sk_pop_free(bags, PKCS12_SAFEBAG_free);
if (!authsafe) return NULL;
......@@ -151,7 +151,8 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
sk_pop_free(safes, PKCS7_free);
if(!PKCS12_set_mac (p12, pass, -1, NULL, 0, mac_iter, NULL)) return NULL;
if(!PKCS12_set_mac (p12, pass, -1, NULL, 0, mac_iter, NULL))
return NULL;
return p12;
......
......@@ -68,7 +68,7 @@
* Malloc'ed buffer
*/
unsigned char * PKCS12_pbe_crypt (X509_ALGOR *algor, unsigned char *pass,
unsigned char * PKCS12_pbe_crypt (X509_ALGOR *algor, const char *pass,
int passlen, unsigned char *in, int inlen, unsigned char **data,
int *datalen, int en_de)
{
......@@ -107,7 +107,7 @@ unsigned char * PKCS12_pbe_crypt (X509_ALGOR *algor, unsigned char *pass,
*/
char * PKCS12_decrypt_d2i (X509_ALGOR *algor, char * (*d2i)(),
void (*free_func)(), unsigned char *pass, int passlen,
void (*free_func)(), const char *pass, int passlen,
ASN1_OCTET_STRING *oct, int seq)
{
unsigned char *out, *p;
......@@ -115,7 +115,7 @@ char * PKCS12_decrypt_d2i (X509_ALGOR *algor, char * (*d2i)(),
int outlen;
if (!PKCS12_pbe_crypt (algor, pass, passlen, oct->data, oct->length,
&out, &outlen, 0)) {
&out, &outlen, 0)) {
PKCS12err(PKCS12_F_PKCS12_DECRYPT_D2I,PKCS12_R_PKCS12_PBE_CRYPT_ERROR);
return NULL;
}
......@@ -147,7 +147,8 @@ char * PKCS12_decrypt_d2i (X509_ALGOR *algor, char * (*d2i)(),
*/
ASN1_OCTET_STRING *PKCS12_i2d_encrypt (X509_ALGOR *algor, int (*i2d)(),
unsigned char *pass, int passlen, char *obj, int seq)
const char *pass, int passlen,
char *obj, int seq)
{
ASN1_OCTET_STRING *oct;
unsigned char *in, *p;
......
......@@ -74,7 +74,7 @@ void h__dump (unsigned char *p, int len);
#define min(a,b) ((a) < (b) ? (a) : (b))
#endif
int PKCS12_key_gen_asc (unsigned char *pass, int passlen, unsigned char *salt,
int PKCS12_key_gen_asc (const char *pass, int passlen, unsigned char *salt,
int saltlen, int id, int iter, int n, unsigned char *out,
const EVP_MD *md_type)
{
......
......@@ -63,9 +63,9 @@
/* Simplified PKCS#12 routines */
#ifndef NOPROTO
static int parse_pk12( PKCS12 *p12, unsigned char *pass, int passlen, EVP_PKEY **pkey, X509 **cert, STACK **ca);
static int parse_bags( STACK *bags, unsigned char *pass, int passlen, EVP_PKEY **pkey, X509 **cert, STACK **ca, ASN1_OCTET_STRING **keyid, char *keymatch);
static int parse_bag( PKCS12_SAFEBAG *bag, unsigned char *pass, int passlen, EVP_PKEY **pkey, X509 **cert, STACK **ca, ASN1_OCTET_STRING **keyid, char *keymatch);
static int parse_pk12( PKCS12 *p12, const char *pass, int passlen, EVP_PKEY **pkey, X509 **cert, STACK **ca);
static int parse_bags( STACK *bags, const char *pass, int passlen, EVP_PKEY **pkey, X509 **cert, STACK **ca, ASN1_OCTET_STRING **keyid, char *keymatch);
static int parse_bag( PKCS12_SAFEBAG *bag, const char *pass, int passlen, EVP_PKEY **pkey, X509 **cert, STACK **ca, ASN1_OCTET_STRING **keyid, char *keymatch);
#else
static int parse_pk12();
static int parse_bags();
......@@ -78,7 +78,7 @@ static int parse_bag();
* passed unitialised.
*/
int PKCS12_parse (PKCS12 *p12, char *pass, EVP_PKEY **pkey, X509 **cert,
int PKCS12_parse (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
STACK **ca)
{
......@@ -125,7 +125,7 @@ return 0;
/* Parse the outer PKCS#12 structure */
static int parse_pk12 (PKCS12 *p12, unsigned char *pass, int passlen,
static int parse_pk12 (PKCS12 *p12, const char *pass, int passlen,
EVP_PKEY **pkey, X509 **cert, STACK **ca)
{
STACK *asafes, *bags;
......@@ -160,9 +160,9 @@ static int parse_pk12 (PKCS12 *p12, unsigned char *pass, int passlen,
}
static int parse_bags (STACK *bags, unsigned char *pass, int passlen,
EVP_PKEY **pkey, X509 **cert, STACK **ca, ASN1_OCTET_STRING **keyid,
char *keymatch)
static int parse_bags (STACK *bags, const char *pass, int passlen,
EVP_PKEY **pkey, X509 **cert, STACK **ca,
ASN1_OCTET_STRING **keyid, char *keymatch)
{
int i;
for (i = 0; i < sk_num (bags); i++) {
......@@ -177,8 +177,9 @@ static int parse_bags (STACK *bags, unsigned char *pass, int passlen,
#define MATCH_CERT 0x2
#define MATCH_ALL 0x3
static int parse_bag (PKCS12_SAFEBAG *bag, unsigned char *pass, int passlen,
EVP_PKEY **pkey, X509 **cert, STACK **ca, ASN1_OCTET_STRING **keyid,
static int parse_bag (PKCS12_SAFEBAG *bag, const char *pass, int passlen,
EVP_PKEY **pkey, X509 **cert, STACK **ca,
ASN1_OCTET_STRING **keyid,
char *keymatch)
{
PKCS8_PRIV_KEY_INFO *p8;
......
......@@ -63,8 +63,8 @@
#include "pkcs12.h"
/* Generate a MAC */
int PKCS12_gen_mac (PKCS12 *p12, unsigned char *pass, int passlen,
unsigned char *mac, unsigned int *maclen)
int PKCS12_gen_mac (PKCS12 *p12, const char *pass, int passlen,
unsigned char *mac, unsigned int *maclen)
{
const EVP_MD *md_type;
HMAC_CTX hmac;
......@@ -92,7 +92,7 @@ int PKCS12_gen_mac (PKCS12 *p12, unsigned char *pass, int passlen,
}
/* Verify the mac */
int PKCS12_verify_mac (PKCS12 *p12, unsigned char *pass, int passlen)
int PKCS12_verify_mac (PKCS12 *p12, const char *pass, int passlen)
{
unsigned char mac[EVP_MAX_MD_SIZE];
unsigned int maclen;
......@@ -114,11 +114,12 @@ int PKCS12_verify_mac (PKCS12 *p12, unsigned char *pass, int passlen)
/* Set a mac */
int PKCS12_set_mac (PKCS12 *p12, unsigned char *pass, int passlen,
int PKCS12_set_mac (PKCS12 *p12, const char *pass, int passlen,
unsigned char *salt, int saltlen, int iter, EVP_MD *md_type)
{
unsigned char mac[EVP_MAX_MD_SIZE];
int maclen;
unsigned int maclen;
if (!md_type) md_type = EVP_sha1();
if (PKCS12_setup_mac (p12, iter, salt, saltlen, md_type) ==
PKCS12_ERROR) {
......
......@@ -62,7 +62,7 @@
/* Cheap and nasty Unicode stuff */
unsigned char *asc2uni (unsigned char *asc, unsigned char **uni, int *unilen)
unsigned char *asc2uni (const char *asc, unsigned char **uni, int *unilen)
{
int ulen, i;
unsigned char *unitmp;
......
......@@ -192,28 +192,47 @@ ASN1_seq_unpack((p12)->authsafes->d.data->data, \
#ifndef NOPROTO
PKCS12_SAFEBAG *PKCS12_pack_safebag(char *obj, int (*i2d)(), int nid1, int nid2);
PKCS12_SAFEBAG *PKCS12_MAKE_KEYBAG(PKCS8_PRIV_KEY_INFO *p8);
X509_SIG *PKCS8_encrypt(int pbe_nid, unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8);
PKCS12_SAFEBAG *PKCS12_MAKE_SHKEYBAG(int pbe_nid, unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8);
X509_SIG *PKCS8_encrypt(int pbe_nid, const char *pass, int passlen,
unsigned char *salt, int saltlen, int iter,
PKCS8_PRIV_KEY_INFO *p8);
PKCS12_SAFEBAG *PKCS12_MAKE_SHKEYBAG(int pbe_nid, const char *pass,
int passlen, unsigned char *salt,
int saltlen, int iter,
PKCS8_PRIV_KEY_INFO *p8);
PKCS7 *PKCS12_pack_p7data(STACK *sk);
PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int iter, STACK *bags);
PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen,
unsigned char *salt, int saltlen, int iter,
STACK *bags);
int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name, int namelen);
int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, unsigned char *name, int namelen);
int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag, unsigned char *name, int namelen);
int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name,
int namelen);
int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag, const unsigned char *name,
int namelen);
int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage);
ASN1_TYPE *PKCS12_get_attr_gen(STACK *attrs, int attr_nid);
char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag);
unsigned char *PKCS12_pbe_crypt(X509_ALGOR *algor, unsigned char *pass, int passlen, unsigned char *in, int inlen, unsigned char **data, int *datalen, int en_de);
char *PKCS12_decrypt_d2i(X509_ALGOR *algor, char *(*d2i)(), void (*free_func)(), unsigned char *pass, int passlen, ASN1_STRING *oct, int seq);
ASN1_STRING *PKCS12_i2d_encrypt(X509_ALGOR *algor, int (*i2d)(), unsigned char *pass, int passlen, char *obj, int seq);
unsigned char *PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass,
int passlen, unsigned char *in, int inlen,
unsigned char **data, int *datalen, int en_de);
char *PKCS12_decrypt_d2i(X509_ALGOR *algor, char *(*d2i)(),
void (*free_func)(), const char *pass, int passlen,
ASN1_STRING *oct, int seq);
ASN1_STRING *PKCS12_i2d_encrypt(X509_ALGOR *algor, int (*i2d)(),
const char *pass, int passlen, char *obj,
int seq);
PKCS12 *PKCS12_init(int mode);
int PKCS12_key_gen_asc(unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int id, int iter, int n, unsigned char *out, const EVP_MD *md_type);
int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt,
int saltlen, int id, int iter, int n,
unsigned char *out, const EVP_MD *md_type);
int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int id, int iter, int n, unsigned char *out, const EVP_MD *md_type);
int PKCS12_PBE_keyivgen(unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int iter, EVP_CIPHER *cipher, EVP_MD *md_type, unsigned char *key, unsigned char *iv);
int PKCS12_gen_mac(PKCS12 *p12, unsigned char *pass, int passlen, unsigned char *mac, unsigned int *maclen);
int PKCS12_verify_mac(PKCS12 *p12, unsigned char *pass, int passlen);
int PKCS12_set_mac(PKCS12 *p12, unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int iter, EVP_MD *md_type);
int PKCS12_PBE_keyivgen(const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, EVP_CIPHER *cipher, EVP_MD *md_type, unsigned char *key, unsigned char *iv);
int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, unsigned char *mac, unsigned int *maclen);
int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen);
int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen,
unsigned char *salt, int saltlen, int iter,
EVP_MD *md_type);
int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, EVP_MD *md_type);
unsigned char *asc2uni(unsigned char *asc, unsigned char **uni, int *unilen);
unsigned char *asc2uni(const char *asc, unsigned char **uni, int *unilen);
char *uni2asc(unsigned char *uni, int unilen);
int i2d_PKCS12_BAGS(PKCS12_BAGS *a, unsigned char **pp);
PKCS12_BAGS *PKCS12_BAGS_new(void);
......@@ -233,7 +252,8 @@ PKCS12_SAFEBAG *d2i_PKCS12_SAFEBAG(PKCS12_SAFEBAG **a, unsigned char **pp, long
void PKCS12_SAFEBAG_free(PKCS12_SAFEBAG *a);
void ERR_load_PKCS12_strings(void);
void PKCS12_PBE_add(void);
int PKCS12_parse(PKCS12 *p12, char *pass, EVP_PKEY **pkey, X509 **cert, STACK **ca);
int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
STACK **ca);
PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, STACK *ca, int nid_key, int nid_cert, int iter, int mac_iter, int keytype);
int i2d_PKCS12_bio(BIO *bp, PKCS12 *p12);
int i2d_PKCS12_fp(FILE *fp, PKCS12 *p12);
......
......@@ -96,7 +96,7 @@ pk7_doit.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
pk7_doit.o: ../../include/ripemd.h ../../include/rsa.h
pk7_doit.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
pk7_doit.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
pk7_doit.o: ../crypto.h ../opensslv.h pkcs7.h
pk7_doit.o: ../crypto.h ../opensslconf.h ../opensslv.h pkcs7.h
pk7_lib.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
pk7_lib.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
pk7_lib.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -106,7 +106,7 @@ pk7_lib.o: ../../include/mdc2.h ../../include/objects.h ../../include/rc2.h
pk7_lib.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
pk7_lib.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
pk7_lib.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h
pk7_lib.o: ../cryptlib.h ../crypto.h ../opensslv.h pkcs7.h
pk7_lib.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h pkcs7.h
pkcs7err.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
pkcs7err.o: ../../include/bn.h ../../include/cast.h ../../include/des.h
pkcs7err.o: ../../include/dh.h ../../include/dsa.h ../../include/err.h
......@@ -116,4 +116,4 @@ pkcs7err.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
pkcs7err.o: ../../include/ripemd.h ../../include/rsa.h
pkcs7err.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
pkcs7err.o: ../../include/x509.h ../../include/x509_vfy.h ../crypto.h
pkcs7err.o: ../opensslv.h pkcs7.h
pkcs7err.o: ../opensslconf.h ../opensslv.h pkcs7.h
......@@ -78,8 +78,8 @@ errors:
# DO NOT DELETE THIS LINE -- make depend depends on it.
rc2_cbc.o: rc2.h rc2_locl.h
rc2_ecb.o: ../opensslv.h rc2.h rc2_locl.h
rc2_skey.o: rc2.h rc2_locl.h
rc2cfb64.o: rc2.h rc2_locl.h
rc2ofb64.o: rc2.h rc2_locl.h
rc2_cbc.o: ../opensslconf.h rc2.h rc2_locl.h
rc2_ecb.o: ../opensslconf.h ../opensslv.h rc2.h rc2_locl.h
rc2_skey.o: ../opensslconf.h rc2.h rc2_locl.h
rc2cfb64.o: ../opensslconf.h rc2.h rc2_locl.h
rc2ofb64.o: ../opensslconf.h rc2.h rc2_locl.h
......@@ -106,5 +106,5 @@ errors:
# DO NOT DELETE THIS LINE -- make depend depends on it.
rc4_enc.o: rc4.h rc4_locl.h
rc4_skey.o: ../opensslv.h rc4.h rc4_locl.h
rc4_enc.o: ../opensslconf.h rc4.h rc4_locl.h
rc4_skey.o: ../opensslconf.h ../opensslv.h rc4.h rc4_locl.h
......@@ -88,25 +88,29 @@ $(ERRC).c: $(ERR).err $(ERR).h
rsa_eay.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
rsa_eay.o: ../../include/e_os.h ../../include/err.h ../../include/rand.h
rsa_eay.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslv.h rsa.h
rsa_eay.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslconf.h
rsa_eay.o: ../opensslv.h rsa.h
rsa_err.o: ../../include/bn.h ../../include/err.h ../../include/stack.h
rsa_err.o: ../crypto.h ../opensslv.h rsa.h
rsa_err.o: ../crypto.h ../opensslconf.h ../opensslv.h rsa.h
rsa_gen.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
rsa_gen.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h
rsa_gen.o: ../cryptlib.h ../crypto.h ../opensslv.h rsa.h
rsa_gen.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h rsa.h
rsa_lib.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
rsa_lib.o: ../../include/e_os.h ../../include/err.h ../../include/lhash.h
rsa_lib.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslv.h rsa.h
rsa_lib.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslconf.h
rsa_lib.o: ../opensslv.h rsa.h
rsa_none.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
rsa_none.o: ../../include/e_os.h ../../include/err.h ../../include/rand.h
rsa_none.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslv.h rsa.h
rsa_none.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslconf.h
rsa_none.o: ../opensslv.h rsa.h
rsa_oaep.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
rsa_oaep.o: ../../include/e_os.h ../../include/err.h ../../include/rand.h
rsa_oaep.o: ../../include/sha.h ../../include/stack.h ../cryptlib.h ../crypto.h
rsa_oaep.o: ../opensslv.h rsa.h
rsa_oaep.o: ../opensslconf.h ../opensslv.h rsa.h
rsa_pk1.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
rsa_pk1.o: ../../include/e_os.h ../../include/err.h ../../include/rand.h
rsa_pk1.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslv.h rsa.h
rsa_pk1.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslconf.h
rsa_pk1.o: ../opensslv.h rsa.h
rsa_saos.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
rsa_saos.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
rsa_saos.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -116,8 +120,8 @@ rsa_saos.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
rsa_saos.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
rsa_saos.o: ../../include/ripemd.h ../../include/safestack.h
rsa_saos.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
rsa_saos.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
rsa_saos.o: rsa.h
rsa_saos.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
rsa_saos.o: ../opensslv.h rsa.h
rsa_sign.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
rsa_sign.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
rsa_sign.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -127,8 +131,9 @@ rsa_sign.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
rsa_sign.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
rsa_sign.o: ../../include/ripemd.h ../../include/safestack.h
rsa_sign.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
rsa_sign.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
rsa_sign.o: rsa.h
rsa_sign.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
rsa_sign.o: ../opensslv.h rsa.h
rsa_ssl.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h
rsa_ssl.o: ../../include/e_os.h ../../include/err.h ../../include/rand.h
rsa_ssl.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslv.h rsa.h
rsa_ssl.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslconf.h
rsa_ssl.o: ../opensslv.h rsa.h
......@@ -103,7 +103,8 @@ by_dir.o: ../../include/md5.h ../../include/mdc2.h ../../include/objects.h
by_dir.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
by_dir.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
by_dir.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
by_dir.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
by_dir.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
by_dir.o: x509_vfy.h
by_file.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
by_file.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
by_file.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -114,7 +115,7 @@ by_file.o: ../../include/pem.h ../../include/pem2.h ../../include/pkcs7.h
by_file.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
by_file.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
by_file.o: ../../include/sha.h ../../include/stack.h ../cryptlib.h ../crypto.h
by_file.o: ../opensslv.h x509.h x509_vfy.h
by_file.o: ../opensslconf.h ../opensslv.h x509.h x509_vfy.h
x509_cmp.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_cmp.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_cmp.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -124,7 +125,8 @@ x509_cmp.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
x509_cmp.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
x509_cmp.o: ../../include/ripemd.h ../../include/rsa.h
x509_cmp.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509_cmp.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509_cmp.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509_cmp.o: x509_vfy.h
x509_d2.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_d2.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_d2.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -134,7 +136,7 @@ x509_d2.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
x509_d2.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
x509_d2.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
x509_d2.o: ../../include/sha.h ../../include/stack.h ../cryptlib.h ../crypto.h
x509_d2.o: ../opensslv.h x509.h x509_vfy.h
x509_d2.o: ../opensslconf.h ../opensslv.h x509.h x509_vfy.h
x509_def.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_def.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_def.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -144,7 +146,8 @@ x509_def.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
x509_def.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
x509_def.o: ../../include/ripemd.h ../../include/rsa.h
x509_def.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509_def.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509_def.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509_def.o: x509_vfy.h
x509_err.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_err.o: ../../include/bn.h ../../include/cast.h ../../include/des.h
x509_err.o: ../../include/dh.h ../../include/dsa.h ../../include/err.h
......@@ -153,7 +156,7 @@ x509_err.o: ../../include/md5.h ../../include/mdc2.h ../../include/objects.h
x509_err.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
x509_err.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
x509_err.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509_err.o: ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509_err.o: ../crypto.h ../opensslconf.h ../opensslv.h x509.h x509_vfy.h
x509_ext.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_ext.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_ext.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -163,7 +166,8 @@ x509_ext.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
x509_ext.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
x509_ext.o: ../../include/ripemd.h ../../include/rsa.h
x509_ext.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509_ext.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509_ext.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509_ext.o: x509_vfy.h
x509_lu.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_lu.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_lu.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -173,7 +177,8 @@ x509_lu.o: ../../include/md5.h ../../include/mdc2.h ../../include/objects.h
x509_lu.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
x509_lu.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
x509_lu.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509_lu.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509_lu.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509_lu.o: x509_vfy.h
x509_obj.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_obj.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_obj.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -183,7 +188,8 @@ x509_obj.o: ../../include/md5.h ../../include/mdc2.h ../../include/objects.h
x509_obj.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
x509_obj.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
x509_obj.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509_obj.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509_obj.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509_obj.o: x509_vfy.h
x509_r2x.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_r2x.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_r2x.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -193,7 +199,8 @@ x509_r2x.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
x509_r2x.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
x509_r2x.o: ../../include/ripemd.h ../../include/rsa.h
x509_r2x.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509_r2x.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509_r2x.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509_r2x.o: x509_vfy.h
x509_req.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_req.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_req.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -203,8 +210,8 @@ x509_req.o: ../../include/mdc2.h ../../include/objects.h ../../include/pem.h
x509_req.o: ../../include/pem2.h ../../include/pkcs7.h ../../include/rc2.h
x509_req.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
x509_req.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
x509_req.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslv.h
x509_req.o: x509.h x509_vfy.h
x509_req.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslconf.h
x509_req.o: ../opensslv.h x509.h x509_vfy.h
x509_set.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_set.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_set.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -214,7 +221,8 @@ x509_set.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
x509_set.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
x509_set.o: ../../include/ripemd.h ../../include/rsa.h
x509_set.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509_set.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509_set.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509_set.o: x509_vfy.h
x509_txt.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_txt.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_txt.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -224,7 +232,8 @@ x509_txt.o: ../../include/md5.h ../../include/mdc2.h ../../include/objects.h
x509_txt.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
x509_txt.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
x509_txt.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509_txt.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509_txt.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509_txt.o: x509_vfy.h
x509_v3.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_v3.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_v3.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -234,7 +243,7 @@ x509_v3.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
x509_v3.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
x509_v3.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
x509_v3.o: ../../include/sha.h ../../include/stack.h ../cryptlib.h ../crypto.h
x509_v3.o: ../opensslv.h x509.h x509_vfy.h
x509_v3.o: ../opensslconf.h ../opensslv.h x509.h x509_vfy.h
x509_vfy.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509_vfy.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509_vfy.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -244,7 +253,8 @@ x509_vfy.o: ../../include/md5.h ../../include/mdc2.h ../../include/objects.h
x509_vfy.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
x509_vfy.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
x509_vfy.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509_vfy.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509_vfy.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509_vfy.o: x509_vfy.h
x509name.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509name.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509name.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -254,7 +264,8 @@ x509name.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
x509name.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
x509name.o: ../../include/ripemd.h ../../include/rsa.h
x509name.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509name.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509name.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509name.o: x509_vfy.h
x509rset.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509rset.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509rset.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -264,7 +275,8 @@ x509rset.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
x509rset.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
x509rset.o: ../../include/ripemd.h ../../include/rsa.h
x509rset.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509rset.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509rset.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509rset.o: x509_vfy.h
x509type.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x509type.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x509type.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -274,7 +286,8 @@ x509type.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
x509type.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
x509type.o: ../../include/ripemd.h ../../include/rsa.h
x509type.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
x509type.o: ../cryptlib.h ../crypto.h ../opensslv.h x509.h x509_vfy.h
x509type.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509.h
x509type.o: x509_vfy.h
x_all.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
x_all.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
x_all.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -284,4 +297,4 @@ x_all.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
x_all.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
x_all.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
x_all.o: ../../include/sha.h ../../include/stack.h ../cryptlib.h ../crypto.h
x_all.o: ../opensslv.h x509.h x509_vfy.h
x_all.o: ../opensslconf.h ../opensslv.h x509.h x509_vfy.h
......@@ -885,10 +885,10 @@ PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
/* Password based encryption routines */
int EVP_PBE_ALGOR_CipherInit(X509_ALGOR *algor, unsigned char *pass,
int passlen, EVP_CIPHER_CTX *ctx, int en_de);
int EVP_PBE_ALGOR_CipherInit(X509_ALGOR *algor, const char *pass,
int passlen, EVP_CIPHER_CTX *ctx, int en_de);
int EVP_PBE_alg_add(int nid, EVP_CIPHER *cipher, EVP_MD *md,
EVP_PBE_KEYGEN *keygen);
EVP_PBE_KEYGEN *keygen);
void EVP_PBE_cleanup(void);
#else
......
......@@ -98,8 +98,8 @@ v3_akey.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
v3_akey.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
v3_akey.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
v3_akey.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
v3_akey.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
v3_akey.o: x509v3.h
v3_akey.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
v3_akey.o: ../opensslv.h x509v3.h
v3_alt.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3_alt.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
v3_alt.o: ../../include/conf.h ../../include/des.h ../../include/dh.h
......@@ -110,7 +110,7 @@ v3_alt.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h
v3_alt.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
v3_alt.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
v3_alt.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h
v3_alt.o: ../cryptlib.h ../crypto.h ../opensslv.h x509v3.h
v3_alt.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3_bcons.o: ../../include/asn1.h ../../include/asn1_mac.h ../../include/bio.h
v3_bcons.o: ../../include/blowfish.h ../../include/bn.h ../../include/buffer.h
v3_bcons.o: ../../include/cast.h ../../include/conf.h ../../include/des.h
......@@ -122,7 +122,7 @@ v3_bcons.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
v3_bcons.o: ../../include/ripemd.h ../../include/rsa.h
v3_bcons.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
v3_bcons.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
v3_bcons.o: ../crypto.h ../opensslv.h x509v3.h
v3_bcons.o: ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3_bitst.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3_bitst.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
v3_bitst.o: ../../include/conf.h ../../include/des.h ../../include/dh.h
......@@ -133,7 +133,7 @@ v3_bitst.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h
v3_bitst.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
v3_bitst.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
v3_bitst.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h
v3_bitst.o: ../cryptlib.h ../crypto.h ../opensslv.h x509v3.h
v3_bitst.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3_conf.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3_conf.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
v3_conf.o: ../../include/conf.h ../../include/des.h ../../include/dh.h
......@@ -144,7 +144,7 @@ v3_conf.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h
v3_conf.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
v3_conf.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
v3_conf.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h
v3_conf.o: ../cryptlib.h ../crypto.h ../opensslv.h x509v3.h
v3_conf.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3_cpols.o: ../../include/asn1.h ../../include/asn1_mac.h ../../include/bio.h
v3_cpols.o: ../../include/blowfish.h ../../include/bn.h ../../include/buffer.h
v3_cpols.o: ../../include/cast.h ../../include/conf.h ../../include/des.h
......@@ -156,7 +156,19 @@ v3_cpols.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
v3_cpols.o: ../../include/ripemd.h ../../include/rsa.h
v3_cpols.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
v3_cpols.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
v3_cpols.o: ../crypto.h ../opensslv.h x509v3.h
v3_cpols.o: ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3_crld.o: ../../include/asn1.h ../../include/asn1_mac.h ../../include/bio.h
v3_crld.o: ../../include/blowfish.h ../../include/bn.h ../../include/buffer.h
v3_crld.o: ../../include/cast.h ../../include/conf.h ../../include/des.h
v3_crld.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h
v3_crld.o: ../../include/err.h ../../include/evp.h ../../include/idea.h
v3_crld.o: ../../include/lhash.h ../../include/md2.h ../../include/md5.h
v3_crld.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
v3_crld.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
v3_crld.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
v3_crld.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
v3_crld.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
v3_crld.o: ../opensslv.h x509v3.h
v3_enum.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3_enum.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
v3_enum.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -166,8 +178,8 @@ v3_enum.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
v3_enum.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
v3_enum.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
v3_enum.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
v3_enum.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
v3_enum.o: x509v3.h
v3_enum.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
v3_enum.o: ../opensslv.h x509v3.h
v3_extku.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3_extku.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
v3_extku.o: ../../include/conf.h ../../include/des.h ../../include/dh.h
......@@ -178,7 +190,7 @@ v3_extku.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h
v3_extku.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
v3_extku.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
v3_extku.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h
v3_extku.o: ../cryptlib.h ../crypto.h ../opensslv.h x509v3.h
v3_extku.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3_genn.o: ../../include/asn1.h ../../include/asn1_mac.h ../../include/bio.h
v3_genn.o: ../../include/blowfish.h ../../include/bn.h ../../include/buffer.h
v3_genn.o: ../../include/cast.h ../../include/conf.h ../../include/des.h
......@@ -189,8 +201,8 @@ v3_genn.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
v3_genn.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
v3_genn.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
v3_genn.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
v3_genn.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
v3_genn.o: x509v3.h
v3_genn.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
v3_genn.o: ../opensslv.h x509v3.h
v3_ia5.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3_ia5.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
v3_ia5.o: ../../include/conf.h ../../include/des.h ../../include/dh.h
......@@ -201,7 +213,7 @@ v3_ia5.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h
v3_ia5.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
v3_ia5.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
v3_ia5.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h
v3_ia5.o: ../cryptlib.h ../crypto.h ../opensslv.h x509v3.h
v3_ia5.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3_int.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3_int.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
v3_int.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -211,8 +223,8 @@ v3_int.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
v3_int.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
v3_int.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
v3_int.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
v3_int.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
v3_int.o: x509v3.h
v3_int.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
v3_int.o: ../opensslv.h x509v3.h
v3_lib.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3_lib.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
v3_lib.o: ../../include/conf.h ../../include/des.h ../../include/dh.h
......@@ -223,7 +235,7 @@ v3_lib.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h
v3_lib.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
v3_lib.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
v3_lib.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h
v3_lib.o: ../cryptlib.h ../crypto.h ../opensslv.h x509v3.h
v3_lib.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3_pku.o: ../../include/asn1.h ../../include/asn1_mac.h ../../include/bio.h
v3_pku.o: ../../include/blowfish.h ../../include/bn.h ../../include/buffer.h
v3_pku.o: ../../include/cast.h ../../include/des.h ../../include/dh.h
......@@ -234,7 +246,7 @@ v3_pku.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
v3_pku.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
v3_pku.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
v3_pku.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
v3_pku.o: ../crypto.h ../opensslv.h x509v3.h
v3_pku.o: ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3_prn.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3_prn.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
v3_prn.o: ../../include/conf.h ../../include/des.h ../../include/dh.h
......@@ -245,7 +257,7 @@ v3_prn.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h
v3_prn.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
v3_prn.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
v3_prn.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h
v3_prn.o: ../cryptlib.h ../crypto.h ../opensslv.h x509v3.h
v3_prn.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3_skey.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3_skey.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
v3_skey.o: ../../include/des.h ../../include/dh.h ../../include/dsa.h
......@@ -255,8 +267,8 @@ v3_skey.o: ../../include/mdc2.h ../../include/objects.h ../../include/pkcs7.h
v3_skey.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
v3_skey.o: ../../include/ripemd.h ../../include/rsa.h ../../include/safestack.h
v3_skey.o: ../../include/sha.h ../../include/stack.h ../../include/x509.h
v3_skey.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslv.h
v3_skey.o: x509v3.h
v3_skey.o: ../../include/x509_vfy.h ../cryptlib.h ../crypto.h ../opensslconf.h
v3_skey.o: ../opensslv.h x509v3.h
v3_sxnet.o: ../../include/asn1.h ../../include/asn1_mac.h ../../include/bio.h
v3_sxnet.o: ../../include/blowfish.h ../../include/bn.h ../../include/buffer.h
v3_sxnet.o: ../../include/cast.h ../../include/conf.h ../../include/des.h
......@@ -268,7 +280,7 @@ v3_sxnet.o: ../../include/rc2.h ../../include/rc4.h ../../include/rc5.h
v3_sxnet.o: ../../include/ripemd.h ../../include/rsa.h
v3_sxnet.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
v3_sxnet.o: ../../include/x509.h ../../include/x509_vfy.h ../cryptlib.h
v3_sxnet.o: ../crypto.h ../opensslv.h x509v3.h
v3_sxnet.o: ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3_utl.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3_utl.o: ../../include/bn.h ../../include/buffer.h ../../include/cast.h
v3_utl.o: ../../include/conf.h ../../include/des.h ../../include/dh.h
......@@ -279,7 +291,7 @@ v3_utl.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h
v3_utl.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h
v3_utl.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h
v3_utl.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h
v3_utl.o: ../cryptlib.h ../crypto.h ../opensslv.h x509v3.h
v3_utl.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h x509v3.h
v3err.o: ../../include/asn1.h ../../include/bio.h ../../include/blowfish.h
v3err.o: ../../include/bn.h ../../include/cast.h ../../include/des.h
v3err.o: ../../include/dh.h ../../include/dsa.h ../../include/err.h
......@@ -289,4 +301,4 @@ v3err.o: ../../include/pkcs7.h ../../include/rc2.h ../../include/rc4.h
v3err.o: ../../include/rc5.h ../../include/ripemd.h ../../include/rsa.h
v3err.o: ../../include/safestack.h ../../include/sha.h ../../include/stack.h
v3err.o: ../../include/x509.h ../../include/x509_vfy.h ../crypto.h
v3err.o: ../opensslv.h x509v3.h
v3err.o: ../opensslconf.h ../opensslv.h x509v3.h
......@@ -127,15 +127,15 @@ STACK *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, GENERAL_NAME *gen,
break;
case GEN_EMAIL:
X509V3_add_value("email",gen->d.ia5->data, &ret);
X509V3_add_value_uchar("email",gen->d.ia5->data, &ret);
break;
case GEN_DNS:
X509V3_add_value("DNS",gen->d.ia5->data, &ret);
X509V3_add_value_uchar("DNS",gen->d.ia5->data, &ret);
break;
case GEN_URI:
X509V3_add_value("URI",gen->d.ia5->data, &ret);
X509V3_add_value_uchar("URI",gen->d.ia5->data, &ret);
break;
case GEN_DIRNAME:
......
......@@ -238,7 +238,7 @@ static SXNET * sxnet_v2i(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
/* Add an id given the zone as an ASCII number */
int SXNET_add_id_asc(SXNET **psx, char *zone, unsigned char *user,
int SXNET_add_id_asc(SXNET **psx, char *zone, char *user,
int userlen)
{
ASN1_INTEGER *izone = NULL;
......@@ -251,7 +251,7 @@ int SXNET_add_id_asc(SXNET **psx, char *zone, unsigned char *user,
/* Add an id given the zone as an unsigned long */
int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, unsigned char *user,
int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user,
int userlen)
{
ASN1_INTEGER *izone = NULL;
......@@ -269,7 +269,7 @@ int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, unsigned char *user,
* free it up afterwards.
*/
int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *zone, unsigned char *user,
int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *zone, char *user,
int userlen)
{
SXNET *sx = NULL;
......
......@@ -89,6 +89,12 @@ int X509V3_add_value(const char *name, const char *value, STACK **extlist)
return 0;
}
int X509V3_add_value_uchar(const char *name, const unsigned char *value,
STACK **extlist)
{
return X509V3_add_value(name,(const char *)value,extlist);
}
/* Free function for STACK of CONF_VALUE */
void X509V3_conf_free(CONF_VALUE *conf)
......
......@@ -299,9 +299,9 @@ SXNETID *d2i_SXNETID(SXNETID **a, unsigned char **pp, long length);
SXNETID *SXNETID_new(void);
void SXNETID_free(SXNETID *a);
int SXNET_add_id_asc(SXNET **psx, char *zone, unsigned char *user, int userlen);
int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, unsigned char *user, int userlen);
int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, unsigned char *user, int userlen);
int SXNET_add_id_asc(SXNET **psx, char *zone, char *user, int userlen);
int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user, int userlen);
int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, char *user, int userlen);
ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, char *zone);
ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone);
......@@ -395,6 +395,8 @@ void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject,
X509_REQ *req, X509_CRL *crl, int flags);
int X509V3_add_value(const char *name, const char *value, STACK **extlist);
int X509V3_add_value_uchar(const char *name, const unsigned char *value,
STACK **extlist);
int X509V3_add_value_bool(const char *name, int asn1_bool, STACK **extlist);
int X509V3_add_value_int(const char *name, ASN1_INTEGER *aint, STACK **extlist);
char * i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, ASN1_INTEGER *aint);
......
......@@ -85,9 +85,10 @@ $(ERRC).c: $(ERR).err
# DO NOT DELETE THIS LINE -- make depend depends on it.
rsar_err.o: ../crypto/crypto.h ../crypto/opensslv.h ../include/bn.h
rsar_err.o: ../include/err.h ../include/rsa.h ../include/stack.h rsaref.h
rsaref.o: ../crypto/cryptlib.h ../crypto/crypto.h ../crypto/opensslv.h
rsaref.o: ../include/bio.h ../include/bn.h ../include/buffer.h
rsaref.o: ../include/e_os.h ../include/err.h ../include/rand.h ../include/rsa.h
rsaref.o: ../include/stack.h rsaref.h
rsar_err.o: ../crypto/crypto.h ../crypto/opensslconf.h ../crypto/opensslv.h
rsar_err.o: ../include/bn.h ../include/err.h ../include/rsa.h
rsar_err.o: ../include/stack.h rsaref.h
rsaref.o: ../crypto/cryptlib.h ../crypto/crypto.h ../crypto/opensslconf.h
rsaref.o: ../crypto/opensslv.h ../include/bio.h ../include/bn.h
rsaref.o: ../include/buffer.h ../include/e_os.h ../include/err.h
rsaref.o: ../include/rand.h ../include/rsa.h ../include/stack.h rsaref.h
此差异已折叠。
......@@ -63,8 +63,8 @@
#ifndef NOPROTO
static int ssl23_num_ciphers(void );
static SSL_CIPHER *ssl23_get_cipher(unsigned int u);
static int ssl23_read(SSL *s, char *buf, int len);
static int ssl23_write(SSL *s, const char *buf, int len);
static int ssl23_read(SSL *s, void *buf, int len);
static int ssl23_write(SSL *s, const void *buf, int len);
static long ssl23_default_timeout(void );
static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p);
static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p);
......@@ -163,7 +163,7 @@ static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p)
return(3);
}
static int ssl23_read(SSL *s, char *buf, int len)
static int ssl23_read(SSL *s, void *buf, int len)
{
int n;
......@@ -193,7 +193,7 @@ static int ssl23_read(SSL *s, char *buf, int len)
}
}
static int ssl23_write(SSL *s, const char *buf, int len)
static int ssl23_write(SSL *s, const void *buf, int len)
{
int n;
......
......@@ -393,7 +393,7 @@ void ssl2_return_error(SSL *s, int err)
void ssl2_write_error(SSL *s)
{
char buf[3];
unsigned char buf[3];
int i,error;
buf[0]=SSL2_MT_ERROR;
......
......@@ -70,8 +70,8 @@
#ifndef NOPROTO
static int read_n(SSL *s,unsigned int n,unsigned int max,unsigned int extend);
static int do_ssl_write(SSL *s, const char *buf, unsigned int len);
static int write_pending(SSL *s, const char *buf, unsigned int len);
static int do_ssl_write(SSL *s, const unsigned char *buf, unsigned int len);
static int write_pending(SSL *s, const unsigned char *buf, unsigned int len);
static int ssl_mt_error(int n);
#else
static int read_n();
......@@ -96,7 +96,7 @@ int ssl2_peek(SSL *s, char *buf, int len)
/* SSL_read -
* This routine will return 0 to len bytes, decrypted etc if required.
*/
int ssl2_read(SSL *s, char *buf, int len)
int ssl2_read(SSL *s, void *buf, int len)
{
int n;
unsigned char mac[MAX_MAC_SIZE];
......@@ -366,8 +366,9 @@ static int read_n(SSL *s, unsigned int n, unsigned int max,
return(n);
}
int ssl2_write(SSL *s, const char *buf, int len)
int ssl2_write(SSL *s, const void *_buf, int len)
{
const unsigned char *buf=_buf;
unsigned int n,tot;
int i;
......@@ -412,7 +413,7 @@ int ssl2_write(SSL *s, const char *buf, int len)
}
}
static int write_pending(SSL *s, const char *buf, unsigned int len)
static int write_pending(SSL *s, const unsigned char *buf, unsigned int len)
{
int i;
......@@ -457,7 +458,7 @@ static int write_pending(SSL *s, const char *buf, unsigned int len)
}
}
static int do_ssl_write(SSL *s, const char *buf, unsigned int len)
static int do_ssl_write(SSL *s, const unsigned char *buf, unsigned int len)
{
unsigned int j,k,olen,p,mac_size,bs;
register unsigned char *pp;
......@@ -612,8 +613,7 @@ int ssl2_do_write(SSL *s)
{
int ret;
ret=ssl2_write(s,(char *)&(s->init_buf->data[s->init_off]),
s->init_num);
ret=ssl2_write(s,&s->init_buf->data[s->init_off],s->init_num);
if (ret == s->init_num)
return(1);
if (ret < 0)
......
......@@ -284,9 +284,8 @@ long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok)
if (s->state == st1)
{
i=ssl3_read_bytes(s,SSL3_RT_HANDSHAKE,
(char *)&(p[s->init_num]),
4-s->init_num);
i=ssl3_read_bytes(s,SSL3_RT_HANDSHAKE,&p[s->init_num],
4-s->init_num);
if (i < (4-s->init_num))
{
*ok=0;
......@@ -324,8 +323,7 @@ long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok)
n=s->s3->tmp.message_size;
if (n > 0)
{
i=ssl3_read_bytes(s,SSL3_RT_HANDSHAKE,
(char *)&(p[s->init_num]),(int)n);
i=ssl3_read_bytes(s,SSL3_RT_HANDSHAKE,&p[s->init_num],n);
if (i != (int)n)
{
*ok=0;
......
......@@ -992,7 +992,7 @@ int ssl3_shutdown(SSL *s)
return(0);
}
int ssl3_write(SSL *s, const char *buf, int len)
int ssl3_write(SSL *s, const void *buf, int len)
{
int ret,n;
......@@ -1045,7 +1045,7 @@ int ssl3_write(SSL *s, const char *buf, int len)
return(ret);
}
int ssl3_read(SSL *s, char *buf, int len)
int ssl3_read(SSL *s, void *buf, int len)
{
int ret;
......
......@@ -94,8 +94,9 @@
*/
#ifndef NOPROTO
static int do_ssl3_write(SSL *s, int type, const char *buf, unsigned int len);
static int ssl3_write_pending(SSL *s, int type, const char *buf,
static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
unsigned int len);
static int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
unsigned int len);
static int ssl3_get_record(SSL *s);
static int do_compress(SSL *ssl);
......@@ -468,8 +469,9 @@ static int do_compress(SSL *ssl)
/* Call this to write data
* It will return <= 0 if not all data has been sent or non-blocking IO.
*/
int ssl3_write_bytes(SSL *s, int type, const char *buf, int len)
int ssl3_write_bytes(SSL *s, int type, const void *_buf, int len)
{
const unsigned char *buf=_buf;
unsigned int tot,n,nw;
int i;
......@@ -513,8 +515,8 @@ int ssl3_write_bytes(SSL *s, int type, const char *buf, int len)
}
}
static int do_ssl3_write(SSL *s, int type, const char *buf,
unsigned int len)
static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
unsigned int len)
{
unsigned char *p,*plen;
int i,mac_size,clear=0;
......@@ -628,8 +630,8 @@ err:
}
/* if s->s3->wbuf.left != 0, we need to call this */
static int ssl3_write_pending(SSL *s, int type, const char *buf,
unsigned int len)
static int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
unsigned int len)
{
int i;
......@@ -669,7 +671,7 @@ static int ssl3_write_pending(SSL *s, int type, const char *buf,
}
}
int ssl3_read_bytes(SSL *s, int type, char *buf, int len)
int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len)
{
int al,i,j,n,ret;
SSL3_RECORD *rr;
......@@ -1009,8 +1011,8 @@ int ssl3_do_write(SSL *s, int type)
{
int ret;
ret=ssl3_write_bytes(s,type,(char *)
&(s->init_buf->data[s->init_off]),s->init_num);
ret=ssl3_write_bytes(s,type,&s->init_buf->data[s->init_off],
s->init_num);
if (ret == s->init_num)
return(1);
if (ret < 0) return(-1);
......@@ -1043,7 +1045,7 @@ int ssl3_dispatch_alert(SSL *s)
void (*cb)()=NULL;
s->s3->alert_dispatch=0;
i=do_ssl3_write(s,SSL3_RT_ALERT,&(s->s3->send_alert[0]),2);
i=do_ssl3_write(s,SSL3_RT_ALERT,&s->s3->send_alert[0],2);
if (i <= 0)
{
s->s3->alert_dispatch=1;
......
......@@ -183,9 +183,9 @@ typedef struct ssl_method_st
void (*ssl_free)(SSL *s);
int (*ssl_accept)(SSL *s);
int (*ssl_connect)(SSL *s);
int (*ssl_read)(SSL *s,char *buf,int len);
int (*ssl_read)(SSL *s,void *buf,int len);
int (*ssl_peek)(SSL *s,char *buf,int len);
int (*ssl_write)(SSL *s,const char *buf,int len);
int (*ssl_write)(SSL *s,const void *buf,int len);
int (*ssl_shutdown)(SSL *s);
int (*ssl_renegotiate)(SSL *s);
int (*ssl_renegotiate_check)(SSL *s);
......
......@@ -162,7 +162,7 @@ typedef struct ssl2_ctx_st
* args were passwd */
unsigned int wnum; /* number of bytes sent so far */
int wpend_tot;
const char *wpend_buf;
const unsigned char *wpend_buf;
int wpend_off; /* offset to data to write */
int wpend_len; /* number of bytes passwd to write */
......
......@@ -286,7 +286,7 @@ typedef struct ssl3_ctx_st
int wpend_tot; /* number bytes written */
int wpend_type;
int wpend_ret; /* number of bytes submitted */
const char *wpend_buf;
const unsigned char *wpend_buf;
/* used during startup, digest all incoming/outgoing packets */
EVP_MD_CTX finish_dgst1;
......@@ -301,7 +301,7 @@ typedef struct ssl3_ctx_st
/* we alow one fatal and one warning alert to be outstanding,
* send close alert via the warning alert */
int alert_dispatch;
char send_alert[2];
unsigned char send_alert[2];
/* This flag is set when we should renegotiate ASAP, basically when
* there is no more data in the read or write buffers */
......
......@@ -396,9 +396,9 @@ int ssl2_new(SSL *s);
void ssl2_free(SSL *s);
int ssl2_accept(SSL *s);
int ssl2_connect(SSL *s);
int ssl2_read(SSL *s, char *buf, int len);
int ssl2_read(SSL *s, void *buf, int len);
int ssl2_peek(SSL *s, char *buf, int len);
int ssl2_write(SSL *s, const char *buf, int len);
int ssl2_write(SSL *s, const void *buf, int len);
int ssl2_shutdown(SSL *s);
void ssl2_clear(SSL *s);
long ssl2_ctrl(SSL *s,int cmd, long larg, char *parg);
......@@ -426,9 +426,9 @@ SSL_CIPHER *ssl3_get_cipher(unsigned int u);
int ssl3_renegotiate(SSL *ssl);
int ssl3_renegotiate_check(SSL *ssl);
int ssl3_dispatch_alert(SSL *s);
int ssl3_read_bytes(SSL *s, int type, char *buf, int len);
int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len);
int ssl3_part_read(SSL *s, int i);
int ssl3_write_bytes(SSL *s, int type, const char *buf, int len);
int ssl3_write_bytes(SSL *s, int type, const void *buf, int len);
int ssl3_final_finish_mac(SSL *s, EVP_MD_CTX *ctx1,EVP_MD_CTX *ctx2,
unsigned char *sender, int slen,unsigned char *p);
int ssl3_cert_verify_mac(SSL *s, EVP_MD_CTX *in, unsigned char *p);
......@@ -443,9 +443,9 @@ int ssl3_new(SSL *s);
void ssl3_free(SSL *s);
int ssl3_accept(SSL *s);
int ssl3_connect(SSL *s);
int ssl3_read(SSL *s, char *buf, int len);
int ssl3_read(SSL *s, void *buf, int len);
int ssl3_peek(SSL *s,char *buf, int len);
int ssl3_write(SSL *s, const char *buf, int len);
int ssl3_write(SSL *s, const void *buf, int len);
int ssl3_shutdown(SSL *s);
void ssl3_clear(SSL *s);
long ssl3_ctrl(SSL *s,int cmd, long larg, char *parg);
......
......@@ -62,9 +62,9 @@
#include "hmac.h"
#include "ssl_locl.h"
static void tls1_P_hash(const EVP_MD *md, unsigned char *sec, int sec_len,
unsigned char *seed, int seed_len, unsigned char *out,
int olen)
static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec,
int sec_len, unsigned char *seed, int seed_len,
unsigned char *out, int olen)
{
int chunk,n;
unsigned int j;
......@@ -107,12 +107,12 @@ static void tls1_P_hash(const EVP_MD *md, unsigned char *sec, int sec_len,
}
static void tls1_PRF(const EVP_MD *md5, const EVP_MD *sha1,
unsigned char *label, int label_len, unsigned char *sec,
int slen, unsigned char *out1, unsigned char *out2,
int olen)
unsigned char *label, int label_len,
const unsigned char *sec, int slen, unsigned char *out1,
unsigned char *out2, int olen)
{
int len,i;
unsigned char *S1,*S2;
const unsigned char *S1,*S2;
len=slen/2;
S1=sec;
......@@ -150,6 +150,7 @@ static void tls1_generate_key_block(SSL *s, unsigned char *km,
int tls1_change_cipher_state(SSL *s, int which)
{
static const unsigned char empty[]="";
unsigned char *p,*key_block,*mac_secret;
unsigned char *exp_label,buf[TLS_MD_MAX_CONST_SIZE+
SSL3_RANDOM_SIZE*2];
......@@ -296,8 +297,8 @@ printf("which = %04X\nmac key=",which);
p+=SSL3_RANDOM_SIZE;
memcpy(p,s->s3->server_random,SSL3_RANDOM_SIZE);
p+=SSL3_RANDOM_SIZE;
tls1_PRF(s->ctx->md5,s->ctx->sha1,
buf,(int)(p-buf),"",0,iv1,iv2,k*2);
tls1_PRF(s->ctx->md5,s->ctx->sha1,buf,p-buf,empty,0,
iv1,iv2,k*2);
if (client_write)
iv=iv1;
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册