Loading apps/ts.c +2 −0 Original line number Diff line number Diff line Loading @@ -598,6 +598,8 @@ static int create_digest(BIO *input, char *digest, const EVP_MD *md, int md_value_len; md_value_len = EVP_MD_size(md); if (md_value_len < 0) goto err; if (input) { /* Digest must be computed from an input file. */ Loading crypto/evp/evp.h +2 −0 Original line number Diff line number Diff line Loading @@ -1183,6 +1183,7 @@ void ERR_load_EVP_strings(void); #define EVP_F_EVP_DIGESTINIT_EX 128 #define EVP_F_EVP_ENCRYPTFINAL_EX 127 #define EVP_F_EVP_MD_CTX_COPY_EX 110 #define EVP_F_EVP_MD_SIZE 162 #define EVP_F_EVP_OPENINIT 102 #define EVP_F_EVP_PBE_ALG_ADD 115 #define EVP_F_EVP_PBE_ALG_ADD_TYPE 160 Loading Loading @@ -1262,6 +1263,7 @@ void ERR_load_EVP_strings(void); #define EVP_R_INVALID_OPERATION 148 #define EVP_R_IV_TOO_LARGE 102 #define EVP_R_KEYGEN_FAILURE 120 #define EVP_R_MESSAGE_DIGEST_IS_NULL 159 #define EVP_R_METHOD_NOT_SUPPORTED 144 #define EVP_R_MISSING_PARAMETERS 103 #define EVP_R_NO_CIPHER_SET 131 Loading crypto/evp/evp_err.c +3 −1 Original line number Diff line number Diff line /* crypto/evp/evp_err.c */ /* ==================================================================== * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. * Copyright (c) 1999-2008 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Loading Loading @@ -85,6 +85,7 @@ static ERR_STRING_DATA EVP_str_functs[]= {ERR_FUNC(EVP_F_EVP_DIGESTINIT_EX), "EVP_DigestInit_ex"}, {ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL_EX), "EVP_EncryptFinal_ex"}, {ERR_FUNC(EVP_F_EVP_MD_CTX_COPY_EX), "EVP_MD_CTX_copy_ex"}, {ERR_FUNC(EVP_F_EVP_MD_SIZE), "EVP_MD_SIZE"}, {ERR_FUNC(EVP_F_EVP_OPENINIT), "EVP_OpenInit"}, {ERR_FUNC(EVP_F_EVP_PBE_ALG_ADD), "EVP_PBE_alg_add"}, {ERR_FUNC(EVP_F_EVP_PBE_ALG_ADD_TYPE), "EVP_PBE_alg_add_type"}, Loading Loading @@ -167,6 +168,7 @@ static ERR_STRING_DATA EVP_str_reasons[]= {ERR_REASON(EVP_R_INVALID_OPERATION) ,"invalid operation"}, {ERR_REASON(EVP_R_IV_TOO_LARGE) ,"iv too large"}, {ERR_REASON(EVP_R_KEYGEN_FAILURE) ,"keygen failure"}, {ERR_REASON(EVP_R_MESSAGE_DIGEST_IS_NULL),"message digest is null"}, {ERR_REASON(EVP_R_METHOD_NOT_SUPPORTED) ,"method not supported"}, {ERR_REASON(EVP_R_MISSING_PARAMETERS) ,"missing parameters"}, {ERR_REASON(EVP_R_NO_CIPHER_SET) ,"no cipher set"}, Loading crypto/evp/evp_lib.c +3 −0 Original line number Diff line number Diff line Loading @@ -256,7 +256,10 @@ int EVP_MD_pkey_type(const EVP_MD *md) int EVP_MD_size(const EVP_MD *md) { if (!md) { EVPerr(EVP_F_EVP_MD_SIZE, EVP_R_MESSAGE_DIGEST_IS_NULL); return -1; } return md->md_size; } Loading crypto/evp/m_sigver.c +9 −6 Original line number Diff line number Diff line Loading @@ -128,7 +128,6 @@ int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, return do_sigver_init(ctx, pctx, type, e, pkey, 1); } int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen) { int sctx, r = 0; Loading Loading @@ -159,14 +158,16 @@ int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen) { if (sctx) { if (ctx->pctx->pmeth->signctx(ctx->pctx, sigret, siglen, ctx) <= 0) if (ctx->pctx->pmeth->signctx(ctx->pctx, sigret, siglen, ctx) <= 0) return 0; } else if (EVP_PKEY_sign(ctx->pctx, sigret, siglen, NULL, EVP_MD_size(ctx->digest)) <= 0) else { int s = EVP_MD_size(ctx->digest); if (s < 0 || EVP_PKEY_sign(ctx->pctx, sigret, siglen, NULL, s) <= 0) return 0; } } return 1; } Loading @@ -177,6 +178,8 @@ int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, unsigned char *sig, size_t siglen) int r; unsigned int mdlen; int vctx; /* FIXME: surely this should test verifyctx? (Ben 29/12/08) */ if (ctx->pctx->pmeth->signctx) vctx = 1; else Loading Loading
apps/ts.c +2 −0 Original line number Diff line number Diff line Loading @@ -598,6 +598,8 @@ static int create_digest(BIO *input, char *digest, const EVP_MD *md, int md_value_len; md_value_len = EVP_MD_size(md); if (md_value_len < 0) goto err; if (input) { /* Digest must be computed from an input file. */ Loading
crypto/evp/evp.h +2 −0 Original line number Diff line number Diff line Loading @@ -1183,6 +1183,7 @@ void ERR_load_EVP_strings(void); #define EVP_F_EVP_DIGESTINIT_EX 128 #define EVP_F_EVP_ENCRYPTFINAL_EX 127 #define EVP_F_EVP_MD_CTX_COPY_EX 110 #define EVP_F_EVP_MD_SIZE 162 #define EVP_F_EVP_OPENINIT 102 #define EVP_F_EVP_PBE_ALG_ADD 115 #define EVP_F_EVP_PBE_ALG_ADD_TYPE 160 Loading Loading @@ -1262,6 +1263,7 @@ void ERR_load_EVP_strings(void); #define EVP_R_INVALID_OPERATION 148 #define EVP_R_IV_TOO_LARGE 102 #define EVP_R_KEYGEN_FAILURE 120 #define EVP_R_MESSAGE_DIGEST_IS_NULL 159 #define EVP_R_METHOD_NOT_SUPPORTED 144 #define EVP_R_MISSING_PARAMETERS 103 #define EVP_R_NO_CIPHER_SET 131 Loading
crypto/evp/evp_err.c +3 −1 Original line number Diff line number Diff line /* crypto/evp/evp_err.c */ /* ==================================================================== * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. * Copyright (c) 1999-2008 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Loading Loading @@ -85,6 +85,7 @@ static ERR_STRING_DATA EVP_str_functs[]= {ERR_FUNC(EVP_F_EVP_DIGESTINIT_EX), "EVP_DigestInit_ex"}, {ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL_EX), "EVP_EncryptFinal_ex"}, {ERR_FUNC(EVP_F_EVP_MD_CTX_COPY_EX), "EVP_MD_CTX_copy_ex"}, {ERR_FUNC(EVP_F_EVP_MD_SIZE), "EVP_MD_SIZE"}, {ERR_FUNC(EVP_F_EVP_OPENINIT), "EVP_OpenInit"}, {ERR_FUNC(EVP_F_EVP_PBE_ALG_ADD), "EVP_PBE_alg_add"}, {ERR_FUNC(EVP_F_EVP_PBE_ALG_ADD_TYPE), "EVP_PBE_alg_add_type"}, Loading Loading @@ -167,6 +168,7 @@ static ERR_STRING_DATA EVP_str_reasons[]= {ERR_REASON(EVP_R_INVALID_OPERATION) ,"invalid operation"}, {ERR_REASON(EVP_R_IV_TOO_LARGE) ,"iv too large"}, {ERR_REASON(EVP_R_KEYGEN_FAILURE) ,"keygen failure"}, {ERR_REASON(EVP_R_MESSAGE_DIGEST_IS_NULL),"message digest is null"}, {ERR_REASON(EVP_R_METHOD_NOT_SUPPORTED) ,"method not supported"}, {ERR_REASON(EVP_R_MISSING_PARAMETERS) ,"missing parameters"}, {ERR_REASON(EVP_R_NO_CIPHER_SET) ,"no cipher set"}, Loading
crypto/evp/evp_lib.c +3 −0 Original line number Diff line number Diff line Loading @@ -256,7 +256,10 @@ int EVP_MD_pkey_type(const EVP_MD *md) int EVP_MD_size(const EVP_MD *md) { if (!md) { EVPerr(EVP_F_EVP_MD_SIZE, EVP_R_MESSAGE_DIGEST_IS_NULL); return -1; } return md->md_size; } Loading
crypto/evp/m_sigver.c +9 −6 Original line number Diff line number Diff line Loading @@ -128,7 +128,6 @@ int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, return do_sigver_init(ctx, pctx, type, e, pkey, 1); } int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen) { int sctx, r = 0; Loading Loading @@ -159,14 +158,16 @@ int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen) { if (sctx) { if (ctx->pctx->pmeth->signctx(ctx->pctx, sigret, siglen, ctx) <= 0) if (ctx->pctx->pmeth->signctx(ctx->pctx, sigret, siglen, ctx) <= 0) return 0; } else if (EVP_PKEY_sign(ctx->pctx, sigret, siglen, NULL, EVP_MD_size(ctx->digest)) <= 0) else { int s = EVP_MD_size(ctx->digest); if (s < 0 || EVP_PKEY_sign(ctx->pctx, sigret, siglen, NULL, s) <= 0) return 0; } } return 1; } Loading @@ -177,6 +178,8 @@ int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, unsigned char *sig, size_t siglen) int r; unsigned int mdlen; int vctx; /* FIXME: surely this should test verifyctx? (Ben 29/12/08) */ if (ctx->pctx->pmeth->signctx) vctx = 1; else Loading