diff options
author | Nils Larsch <nils@openssl.org> | 2005-04-05 10:29:43 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2005-04-05 10:29:43 +0000 |
commit | 70f34a58411014e76dd03ed6ac0b1bdb95b53b16 (patch) | |
tree | f8c42b1de09721ac83f07abd04c44f05a43465d1 /crypto/evp | |
parent | c2e40d0f9a417bb5bb4d7c53ffb7d07229caffb8 (diff) |
some const fixes and cleanup
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/evp_pbe.c | 3 | ||||
-rw-r--r-- | crypto/evp/evp_pkey.c | 2 | ||||
-rw-r--r-- | crypto/evp/names.c | 8 |
3 files changed, 6 insertions, 7 deletions
diff --git a/crypto/evp/evp_pbe.c b/crypto/evp/evp_pbe.c index 91e545a141..c6affe2522 100644 --- a/crypto/evp/evp_pbe.c +++ b/crypto/evp/evp_pbe.c @@ -106,7 +106,8 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen, static int pbe_cmp(const char * const *a, const char * const *b) { - EVP_PBE_CTL **pbe1 = (EVP_PBE_CTL **) a, **pbe2 = (EVP_PBE_CTL **)b; + const EVP_PBE_CTL * const *pbe1 = (const EVP_PBE_CTL * const *) a, + * const *pbe2 = (const EVP_PBE_CTL * const *)b; return ((*pbe1)->pbe_nid - (*pbe2)->pbe_nid); } diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c index 7570a6eee6..7260460744 100644 --- a/crypto/evp/evp_pkey.c +++ b/crypto/evp/evp_pkey.c @@ -414,8 +414,6 @@ PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken) default: EVPerr(EVP_F_EVP_PKCS8_SET_BROKEN,EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE); return NULL; - break; - } } diff --git a/crypto/evp/names.c b/crypto/evp/names.c index eb9f4329cd..88c1e780dd 100644 --- a/crypto/evp/names.c +++ b/crypto/evp/names.c @@ -66,9 +66,9 @@ int EVP_add_cipher(const EVP_CIPHER *c) { int r; - r=OBJ_NAME_add(OBJ_nid2sn(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(char *)c); + r=OBJ_NAME_add(OBJ_nid2sn(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c); if (r == 0) return(0); - r=OBJ_NAME_add(OBJ_nid2ln(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(char *)c); + r=OBJ_NAME_add(OBJ_nid2ln(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c); return(r); } @@ -78,9 +78,9 @@ int EVP_add_digest(const EVP_MD *md) const char *name; name=OBJ_nid2sn(md->type); - r=OBJ_NAME_add(name,OBJ_NAME_TYPE_MD_METH,(char *)md); + r=OBJ_NAME_add(name,OBJ_NAME_TYPE_MD_METH,(const char *)md); if (r == 0) return(0); - r=OBJ_NAME_add(OBJ_nid2ln(md->type),OBJ_NAME_TYPE_MD_METH,(char *)md); + r=OBJ_NAME_add(OBJ_nid2ln(md->type),OBJ_NAME_TYPE_MD_METH,(const char *)md); if (r == 0) return(0); if (md->type != md->pkey_type) |