chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
done
@echo installing man 1
- @for i in doc/apps/*.pod; do (cd `dirname $$i`; fn=`basename $$i .pod`; sec=`[ "$$fn" = "config" ] && echo 5 || echo 1`; ../../util/pod2man.pl --section=$$sec --date=`date +%Y-%m-%d` --center=OpenSSL --release=$(VERSION) `basename $$i` > $(INSTALL_PREFIX)$(INSTALLTOP)/man/man$$sec/`basename $$i .pod`.$$sec); done
+ @for i in doc/apps/*.pod; do (cd `dirname $$i`; fn=`basename $$i .pod`; sec=`[ "$$fn" = "config" ] && echo 5 || echo 1`; ../../util/pod2man.pl --section=$$sec --center=OpenSSL --release=$(VERSION) `basename $$i` > $(INSTALL_PREFIX)$(INSTALLTOP)/man/man$$sec/`basename $$i .pod`.$$sec); done
@echo installing man 3
- @for i in doc/crypto/*.pod doc/ssl/*.pod; do (cd `dirname $$i`; ../../util/pod2man.pl --section=3 --date=`date +%Y-%m-%d` --center=OpenSSL --release=$(VERSION) `basename $$i` > $(INSTALL_PREFIX)$(INSTALLTOP)/man/man3/`basename $$i .pod`.3); done
+ @for i in doc/crypto/*.pod doc/ssl/*.pod; do (cd `dirname $$i`; ../../util/pod2man.pl --section=3 --center=OpenSSL --release=$(VERSION) `basename $$i` > $(INSTALL_PREFIX)$(INSTALLTOP)/man/man3/`basename $$i .pod`.3); done
# DO NOT DELETE THIS LINE -- make depend depends on it.
program_name(Argv[0],pname,PROG_NAME_SIZE);
f.name=pname;
- fp=(FUNCTION *)lh_retrieve(prog,(char *)&f);
+ fp=(FUNCTION *)lh_retrieve(prog,&f);
if (fp != NULL)
{
Argv[0]=pname;
if ((argc <= 0) || (argv[0] == NULL))
{ ret=0; goto end; }
f.name=argv[0];
- fp=(FUNCTION *)lh_retrieve(prog,(char *)&f);
+ fp=(FUNCTION *)lh_retrieve(prog,&f);
if (fp != NULL)
{
ret=fp->func(argc,argv);
if ((ret=lh_new(hash,cmp)) == NULL) return(NULL);
for (f=functions; f->name != NULL; f++)
- lh_insert(ret,(char *)f);
+ lh_insert(ret,f);
return(ret);
}
{
if (a == NULL) return;
ASN1_TYPE_component_free(a);
- Free((char *)(char *)a);
+ Free((char *)a);
}
int ASN1_TYPE_get(ASN1_TYPE *a)
{
ASN1_OBJECT_free(a->type);
}
- Free((char *)(char *)a);
+ Free((char *)a);
}
void PKCS7_content_free(PKCS7 *a)
if (x->enc_pkey != NULL) M_ASN1_OCTET_STRING_free(x->enc_pkey);
if (x->dec_pkey != NULL)EVP_PKEY_free(x->dec_pkey);
if ((x->key_data != NULL) && (x->key_free)) Free((char *)x->key_data);
- Free((char *)(char *)x);
+ Free((char *)x);
}
if (((i*DUMP_WIDTH)+j)>=len) {
strcat(buf," ");
} else {
- ch=((unsigned char)*((char *)(s)+i*DUMP_WIDTH+j)) & 0xff;
+ ch=((unsigned char)*(s+i*DUMP_WIDTH+j)) & 0xff;
sprintf(tmp,"%02x%c",ch,j==7?'-':' ');
strcat(buf,tmp);
}
for(j=0;j<DUMP_WIDTH;j++) {
if (((i*DUMP_WIDTH)+j)>=len)
break;
- ch=((unsigned char)*((char *)(s)+i*DUMP_WIDTH+j)) & 0xff;
+ ch=((unsigned char)*(s+i*DUMP_WIDTH+j)) & 0xff;
#ifndef CHARSET_EBCDIC
sprintf(tmp,"%c",((ch>=' ')&&(ch<='~'))?ch:'.');
#else
/* Note: under VMS with SOCKETSHR, it seems like the first
* parameter is 'char *', instead of 'const char *'
*/
- s=getservbyname((char *)str,"tcp");
+ s=getservbyname(
+#ifndef CONST_STRICT
+ (char *)
+#endif
+ str,"tcp");
if(s != NULL)
*port_ptr=ntohs((unsigned short)s->s_port);
CRYPTO_w_unlock(CRYPTO_LOCK_GETSERVBYNAME);
/* Note: under VMS with SOCKETSHR, it seems like the first
* parameter is 'char *', instead of 'const char *'
*/
- ret=gethostbyname((char *)name);
+ ret=gethostbyname(
+#ifndef CONST_STRICT
+ (char *)
+#endif
+ name);
if (ret == NULL)
goto end;
#include "cast_lcl.h"
#include <openssl/opensslv.h>
-char *CAST_version="CAST" OPENSSL_VERSION_PTEXT;
+const char *CAST_version="CAST" OPENSSL_VERSION_PTEXT;
void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
CAST_KEY *ks, int enc)
ERR_R_MALLOC_FAILURE);
goto err;
}
- vv=(CONF_VALUE *)lh_insert(ret,(char *)v);
+ vv=(CONF_VALUE *)lh_insert(ret,v);
if (vv != NULL)
{
sk_CONF_VALUE_delete_ptr(ts,vv);
{
vv.name=name;
vv.section=section;
- v=(CONF_VALUE *)lh_retrieve(conf,(char *)&vv);
+ v=(CONF_VALUE *)lh_retrieve(conf,&vv);
if (v != NULL) return(v->value);
if (strcmp(section,"ENV") == 0)
{
}
vv.section="default";
vv.name=name;
- v=(CONF_VALUE *)lh_retrieve(conf,(char *)&vv);
+ v=(CONF_VALUE *)lh_retrieve(conf,&vv);
if (v != NULL)
return(v->value);
else
if ((conf == NULL) || (section == NULL)) return(NULL);
vv.name=NULL;
vv.section=section;
- v=(CONF_VALUE *)lh_retrieve(conf,(char *)&vv);
+ v=(CONF_VALUE *)lh_retrieve(conf,&vv);
return(v);
}
conf->down_load=0; /* evil thing to make sure the 'Free()'
* works as expected */
- lh_doall_arg(conf,(void (*)())value_free_hash,(char *)conf);
+ lh_doall_arg(conf,(void (*)())value_free_hash,conf);
/* We now have only 'section' entries in the hash table.
* Due to problems with */
- lh_doall_arg(conf,(void (*)())value_free_stack,(char *)conf);
+ lh_doall_arg(conf,(void (*)())value_free_stack,conf);
lh_free(conf);
}
{
if (a->name != NULL)
{
- a=(CONF_VALUE *)lh_delete(conf,(char *)a);
+ a=(CONF_VALUE *)lh_delete(conf,a);
}
}
v->name=NULL;
v->value=(char *)sk;
- vv=(CONF_VALUE *)lh_insert(conf,(char *)v);
+ vv=(CONF_VALUE *)lh_insert(conf,v);
if (vv != NULL)
{
#if !defined(NO_STDIO) && !defined(WIN16)
void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *));
void CRYPTO_get_mem_debug_functions(void (**m)(),void (**r)(),void (**f)(),void (**so)(),long (**go)());
-void *CRYPTO_malloc_locked(int num, char *file, int line);
+void *CRYPTO_malloc_locked(int num, const char *file, int line);
void CRYPTO_free_locked(void *);
-void *CRYPTO_malloc(int num, char *file, int line);
+void *CRYPTO_malloc(int num, const char *file, int line);
void CRYPTO_free(void *);
-void *CRYPTO_realloc(void *addr,int num, char *file, int line);
-void *CRYPTO_remalloc(void *addr,int num, char *file, int line);
+void *CRYPTO_realloc(void *addr,int num, const char *file, int line);
+void *CRYPTO_remalloc(void *addr,int num, const char *file, int line);
void CRYPTO_set_mem_debug_options(long bits);
long CRYPTO_get_mem_debug_options();
}
else
{
- cp=(unsigned char*)buf;
+ cp=buf;
rnum=((len+7)/8*8); /* round up to nearest eight */
}
#endif
des_set_odd_parity(key);
des_set_key_unchecked(key,ks);
- des_cbc_cksum((unsigned char*)str,key,length,ks,key);
+ des_cbc_cksum((const unsigned char*)str,key,length,ks,key);
memset(ks,0,sizeof(ks));
des_set_odd_parity(key);
}
des_set_odd_parity(key1);
des_set_odd_parity(key2);
des_set_key_unchecked(key1,ks);
- des_cbc_cksum((unsigned char*)str,key1,length,ks,key1);
+ des_cbc_cksum((const unsigned char*)str,key1,length,ks,key1);
des_set_key_unchecked(key2,ks);
- des_cbc_cksum((unsigned char*)str,key2,length,ks,key2);
+ des_cbc_cksum((const unsigned char*)str,key2,length,ks,key2);
memset(ks,0,sizeof(ks));
des_set_odd_parity(key1);
des_set_odd_parity(key2);
while (str->error)
{
str->error|=ERR_PACK(lib,0,0);
- lh_insert(error_hash,(char *)str);
+ lh_insert(error_hash,str);
str++;
}
CRYPTO_w_unlock(CRYPTO_LOCK_ERR_HASH);
if (error_hash != NULL)
{
d.error=ERR_PACK(l,0,0);
- p=(ERR_STRING_DATA *)lh_retrieve(error_hash,(char *)&d);
+ p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d);
}
CRYPTO_r_unlock(CRYPTO_LOCK_ERR_HASH);
if (error_hash != NULL)
{
d.error=ERR_PACK(l,f,0);
- p=(ERR_STRING_DATA *)lh_retrieve(error_hash,(char *)&d);
+ p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d);
}
CRYPTO_r_unlock(CRYPTO_LOCK_ERR_HASH);
if (error_hash != NULL)
{
d.error=ERR_PACK(l,0,r);
- p=(ERR_STRING_DATA *)lh_retrieve(error_hash,(char *)&d);
+ p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d);
if (p == NULL)
{
d.error=ERR_PACK(0,0,r);
- p=(ERR_STRING_DATA *)lh_retrieve(error_hash,
- (char *)&d);
+ p=(ERR_STRING_DATA *)lh_retrieve(error_hash,&d);
}
}
pid=(unsigned long)CRYPTO_thread_id();
tmp.pid=pid;
CRYPTO_w_lock(CRYPTO_LOCK_ERR);
- p=(ERR_STATE *)lh_delete(thread_hash,(char *)&tmp);
+ p=(ERR_STATE *)lh_delete(thread_hash,&tmp);
CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
if (p != NULL) ERR_STATE_free(p);
else
{
tmp.pid=pid;
- ret=(ERR_STATE *)lh_retrieve(thread_hash,(char *)&tmp);
+ ret=(ERR_STATE *)lh_retrieve(thread_hash,&tmp);
CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
}
ret->err_data_flags[i]=0;
}
CRYPTO_w_lock(CRYPTO_LOCK_ERR);
- tmpp=(ERR_STATE *)lh_insert(thread_hash,(char *)ret);
+ tmpp=(ERR_STATE *)lh_insert(thread_hash,ret);
CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
if (tmpp != NULL) /* old entry - should not happen */
{
longswap(&(ctx->buf[ctx->buf_len]), md->digest->md_size);
ctx->buf_len+= md->digest->md_size;
- EVP_DigestUpdate(md, (unsigned char*)WELLKNOWN, strlen(WELLKNOWN));
+ EVP_DigestUpdate(md, WELLKNOWN, strlen(WELLKNOWN));
md->digest->final(&(ctx->buf[ctx->buf_len]), &(md->md.base[0]));
ctx->buf_len+= md->digest->md_size;
ctx->blockout= 1;
longswap(&(md->md.base[0]), md->digest->md_size);
ctx->buf_off+= md->digest->md_size;
- EVP_DigestUpdate(md, (unsigned char*)WELLKNOWN, strlen(WELLKNOWN));
+ EVP_DigestUpdate(md, WELLKNOWN, strlen(WELLKNOWN));
md->digest->final(tmp, &(md->md.base[0]));
ret= memcmp(&(ctx->buf[ctx->buf_off]), tmp, md->digest->md_size) == 0;
ctx->buf_off+= md->digest->md_size;
#define UP_LOAD (2*LH_LOAD_MULT) /* load times 256 (default 2) */
#define DOWN_LOAD (LH_LOAD_MULT) /* load times 256 (default 1) */
-
-#define P_CP char *
-#define P_CPP char *,char *
static void expand(LHASH *lh);
static void contract(LHASH *lh);
-static LHASH_NODE **getrn(LHASH *lh, char *data, unsigned long *rhash);
+static LHASH_NODE **getrn(LHASH *lh, void *data, unsigned long *rhash);
LHASH *lh_new(unsigned long (*h)(), int (*c)())
{
Free((char *)lh);
}
-char *lh_insert(LHASH *lh, char *data)
+void *lh_insert(LHASH *lh, void *data)
{
unsigned long hash;
LHASH_NODE *nn,**rn;
- char *ret;
+ void *ret;
lh->error=0;
if (lh->up_load <= (lh->num_items*LH_LOAD_MULT/lh->num_nodes))
return(ret);
}
-char *lh_delete(LHASH *lh, char *data)
+void *lh_delete(LHASH *lh, void *data)
{
unsigned long hash;
LHASH_NODE *nn,**rn;
- char *ret;
+ void *ret;
lh->error=0;
rn=getrn(lh,data,&hash);
return(ret);
}
-char *lh_retrieve(LHASH *lh, char *data)
+void *lh_retrieve(LHASH *lh, void *data)
{
unsigned long hash;
LHASH_NODE **rn;
- char *ret;
+ void *ret;
lh->error=0;
rn=getrn(lh,data,&hash);
lh_doall_arg(lh,func,NULL);
}
-void lh_doall_arg(LHASH *lh, void (*func)(), char *arg)
+void lh_doall_arg(LHASH *lh, void (*func)(), void *arg)
{
int i;
LHASH_NODE *a,*n;
if ((lh->p) >= lh->pmax)
{
j=(int)lh->num_alloc_nodes*2;
- n=(LHASH_NODE **)Realloc((char *)lh->b,
+ n=(LHASH_NODE **)Realloc(lh->b,
(unsigned int)sizeof(LHASH_NODE *)*j);
if (n == NULL)
{
lh->b[lh->p+lh->pmax-1]=NULL; /* 24/07-92 - eay - weird but :-( */
if (lh->p == 0)
{
- n=(LHASH_NODE **)Realloc((char *)lh->b,
+ n=(LHASH_NODE **)Realloc(lh->b,
(unsigned int)(sizeof(LHASH_NODE *)*lh->pmax));
if (n == NULL)
{
}
}
-static LHASH_NODE **getrn(LHASH *lh, char *data, unsigned long *rhash)
+static LHASH_NODE **getrn(LHASH *lh, void *data, unsigned long *rhash)
{
LHASH_NODE **ret,*n1;
unsigned long hash,nn;
}
/*
-static unsigned long lh_strhash(str)
-char *str;
+unsigned long lh_strhash(char *str)
{
int i,l;
unsigned long ret=0;
typedef struct lhash_node_st
{
- char *data;
+ void *data;
struct lhash_node_st *next;
#ifndef NO_HASH_COMP
unsigned long hash;
* in lh_insert(). */
#define lh_error(lh) ((lh)->error)
-LHASH *lh_new(unsigned long (*h)(), int (*c)());
+LHASH *lh_new(unsigned long (*h)(/* void *a */), int (*c)(/* void *a,void *b */));
void lh_free(LHASH *lh);
-char *lh_insert(LHASH *lh, char *data);
-char *lh_delete(LHASH *lh, char *data);
-char *lh_retrieve(LHASH *lh, char *data);
-void lh_doall(LHASH *lh, void (*func)(/* char *b */));
-void lh_doall_arg(LHASH *lh, void (*func)(/*char *a,char *b*/),char *arg);
+void *lh_insert(LHASH *lh, void *data);
+void *lh_delete(LHASH *lh, void *data);
+void *lh_retrieve(LHASH *lh, void *data);
+ void lh_doall(LHASH *lh, void (*func)(/*void *b*/));
+void lh_doall_arg(LHASH *lh, void (*func)(/*void *a,void *b*/),void *arg);
unsigned long lh_strhash(const char *c);
#ifndef NO_FP_API
#include "md5_locl.h"
#include <openssl/opensslv.h>
-char *MD5_version="MD5" OPENSSL_VERSION_PTEXT;
+const char *MD5_version="MD5" OPENSSL_VERSION_PTEXT;
/* Implemented from RFC1321 The MD5 Message-Digest Algorithm
*/
}
-void *CRYPTO_malloc_locked(int num, char *file, int line)
+void *CRYPTO_malloc_locked(int num, const char *file, int line)
{
char *ret = NULL;
free_debug_func(NULL, 1);
}
-void *CRYPTO_malloc(int num, char *file, int line)
+void *CRYPTO_malloc(int num, const char *file, int line)
{
char *ret = NULL;
return ret;
}
-void *CRYPTO_realloc(void *str, int num, char *file, int line)
+void *CRYPTO_realloc(void *str, int num, const char *file, int line)
{
char *ret = NULL;
free_debug_func(NULL, 1);
}
-void *CRYPTO_remalloc(void *a, int num, char *file, int line)
+void *CRYPTO_remalloc(void *a, int num, const char *file, int line)
{
if (a != NULL) Free(a);
a=(char *)Malloc(num);
if (amih != NULL)
{
tmp.thread=CRYPTO_thread_id();
- if ((ret=(APP_INFO *)lh_delete(amih,(char *)&tmp)) != NULL)
+ if ((ret=(APP_INFO *)lh_delete(amih,&tmp)) != NULL)
{
APP_INFO *next=ret->next;
for (;;)
{
- ret=(OBJ_NAME *)lh_retrieve(names_lh,(char *)&on);
+ ret=(OBJ_NAME *)lh_retrieve(names_lh,&on);
if (ret == NULL) return(NULL);
if ((ret->alias) && !alias)
{
onp->type=type;
onp->data=data;
- ret=(OBJ_NAME *)lh_insert(names_lh,(char *)onp);
+ ret=(OBJ_NAME *)lh_insert(names_lh,onp);
if (ret != NULL)
{
/* free things */
type&= ~OBJ_NAME_ALIAS;
on.name=name;
on.type=type;
- ret=(OBJ_NAME *)lh_delete(names_lh,(char *)&on);
+ ret=(OBJ_NAME *)lh_delete(names_lh,&on);
if (ret != NULL)
{
/* free things */
{
ao[i]->type=i;
ao[i]->obj=o;
- aop=(ADDED_OBJ *)lh_insert(added,(char *)ao[i]);
+ aop=(ADDED_OBJ *)lh_insert(added,ao[i]);
/* memory leak, buit should not normally matter */
if (aop != NULL)
Free(aop);
ad.type=ADDED_NID;
ad.obj= &ob;
ob.nid=n;
- adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad);
+ adp=(ADDED_OBJ *)lh_retrieve(added,&ad);
if (adp != NULL)
return(adp->obj);
else
ad.type=ADDED_NID;
ad.obj= &ob;
ob.nid=n;
- adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad);
+ adp=(ADDED_OBJ *)lh_retrieve(added,&ad);
if (adp != NULL)
return(adp->obj->sn);
else
ad.type=ADDED_NID;
ad.obj= &ob;
ob.nid=n;
- adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad);
+ adp=(ADDED_OBJ *)lh_retrieve(added,&ad);
if (adp != NULL)
return(adp->obj->ln);
else
{
ad.type=ADDED_DATA;
ad.obj=a;
- adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad);
+ adp=(ADDED_OBJ *)lh_retrieve(added,&ad);
if (adp != NULL) return (adp->obj->nid);
}
op=(ASN1_OBJECT **)OBJ_bsearch((char *)&a,(char *)obj_objs,NUM_OBJ,
{
ad.type=ADDED_LNAME;
ad.obj= &o;
- adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad);
+ adp=(ADDED_OBJ *)lh_retrieve(added,&ad);
if (adp != NULL) return (adp->obj->nid);
}
op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)ln_objs,NUM_LN,
{
ad.type=ADDED_SNAME;
ad.obj= &o;
- adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad);
+ adp=(ADDED_OBJ *)lh_retrieve(added,&ad);
if (adp != NULL) return (adp->obj->nid);
}
op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)sn_objs,NUM_SN,
void RAND_add(const void *buf,int num,int entropy);
int RAND_load_file(const char *file,long max_bytes);
int RAND_write_file(const char *file);
-char *RAND_file_name(char *file,int num);
+const char *RAND_file_name(char *file,int num);
#ifdef WINDOWS
void RAND_screen(void);
#endif
return(err ? -1 : ret);
}
-char *RAND_file_name(char *buf, int size)
+const char *RAND_file_name(char *buf, int size)
{
char *s;
char *ret=NULL;
#include "rmd_locl.h"
#include <openssl/opensslv.h>
-char *RMD160_version="RIPE-MD160" OPENSSL_VERSION_PTEXT;
+const char *RMD160_version="RIPE-MD160" OPENSSL_VERSION_PTEXT;
# ifdef RMD160_ASM
void ripemd160_block_x86(RIPEMD160_CTX *c, unsigned long *p,int num);
#include <openssl/opensslv.h>
-char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT;
+const char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT;
/* The implementation is in ../md32_common.h */
#include <openssl/opensslv.h>
-char *SHA_version="SHA" OPENSSL_VERSION_PTEXT;
+const char *SHA_version="SHA" OPENSSL_VERSION_PTEXT;
/* The implementation is in ../md32_common.h */
db->error=DB_ERROR_NO_INDEX;
return(NULL);
}
- ret=(char **)lh_retrieve(lh,(char *)value);
+ ret=(char **)lh_retrieve(lh,value);
db->error=DB_ERROR_OK;
return(ret);
}
{
if ((db->qual[i] != NULL) &&
(db->qual[i](row) == 0)) continue;
- r=(char **)lh_retrieve(db->index[i],(char *)row);
+ r=(char **)lh_retrieve(db->index[i],row);
if (r != NULL)
{
db->error=DB_ERROR_INDEX_CLASH;
{
if ((db->qual[i] != NULL) &&
(db->qual[i](row) == 0)) continue;
- lh_insert(db->index[i],(char *)row);
+ lh_insert(db->index[i],row);
}
}
return(1);
/* we have added it to the cache so now pull
* it out again */
CRYPTO_r_lock(CRYPTO_LOCK_X509_STORE);
- tmp=(X509_OBJECT *)lh_retrieve(xl->store_ctx->certs,
- (char *)&stmp);
+ tmp=(X509_OBJECT *)lh_retrieve(xl->store_ctx->certs,&stmp);
CRYPTO_r_unlock(CRYPTO_LOCK_X509_STORE);
if (tmp != NULL)
abort();
}
- tmp=(X509_OBJECT *)lh_retrieve(h,(char *)&stmp);
+ tmp=(X509_OBJECT *)lh_retrieve(h,&stmp);
return(tmp);
}
X509_OBJECT_up_ref_count(obj);
- r=(X509_OBJECT *)lh_insert(ctx->certs,(char *)obj);
+ r=(X509_OBJECT *)lh_insert(ctx->certs,obj);
if (r != NULL)
{ /* oops, put it back */
- lh_delete(ctx->certs,(char *)obj);
+ lh_delete(ctx->certs,obj);
X509_OBJECT_free_contents(obj);
Free(obj);
- lh_insert(ctx->certs,(char *)r);
+ lh_insert(ctx->certs,r);
X509err(X509_F_X509_STORE_ADD_CERT,X509_R_CERT_ALREADY_IN_HASH_TABLE);
ret=0;
}
X509_OBJECT_up_ref_count(obj);
- r=(X509_OBJECT *)lh_insert(ctx->certs,(char *)obj);
+ r=(X509_OBJECT *)lh_insert(ctx->certs,obj);
if (r != NULL)
{ /* oops, put it back */
- lh_delete(ctx->certs,(char *)obj);
+ lh_delete(ctx->certs,obj);
X509_OBJECT_free_contents(obj);
Free(obj);
- lh_insert(ctx->certs,(char *)r);
+ lh_insert(ctx->certs,r);
X509err(X509_F_X509_STORE_ADD_CRL,X509_R_CERT_ALREADY_IN_HASH_TABLE);
ret=0;
}
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);
-char *SSL23_version_str="SSLv2/3 compatibility" OPENSSL_VERSION_PTEXT;
+const char *SSL23_version_str="SSLv2/3 compatibility" OPENSSL_VERSION_PTEXT;
static SSL_METHOD SSLv23_data= {
TLS1_VERSION,
unsigned int u;
#endif
#ifndef NO_DH
- DH *dh,*dhp;
+ DH *dh=NULL,*dhp;
#endif
EVP_PKEY *pkey;
unsigned char *p,*d;
long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, char *parg);
int SSL_get_error(SSL *s,int ret_code);
-char * SSL_get_version(SSL *s);
+const char *SSL_get_version(SSL *s);
/* This sets the 'default' SSL version that SSL_new() will create */
int SSL_CTX_set_ssl_version(SSL_CTX *ctx,SSL_METHOD *meth);
#include <openssl/x509v3.h>
#include "ssl_locl.h"
-char *SSL_version_str=OPENSSL_VERSION_TEXT;
+const char *SSL_version_str=OPENSSL_VERSION_TEXT;
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_meth=NULL;
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_ctx_meth=NULL;
return(NULL);
}
-char *SSL_get_version(SSL *s)
+const char *SSL_get_version(SSL *s)
{
if (s->version == TLS1_VERSION)
return("TLSv1");
RAND_pseudo_bytes(ss->session_id,ss->session_id_length);
CRYPTO_r_lock(CRYPTO_LOCK_SSL_CTX);
- r=(SSL_SESSION *)lh_retrieve(s->ctx->sessions,
- (char *)ss);
+ r=(SSL_SESSION *)lh_retrieve(s->ctx->sessions, ss);
CRYPTO_r_unlock(CRYPTO_LOCK_SSL_CTX);
if (r == NULL) break;
/* else - woops a session_id match */
if (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_NO_INTERNAL_LOOKUP))
{
CRYPTO_r_lock(CRYPTO_LOCK_SSL_CTX);
- ret=(SSL_SESSION *)lh_retrieve(s->ctx->sessions,(char *)&data);
+ ret=(SSL_SESSION *)lh_retrieve(s->ctx->sessions,&data);
if (ret != NULL)
/* don't allow other threads to steal it: */
CRYPTO_add(&ret->references,1,CRYPTO_LOCK_SSL_SESSION);
/* if session c is in already in cache, we take back the increment later */
CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
- s=(SSL_SESSION *)lh_insert(ctx->sessions,(char *)c);
+ s=(SSL_SESSION *)lh_insert(ctx->sessions,c);
/* s != NULL iff we already had a session with the given PID.
* In this case, s == c should hold (then we did not really modify
if ((c != NULL) && (c->session_id_length != 0))
{
if(lck) CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
- r=(SSL_SESSION *)lh_delete(ctx->sessions,(char *)c);
+ r=(SSL_SESSION *)lh_delete(ctx->sessions,c);
if (r != NULL)
{
ret=1;
{
/* The reason we don't call SSL_CTX_remove_session() is to
* save on locking overhead */
- lh_delete(p->cache,(char *)s);
+ lh_delete(p->cache,s);
SSL_SESSION_list_remove(p->ctx,s);
s->not_resumable=1;
if (p->ctx->remove_session_cb != NULL)
CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
i=tp.cache->down_load;
tp.cache->down_load=0;
- lh_doall_arg(tp.cache,(void (*)())timeout,(char *)&tp);
+ lh_doall_arg(tp.cache,(void (*)())timeout,&tp);
tp.cache->down_load=i;
CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);
}
#include <openssl/objects.h>
#include "ssl_locl.h"
-char *tls1_version_str="TLSv1" OPENSSL_VERSION_PTEXT;
+const char *tls1_version_str="TLSv1" OPENSSL_VERSION_PTEXT;
static long tls1_default_timeout(void);