~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to crypto/evp/p_sign.c

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Valcárcel Scerpella (Canonical)
  • Date: 2009-12-06 20:16:24 UTC
  • mfrom: (11.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091206201624-u126qjpqm2n2uuhu
Tags: 0.9.8k-7ubuntu1
* Merge from debian unstable, remaining changes (LP: #493392):
  - Link using -Bsymbolic-functions
  - Add support for lpia
  - Disable SSLv2 during compile
  - Ship documentation in openssl-doc, suggested by the package.
  - Use a different priority for libssl0.9.8/restart-services
    depending on whether a desktop, or server dist-upgrade is being
    performed.
  - Display a system restart required notification bubble on libssl0.9.8
    upgrade.
  - Replace duplicate files in the doc directory with symlinks.
  - Move runtime libraries to /lib, for the benefit of wpasupplicant
* Strip the patches out of the source into quilt patches
* Disable CVE-2009-3555.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
        MS_STATIC EVP_MD_CTX tmp_ctx;
85
85
 
86
86
        *siglen=0;
87
 
        EVP_MD_CTX_init(&tmp_ctx);
88
 
        EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);   
89
 
        EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
90
 
        EVP_MD_CTX_cleanup(&tmp_ctx);
91
87
        for (i=0; i<4; i++)
92
88
                {
93
89
                v=ctx->digest->required_pkey_type[i];
108
104
                EVPerr(EVP_F_EVP_SIGNFINAL,EVP_R_NO_SIGN_FUNCTION_CONFIGURED);
109
105
                return(0);
110
106
                }
111
 
        return(ctx->digest->sign(ctx->digest->type,m,m_len,sigret,siglen,
112
 
                pkey->pkey.ptr));
 
107
        EVP_MD_CTX_init(&tmp_ctx);
 
108
        EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);
 
109
        if (ctx->digest->flags & EVP_MD_FLAG_SVCTX)
 
110
                {
 
111
                EVP_MD_SVCTX sctmp;
 
112
                sctmp.mctx = &tmp_ctx;
 
113
                sctmp.key = pkey->pkey.ptr;
 
114
                i = ctx->digest->sign(ctx->digest->type,
 
115
                        NULL, -1, sigret, siglen, &sctmp);
 
116
                }
 
117
        else
 
118
                {
 
119
                EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
 
120
                i = ctx->digest->sign(ctx->digest->type,m,m_len,sigret,siglen,
 
121
                                        pkey->pkey.ptr);
 
122
                }
 
123
        EVP_MD_CTX_cleanup(&tmp_ctx);
 
124
        return i;
113
125
        }
114
126