summaryrefslogtreecommitdiffstats
path: root/engines
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2006-11-08 09:45:12 +0000
committerBen Laurie <ben@openssl.org>2006-11-08 09:45:12 +0000
commit84948b39dfada6628ab65743fad64cf4714a0a92 (patch)
tree992002bc6bd29c3cac8678c22a4e7551001a3e07 /engines
parentcf32ad7fe3410316568ae74c5275574cd5222179 (diff)
Fix various warnings.
Diffstat (limited to 'engines')
-rw-r--r--engines/ccgost/gost2001_keyx.c1
-rw-r--r--engines/ccgost/gost2001_keyx.h10
-rw-r--r--engines/ccgost/gost89.c2
-rw-r--r--engines/ccgost/gost_ameth.c4
-rw-r--r--engines/ccgost/gost_crypt.c14
-rw-r--r--engines/ccgost/gost_eng.c2
6 files changed, 27 insertions, 6 deletions
diff --git a/engines/ccgost/gost2001_keyx.c b/engines/ccgost/gost2001_keyx.c
index 7b81c23f92..1929dbdc68 100644
--- a/engines/ccgost/gost2001_keyx.c
+++ b/engines/ccgost/gost2001_keyx.c
@@ -16,6 +16,7 @@
#include "e_gost_err.h"
#include "gost_keywrap.h"
#include "gost_lcl.h"
+#include "gost2001_keyx.h"
/* Transform ECDH shared key into little endian as required by Cryptocom
* key exchange */
diff --git a/engines/ccgost/gost2001_keyx.h b/engines/ccgost/gost2001_keyx.h
new file mode 100644
index 0000000000..a014d9c1e2
--- /dev/null
+++ b/engines/ccgost/gost2001_keyx.h
@@ -0,0 +1,10 @@
+GOST_KEY_TRANSPORT *
+make_rfc4490_keytransport_2001(EVP_PKEY *pubk, BIGNUM *eph_key,
+ const unsigned char *key, size_t keylen,
+ unsigned char *ukm, size_t ukm_len);
+
+int decrypt_rfc4490_shared_key_2001(EVP_PKEY *priv,
+ GOST_KEY_TRANSPORT *gkt,
+ unsigned char *key_buf,
+ int key_buf_len) ;
+
diff --git a/engines/ccgost/gost89.c b/engines/ccgost/gost89.c
index 7439c3e34a..c44143dca7 100644
--- a/engines/ccgost/gost89.c
+++ b/engines/ccgost/gost89.c
@@ -114,7 +114,7 @@ const byte CryptoProKeyMeshingKey[]={
0xC0, 0x86, 0xDC, 0xC2, 0xEF, 0x4C, 0xA9, 0x2B
};
/* Initialization of gost_ctx subst blocks*/
-void kboxinit(gost_ctx *c, const gost_subst_block *b)
+static void kboxinit(gost_ctx *c, const gost_subst_block *b)
{
int i;
diff --git a/engines/ccgost/gost_ameth.c b/engines/ccgost/gost_ameth.c
index 4885ca4787..06f8c1e19a 100644
--- a/engines/ccgost/gost_ameth.c
+++ b/engines/ccgost/gost_ameth.c
@@ -98,11 +98,13 @@ static int decode_gost_algor_params(EVP_PKEY *pkey, X509_ALGOR *palg)
ASN1_OBJECT *palg_obj =NULL;
int ptype = V_ASN1_UNDEF;
int pkey_nid = NID_undef,param_nid = NID_undef;
+ void *_pval;
ASN1_STRING *pval = NULL;
const unsigned char *p;
GOST_KEY_PARAMS *gkp = NULL;
- X509_ALGOR_get0(&palg_obj, &ptype, (void **) (&pval), palg);
+ X509_ALGOR_get0(&palg_obj, &ptype, &_pval, palg);
+ pval = _pval;
if (ptype != V_ASN1_SEQUENCE)
{
GOSTerr(GOST_F_DECODE_GOST_ALGOR_PARAMS,
diff --git a/engines/ccgost/gost_crypt.c b/engines/ccgost/gost_crypt.c
index 4d0442ed2b..7a8e8fddcd 100644
--- a/engines/ccgost/gost_crypt.c
+++ b/engines/ccgost/gost_crypt.c
@@ -197,7 +197,7 @@ const struct gost_cipher_info *get_encryption_params(ASN1_OBJECT *obj)
}
/* Sets cipher param from paramset NID. */
-int gost_cipher_set_param(struct ossl_gost_cipher_ctx *c,int nid)
+static int gost_cipher_set_param(struct ossl_gost_cipher_ctx *c,int nid)
{
const struct gost_cipher_info *param;
param=get_encryption_params((nid==NID_undef?NULL:OBJ_nid2obj(nid)));
@@ -226,8 +226,9 @@ static int gost_cipher_init_param(EVP_CIPHER_CTX *ctx, const unsigned char *key,
return 1;
}
+#ifdef USE_SSL
/* Initializes EVP_CIPHER_CTX with fixed cryptopro A paramset */
-int gost_cipher_init_cpa(EVP_CIPHER_CTX *ctx, const unsigned char *key,
+static int gost_cipher_init_cpa(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
struct ossl_gost_cipher_ctx *c=ctx->cipher_data;
@@ -241,7 +242,7 @@ int gost_cipher_init_cpa(EVP_CIPHER_CTX *ctx, const unsigned char *key,
}
/* Initializes EVP_CIPHER_CTX with fixed vizir paramset */
-int gost_cipher_init_vizir(EVP_CIPHER_CTX *ctx, const unsigned char *key,
+static int gost_cipher_init_vizir(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
struct ossl_gost_cipher_ctx *c=ctx->cipher_data;
@@ -254,6 +255,7 @@ int gost_cipher_init_vizir(EVP_CIPHER_CTX *ctx, const unsigned char *key,
memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx));
return 1;
}
+#endif /* def USE_SSL */
/* Initializes EVP_CIPHER_CTX with default values */
int gost_cipher_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
@@ -275,6 +277,7 @@ static void gost_crypt_mesh (void *ctx,unsigned char *iv,unsigned char *buf)
c->count+=8;
}
+#ifdef USE_SSL
static void gost_cnt_next (void *ctx, unsigned char *iv, unsigned char *buf)
{
struct ossl_gost_cipher_ctx *c = ctx;
@@ -305,6 +308,7 @@ static void gost_cnt_next (void *ctx, unsigned char *iv, unsigned char *buf)
gostcrypt(&(c->cctx),buf1,buf);
c->count +=8;
}
+#endif /* def USE_SSL */
/* GOST encryption in CFB mode */
int gost_cipher_do_cfb(EVP_CIPHER_CTX *ctx, unsigned char *out,
@@ -369,7 +373,8 @@ int gost_cipher_do_cfb(EVP_CIPHER_CTX *ctx, unsigned char *out,
return 1;
}
-int gost_cipher_do_cnt(EVP_CIPHER_CTX *ctx, unsigned char *out,
+#if USE_SSL
+static int gost_cipher_do_cnt(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
const unsigned char *in_ptr=in;
@@ -422,6 +427,7 @@ int gost_cipher_do_cnt(EVP_CIPHER_CTX *ctx, unsigned char *out,
}
return 1;
}
+#endif /* def USE_SSL */
/* Cleaning up of EVP_CIPHER_CTX */
int gost_cipher_cleanup(EVP_CIPHER_CTX *ctx)
diff --git a/engines/ccgost/gost_eng.c b/engines/ccgost/gost_eng.c
index df5d787c2e..68bf485bc9 100644
--- a/engines/ccgost/gost_eng.c
+++ b/engines/ccgost/gost_eng.c
@@ -141,8 +141,10 @@ static int bind_gost (ENGINE *e,const char *id)
return ret;
}
+#ifdef ENGINE_DYNAMIC_SUPPORT
IMPLEMENT_DYNAMIC_BIND_FN(bind_gost)
IMPLEMENT_DYNAMIC_CHECK_FN()
+#endif /* def ENGINE_DYNAMIC_SUPPORT */
static int gost_digests(ENGINE *e, const EVP_MD **digest,
const int **nids, int nid)