~ubuntu-branches/ubuntu/utopic/openssl/utopic

« back to all changes in this revision

Viewing changes to crypto/hmac/hm_pmeth.c

  • Committer: Package Import Robot
  • Author(s): Kurt Roeckx
  • Date: 2012-03-19 18:23:32 UTC
  • mfrom: (1.2.6)
  • mto: This revision was merged to the branch mainline in revision 64.
  • Revision ID: package-import@ubuntu.com-20120319182332-q4zgqvw51ahauk27
Tags: 1.0.1-1
* New upstream version
  - Remove kfreebsd-pipe.patch, fixed upstream
  - Update pic.patch, openssl-pod-misspell.patch and make-targets.patch
  - Add OPENSSL_1.0.1 to version-script.patch and libssl1.0.0.symbols for
    the new functions.
  - AES-NI support (Closes: #644743)
* pic.patch: upstream made OPENSSL_ia32cap_P and OPENSSL_cpuid_setup
  hidden on amd64, no need to access it PIC anymore.
* pic.patch: Make OPENSSL_ia32cap_P hidden on i386 too (Closes: #663977)
* Enable hardening using dpkg-buildflags (Closes: #653495)
* s_client and s_server were forcing SSLv3 only connection when SSLv2 was
  disabled instead of the SSLv2 with upgrade method.  (Closes: #664454)
* Add Beaks on openssh < 1:5.9p1-4, it has a too strict version check.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
        dctx = dst->data;
101
101
        dctx->md = sctx->md;
102
102
        HMAC_CTX_init(&dctx->ctx);
103
 
        HMAC_CTX_copy(&dctx->ctx, &sctx->ctx);
 
103
        if (!HMAC_CTX_copy(&dctx->ctx, &sctx->ctx))
 
104
                return 0;
104
105
        if (sctx->ktmp.data)
105
106
                {
106
107
                if (!ASN1_OCTET_STRING_set(&dctx->ktmp,
141
142
static int int_update(EVP_MD_CTX *ctx,const void *data,size_t count)
142
143
        {
143
144
        HMAC_PKEY_CTX *hctx = ctx->pctx->data;
144
 
        HMAC_Update(&hctx->ctx, data, count);
 
145
        if (!HMAC_Update(&hctx->ctx, data, count))
 
146
                return 0;
145
147
        return 1;
146
148
        }
147
149
 
167
169
        if (!sig)
168
170
                return 1;
169
171
 
170
 
        HMAC_Final(&hctx->ctx, sig, &hlen);
 
172
        if (!HMAC_Final(&hctx->ctx, sig, &hlen))
 
173
                return 0;
171
174
        *siglen = (size_t)hlen;
172
175
        return 1;
173
176
        }
192
195
 
193
196
                case EVP_PKEY_CTRL_DIGESTINIT:
194
197
                key = (ASN1_OCTET_STRING *)ctx->pkey->pkey.ptr;
195
 
                HMAC_Init_ex(&hctx->ctx, key->data, key->length, hctx->md,
196
 
                                ctx->engine);
 
198
                if (!HMAC_Init_ex(&hctx->ctx, key->data, key->length, hctx->md,
 
199
                                ctx->engine))
 
200
                        return 0;
197
201
                break;
198
202
 
199
203
                default: