* The following lines are auto generated by the script mkerr.pl. Any changes
* made after this point may be overwritten when the script is next run.
*/
-void ERR_load_GOST_strings(void);
-void ERR_unload_GOST_strings(void);
-void ERR_GOST_error(int function, int reason, char *file, int line);
+ void ERR_load_GOST_strings(void);
+ void ERR_unload_GOST_strings(void);
+ void ERR_GOST_error(int function, int reason, char *file, int line);
# define GOSTerr(f,r) ERR_GOST_error((f),(r),__FILE__,__LINE__)
/* Error codes for the GOST functions. */
# define GOST_R_UNSUPPORTED_CIPHER_CTL_COMMAND 126
# define GOST_R_UNSUPPORTED_PARAMETER_SET 127
-#ifdef __cplusplus
+# ifdef __cplusplus
}
-#endif
+# endif
#endif
ASN1_SIMPLE(GOST_KEY_INFO, encrypted_key, ASN1_OCTET_STRING),
ASN1_SIMPLE(GOST_KEY_INFO, imit, ASN1_OCTET_STRING)
} ASN1_NDEF_SEQUENCE_END(GOST_KEY_INFO)
- IMPLEMENT_ASN1_FUNCTIONS(GOST_KEY_INFO)
- ASN1_NDEF_SEQUENCE(GOST_KEY_AGREEMENT_INFO) =
+IMPLEMENT_ASN1_FUNCTIONS(GOST_KEY_INFO)
+ASN1_NDEF_SEQUENCE(GOST_KEY_AGREEMENT_INFO) =
{
ASN1_SIMPLE(GOST_KEY_AGREEMENT_INFO, cipher, ASN1_OBJECT),
ASN1_IMP_OPT(GOST_KEY_AGREEMENT_INFO, ephem_key, X509_PUBKEY, 0),
ASN1_SIMPLE(GOST_KEY_AGREEMENT_INFO, eph_iv, ASN1_OCTET_STRING)
} ASN1_NDEF_SEQUENCE_END(GOST_KEY_AGREEMENT_INFO)
- IMPLEMENT_ASN1_FUNCTIONS(GOST_KEY_AGREEMENT_INFO)
- ASN1_NDEF_SEQUENCE(GOST_KEY_PARAMS) =
+IMPLEMENT_ASN1_FUNCTIONS(GOST_KEY_AGREEMENT_INFO)
+ASN1_NDEF_SEQUENCE(GOST_KEY_PARAMS) =
{
ASN1_SIMPLE(GOST_KEY_PARAMS, key_params, ASN1_OBJECT),
ASN1_SIMPLE(GOST_KEY_PARAMS, hash_params, ASN1_OBJECT),
ASN1_OPT(GOST_KEY_PARAMS, cipher_params,
ASN1_OBJECT),} ASN1_NDEF_SEQUENCE_END(GOST_KEY_PARAMS)
- IMPLEMENT_ASN1_FUNCTIONS(GOST_KEY_PARAMS)
- ASN1_NDEF_SEQUENCE(GOST_CIPHER_PARAMS) =
+IMPLEMENT_ASN1_FUNCTIONS(GOST_KEY_PARAMS)
+ASN1_NDEF_SEQUENCE(GOST_CIPHER_PARAMS) =
{
ASN1_SIMPLE(GOST_CIPHER_PARAMS, iv, ASN1_OCTET_STRING),
ASN1_SIMPLE(GOST_CIPHER_PARAMS, enc_param_set,
ASN1_OBJECT),}
ASN1_NDEF_SEQUENCE_END(GOST_CIPHER_PARAMS)
- IMPLEMENT_ASN1_FUNCTIONS(GOST_CIPHER_PARAMS)
- ASN1_NDEF_SEQUENCE(GOST_CLIENT_KEY_EXCHANGE_PARAMS) =
+IMPLEMENT_ASN1_FUNCTIONS(GOST_CIPHER_PARAMS)
+ASN1_NDEF_SEQUENCE(GOST_CLIENT_KEY_EXCHANGE_PARAMS) =
{ /* FIXME incomplete */
ASN1_SIMPLE(GOST_CLIENT_KEY_EXCHANGE_PARAMS, gkt, GOST_KEY_TRANSPORT)
} ASN1_NDEF_SEQUENCE_END(GOST_CLIENT_KEY_EXCHANGE_PARAMS)
ASN1_SIMPLE(MASKED_GOST_KEY, masked_priv_key, ASN1_OCTET_STRING),
ASN1_SIMPLE(MASKED_GOST_KEY, public_key, ASN1_OCTET_STRING)
} ASN1_NDEF_SEQUENCE_END(MASKED_GOST_KEY)
- IMPLEMENT_ASN1_FUNCTIONS(MASKED_GOST_KEY)
+IMPLEMENT_ASN1_FUNCTIONS(MASKED_GOST_KEY)
/* Find encryption params from ASN1_OBJECT */
const struct gost_cipher_info *get_encryption_params(ASN1_OBJECT *obj);
/* Implementation of GOST 28147-89 cipher in CFB and CNT modes */
-const EVP_CIPHER* cipher_gost();
-const EVP_CIPHER* cipher_gost_cbc();
-const EVP_CIPHER* cipher_gost_cpacnt();
-const EVP_CIPHER* cipher_gost_cpcnt_12();
+const EVP_CIPHER *cipher_gost();
+const EVP_CIPHER *cipher_gost_cbc();
+const EVP_CIPHER *cipher_gost_cpacnt();
+const EVP_CIPHER *cipher_gost_cpcnt_12();
void cipher_gost_destroy();
# define EVP_MD_CTRL_KEY_LEN (EVP_MD_CTRL_ALG_CTRL+3)
# define EVP_MD_CTRL_SET_KEY (EVP_MD_CTRL_ALG_CTRL+4)
|| !EVP_MD_meth_set_result_size(md, 32)
|| !EVP_MD_meth_set_input_blocksize(md, 32)
|| !EVP_MD_meth_set_app_datasize(md,
- sizeof(struct ossl_gost_digest_ctx))
+ sizeof(struct
+ ossl_gost_digest_ctx))
|| !EVP_MD_meth_set_init(md, gost_digest_init)
|| !EVP_MD_meth_set_update(md, gost_digest_update)
|| !EVP_MD_meth_set_final(md, gost_digest_final)
int gost_digest_cleanup(EVP_MD_CTX *ctx)
{
if (EVP_MD_CTX_md_data(ctx))
- memset(EVP_MD_CTX_md_data(ctx), 0, sizeof(struct ossl_gost_digest_ctx));
+ memset(EVP_MD_CTX_md_data(ctx), 0,
+ sizeof(struct ossl_gost_digest_ctx));
return 1;
}
if (_hidden_GostR3411_2012_256_md == NULL) {
EVP_MD *md;
- if ((md = EVP_MD_meth_new(NID_id_GostR3411_2012_256, NID_undef)) == NULL
+ if ((md =
+ EVP_MD_meth_new(NID_id_GostR3411_2012_256, NID_undef)) == NULL
|| !EVP_MD_meth_set_result_size(md, 32)
|| !EVP_MD_meth_set_input_blocksize(md, 64)
|| !EVP_MD_meth_set_app_datasize(md, sizeof(gost2012_hash_ctx))
if (_hidden_GostR3411_2012_512_md == NULL) {
EVP_MD *md;
- if ((md = EVP_MD_meth_new(NID_id_GostR3411_2012_512, NID_undef)) == NULL
+ if ((md =
+ EVP_MD_meth_new(NID_id_GostR3411_2012_512, NID_undef)) == NULL
|| !EVP_MD_meth_set_result_size(md, 64)
|| !EVP_MD_meth_set_input_blocksize(md, 64)
|| !EVP_MD_meth_set_app_datasize(md, sizeof(gost2012_hash_ctx))
static int gost_digest_init512(EVP_MD_CTX *ctx)
{
- init_gost2012_hash_ctx((gost2012_hash_ctx *) EVP_MD_CTX_md_data(ctx), 512);
+ init_gost2012_hash_ctx((gost2012_hash_ctx *) EVP_MD_CTX_md_data(ctx),
+ 512);
return 1;
}
static int gost_digest_init256(EVP_MD_CTX *ctx)
{
- init_gost2012_hash_ctx((gost2012_hash_ctx *) EVP_MD_CTX_md_data(ctx), 256);
+ init_gost2012_hash_ctx((gost2012_hash_ctx *) EVP_MD_CTX_md_data(ctx),
+ 256);
return 1;
}
static int gost_digest_update(EVP_MD_CTX *ctx, const void *data, size_t count)
{
- gost2012_hash_block((gost2012_hash_ctx *) EVP_MD_CTX_md_data(ctx), data, count);
+ gost2012_hash_block((gost2012_hash_ctx *) EVP_MD_CTX_md_data(ctx), data,
+ count);
return 1;
}
static int gost_digest_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from)
{
if (EVP_MD_CTX_md_data(to) && EVP_MD_CTX_md_data(from))
- memcpy(EVP_MD_CTX_md_data(to), EVP_MD_CTX_md_data(from), sizeof(gost2012_hash_ctx));
+ memcpy(EVP_MD_CTX_md_data(to), EVP_MD_CTX_md_data(from),
+ sizeof(gost2012_hash_ctx));
return 1;
}