~ubuntu-branches/ubuntu/maverick/ruby1.8/maverick-updates

« back to all changes in this revision

Viewing changes to ext/openssl/ossl_pkey.c

  • Committer: Package Import Robot
  • Author(s): Daigo Moriwaki
  • Date: 2010-06-27 22:16:44 UTC
  • mfrom: (22.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20100627221644-7n8891uzqc17nvyq
Tags: 1.8.7.299-1
* New upstream release
* Removed patches that the upstrem has applied:
  - debian/patches/100312_timeout-fix.dpatch
  - debian/patches/100620_fix_pathname_warning.dpatch
  - debian/patches/100620_fix_super_called_outside_of_method.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: ossl_pkey.c 12496 2007-06-08 15:02:04Z technorama $
 
2
 * $Id: ossl_pkey.c 28004 2010-05-24 23:58:49Z shyouhei $
3
3
 * 'OpenSSL for Ruby' project
4
4
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
5
5
 * All rights reserved.
177
177
    str = rb_str_new(0, EVP_PKEY_size(pkey)+16);
178
178
    if (!EVP_SignFinal(&ctx, RSTRING_PTR(str), &buf_len, pkey))
179
179
        ossl_raise(ePKeyError, NULL);
180
 
    assert(buf_len <= RSTRING_LEN(str));
 
180
    assert((long)buf_len <= RSTRING_LEN(str));
181
181
    rb_str_set_len(str, buf_len);
182
182
 
183
183
    return str;