diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-04-10 11:07:35 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-04-10 11:07:35 +0000 |
commit | 5f590d2218e57fe7c078c7d2d33293f993c97eb7 (patch) | |
tree | 56a6cb96d2a87dabe82a0a3675463511f93f45bd /engines | |
parent | 791b7bc715913d73921a2ced57904bda9848071c (diff) | |
download | openssl-new-5f590d2218e57fe7c078c7d2d33293f993c97eb7.tar.gz |
PR: 1887 (part)
Submitted by: "Victor B. Wagner" <vitus@cryptocom.ru>
Approved by: steve@openssl.org
Added error codes for ccgost.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/ccgost/e_gost_err.c | 1 | ||||
-rw-r--r-- | engines/ccgost/e_gost_err.h | 1 | ||||
-rw-r--r-- | engines/ccgost/gost_crypt.c | 5 |
3 files changed, 6 insertions, 1 deletions
diff --git a/engines/ccgost/e_gost_err.c b/engines/ccgost/e_gost_err.c index 4d2b09169a..469027051a 100644 --- a/engines/ccgost/e_gost_err.c +++ b/engines/ccgost/e_gost_err.c @@ -86,6 +86,7 @@ static ERR_STRING_DATA GOST_str_functs[]= {ERR_FUNC(GOST_F_GOST_DO_SIGN), "GOST_DO_SIGN"}, {ERR_FUNC(GOST_F_GOST_DO_VERIFY), "GOST_DO_VERIFY"}, {ERR_FUNC(GOST_F_GOST_IMIT_CTRL), "GOST_IMIT_CTRL"}, +{ERR_FUNC(GOST_F_GOST_IMIT_FINAL), "GOST_IMIT_FINAL"}, {ERR_FUNC(GOST_F_GOST_IMIT_UPDATE), "GOST_IMIT_UPDATE"}, {ERR_FUNC(GOST_F_PARAM_COPY_GOST01), "PARAM_COPY_GOST01"}, {ERR_FUNC(GOST_F_PARAM_COPY_GOST94), "PARAM_COPY_GOST94"}, diff --git a/engines/ccgost/e_gost_err.h b/engines/ccgost/e_gost_err.h index 14326e01e7..652d1bb392 100644 --- a/engines/ccgost/e_gost_err.h +++ b/engines/ccgost/e_gost_err.h @@ -87,6 +87,7 @@ void ERR_GOST_error(int function, int reason, char *file, int line); #define GOST_F_GOST_DO_SIGN 112 #define GOST_F_GOST_DO_VERIFY 113 #define GOST_F_GOST_IMIT_CTRL 114 +#define GOST_F_GOST_IMIT_FINAL 140 #define GOST_F_GOST_IMIT_UPDATE 115 #define GOST_F_PARAM_COPY_GOST01 116 #define GOST_F_PARAM_COPY_GOST94 117 diff --git a/engines/ccgost/gost_crypt.c b/engines/ccgost/gost_crypt.c index a9536dd8a4..954d150e51 100644 --- a/engines/ccgost/gost_crypt.c +++ b/engines/ccgost/gost_crypt.c @@ -550,7 +550,10 @@ int gost_imit_update(EVP_MD_CTX *ctx, const void *data, size_t count) int gost_imit_final(EVP_MD_CTX *ctx,unsigned char *md) { struct ossl_gost_imit_ctx *c = ctx->md_data; - if (!c->key_set) return 0; + if (!c->key_set) { + GOSTerr(GOST_F_GOST_IMIT_FINAL, GOST_R_MAC_KEY_NOT_SET); + return 0; + } if (c->bytes_left) { int i; |