Add missing prototype. Fix various warnings (C++ comments, ; outside function).
This commit is contained in:
parent
c80c7bf999
commit
44181ea836
@ -336,6 +336,7 @@ void ENGINE_load_ubsec(void);
|
|||||||
#endif
|
#endif
|
||||||
void ENGINE_load_cryptodev(void);
|
void ENGINE_load_cryptodev(void);
|
||||||
void ENGINE_load_padlock(void);
|
void ENGINE_load_padlock(void);
|
||||||
|
void ENGINE_load_gost(void);
|
||||||
void ENGINE_load_builtin_engines(void);
|
void ENGINE_load_builtin_engines(void);
|
||||||
|
|
||||||
/* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation
|
/* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation
|
||||||
|
@ -37,19 +37,19 @@ ASN1_NDEF_SEQUENCE(GOST_KEY_PARAMS) = {
|
|||||||
ASN1_SIMPLE(GOST_KEY_PARAMS, key_params, ASN1_OBJECT),
|
ASN1_SIMPLE(GOST_KEY_PARAMS, key_params, ASN1_OBJECT),
|
||||||
ASN1_SIMPLE(GOST_KEY_PARAMS, hash_params, ASN1_OBJECT),
|
ASN1_SIMPLE(GOST_KEY_PARAMS, hash_params, ASN1_OBJECT),
|
||||||
ASN1_OPT(GOST_KEY_PARAMS, cipher_params, ASN1_OBJECT),
|
ASN1_OPT(GOST_KEY_PARAMS, cipher_params, ASN1_OBJECT),
|
||||||
} ASN1_NDEF_SEQUENCE_END(GOST_KEY_PARAMS);
|
} ASN1_NDEF_SEQUENCE_END(GOST_KEY_PARAMS)
|
||||||
|
|
||||||
IMPLEMENT_ASN1_FUNCTIONS(GOST_KEY_PARAMS)
|
IMPLEMENT_ASN1_FUNCTIONS(GOST_KEY_PARAMS)
|
||||||
|
|
||||||
ASN1_NDEF_SEQUENCE(GOST_CIPHER_PARAMS) = {
|
ASN1_NDEF_SEQUENCE(GOST_CIPHER_PARAMS) = {
|
||||||
ASN1_SIMPLE(GOST_CIPHER_PARAMS, iv, ASN1_OCTET_STRING),
|
ASN1_SIMPLE(GOST_CIPHER_PARAMS, iv, ASN1_OCTET_STRING),
|
||||||
ASN1_SIMPLE(GOST_CIPHER_PARAMS, enc_param_set, ASN1_OBJECT),
|
ASN1_SIMPLE(GOST_CIPHER_PARAMS, enc_param_set, ASN1_OBJECT),
|
||||||
} ASN1_NDEF_SEQUENCE_END(GOST_CIPHER_PARAMS);
|
} ASN1_NDEF_SEQUENCE_END(GOST_CIPHER_PARAMS)
|
||||||
|
|
||||||
IMPLEMENT_ASN1_FUNCTIONS(GOST_CIPHER_PARAMS);
|
IMPLEMENT_ASN1_FUNCTIONS(GOST_CIPHER_PARAMS)
|
||||||
|
|
||||||
ASN1_NDEF_SEQUENCE(GOST_CLIENT_KEY_EXCHANGE_PARAMS) = { //FIXME incomplete
|
ASN1_NDEF_SEQUENCE(GOST_CLIENT_KEY_EXCHANGE_PARAMS) = { /*FIXME incomplete*/
|
||||||
ASN1_SIMPLE(GOST_CLIENT_KEY_EXCHANGE_PARAMS, gkt, GOST_KEY_TRANSPORT)
|
ASN1_SIMPLE(GOST_CLIENT_KEY_EXCHANGE_PARAMS, gkt, GOST_KEY_TRANSPORT)
|
||||||
} ASN1_NDEF_SEQUENCE_END(GOST_CLIENT_KEY_EXCHANGE_PARAMS);
|
} ASN1_NDEF_SEQUENCE_END(GOST_CLIENT_KEY_EXCHANGE_PARAMS)
|
||||||
|
|
||||||
IMPLEMENT_ASN1_FUNCTIONS(GOST_CLIENT_KEY_EXCHANGE_PARAMS);
|
IMPLEMENT_ASN1_FUNCTIONS(GOST_CLIENT_KEY_EXCHANGE_PARAMS)
|
||||||
|
@ -23,9 +23,11 @@ static int gost_cipher_init_cpa(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
|||||||
/* Handles block of data in CFB mode */
|
/* Handles block of data in CFB mode */
|
||||||
static int gost_cipher_do_cfb(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
static int gost_cipher_do_cfb(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||||
const unsigned char *in, unsigned int inl);
|
const unsigned char *in, unsigned int inl);
|
||||||
|
#if 0
|
||||||
/* Handles block of data in CNT mode */
|
/* Handles block of data in CNT mode */
|
||||||
static int gost_cipher_do_cnt(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
static int gost_cipher_do_cnt(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||||
const unsigned char *in, unsigned int inl);
|
const unsigned char *in, unsigned int inl);
|
||||||
|
#endif
|
||||||
/* Cleanup function */
|
/* Cleanup function */
|
||||||
static int gost_cipher_cleanup(EVP_CIPHER_CTX *);
|
static int gost_cipher_cleanup(EVP_CIPHER_CTX *);
|
||||||
/* set/get cipher parameters */
|
/* set/get cipher parameters */
|
||||||
|
@ -145,16 +145,16 @@ static int bind_gost (ENGINE *e,const char *id)
|
|||||||
extern __declspec( dllexport )
|
extern __declspec( dllexport )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
/*#ifndef OPENSSL_NO_DYNAMIC_ENGINE*/
|
||||||
IMPLEMENT_DYNAMIC_BIND_FN(bind_gost);
|
IMPLEMENT_DYNAMIC_BIND_FN(bind_gost)
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
extern __declspec( dllexport )
|
extern __declspec( dllexport )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CHECK_FN();
|
IMPLEMENT_DYNAMIC_CHECK_FN()
|
||||||
//#else
|
/*#else*/
|
||||||
//#endif /* OPENSSL_NO_DYNAMIC_ENGINE */
|
/*#endif OPENSSL_NO_DYNAMIC_ENGINE */
|
||||||
|
|
||||||
static int gost_digests(ENGINE *e, const EVP_MD **digest,
|
static int gost_digests(ENGINE *e, const EVP_MD **digest,
|
||||||
const int **nids, int nid)
|
const int **nids, int nid)
|
||||||
@ -165,7 +165,7 @@ static int gost_digests(ENGINE *e, const EVP_MD **digest,
|
|||||||
*nids = gost_digest_nids;
|
*nids = gost_digest_nids;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
//printf("Digest no %d requested\n",nid);
|
/*printf("Digest no %d requested\n",nid);*/
|
||||||
if(nid == NID_id_GostR3411_94)
|
if(nid == NID_id_GostR3411_94)
|
||||||
{
|
{
|
||||||
*digest = &digest_gost;
|
*digest = &digest_gost;
|
||||||
|
@ -68,7 +68,7 @@ typedef struct {
|
|||||||
|
|
||||||
DECLARE_ASN1_FUNCTIONS(GOST_KEY_TRANSPORT)
|
DECLARE_ASN1_FUNCTIONS(GOST_KEY_TRANSPORT)
|
||||||
|
|
||||||
typedef struct { //FIXME incomplete
|
typedef struct { /* FIXME incomplete */
|
||||||
GOST_KEY_TRANSPORT *gkt;
|
GOST_KEY_TRANSPORT *gkt;
|
||||||
} GOST_CLIENT_KEY_EXCHANGE_PARAMS;
|
} GOST_CLIENT_KEY_EXCHANGE_PARAMS;
|
||||||
|
|
||||||
|
@ -555,14 +555,14 @@ int register_pmeth_gost(int id, EVP_PKEY_METHOD **pmeth,int flags)
|
|||||||
pkey_gost_encrypt_init, pkey_GOST01cp_encrypt);
|
pkey_gost_encrypt_init, pkey_GOST01cp_encrypt);
|
||||||
EVP_PKEY_meth_set_decrypt(*pmeth, NULL, pkey_GOST01cp_decrypt);
|
EVP_PKEY_meth_set_decrypt(*pmeth, NULL, pkey_GOST01cp_decrypt);
|
||||||
break;
|
break;
|
||||||
default: //Unsupported method
|
default: /*Unsupported method*/
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EVP_PKEY_meth_set_init(*pmeth, pkey_gost_init);
|
EVP_PKEY_meth_set_init(*pmeth, pkey_gost_init);
|
||||||
EVP_PKEY_meth_set_cleanup(*pmeth, pkey_gost_cleanup);
|
EVP_PKEY_meth_set_cleanup(*pmeth, pkey_gost_cleanup);
|
||||||
|
|
||||||
EVP_PKEY_meth_set_copy(*pmeth, pkey_gost_copy);
|
EVP_PKEY_meth_set_copy(*pmeth, pkey_gost_copy);
|
||||||
//FIXME derive etc...
|
/*FIXME derive etc...*/
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user