~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to ext/openssl/ossl_x509revoked.c

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2010-07-31 17:08:39 UTC
  • mfrom: (1.1.4 upstream) (8.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100731170839-j034dmpdqt1cc4p6
Tags: 1.9.2~svn28788-1
* New release based on upstream snapshot from the 1.9.2 branch,
  after 1.9.2 RC2. That branch is (supposed to be) binary-compatible
  with the 1.9.1 branch.
  + Builds fine on i386. Closes: #580852.
* Upgrade to Standards-Version: 3.9.1. No changes needed.
* Updated generated incs.
* Patches that still need work:
  + Unclear status, need more investigation:
   090729_fix_Makefile_deps.dpatch
   090803_exclude_rdoc.dpatch
   203_adjust_base_of_search_path.dpatch
   902_define_YAML_in_yaml_stringio.rb.dpatch
   919_common.mk_tweaks.dpatch
   931_libruby_suffix.dpatch
   940_test_thread_mutex_sync_shorter.dpatch
  + Maybe not needed anymore, keeping but not applying.
   102_skip_test_copy_stream.dpatch (test doesn't block anymore?)
   104_skip_btest_io.dpatch (test doesn't block anymore?)
   201_gem_prelude.dpatch (we don't use that rubygems anyway?)
   202_gem_default_dir.dpatch (we don't use that rubygems anyway?)
   940_test_file_exhaustive_fails_as_root.dpatch
   940_test_priority_fails.dpatch
   100518_load_libc_libm.dpatch
* Add disable-tests.diff: disable some tests that cause failures on FreeBSD.
  Closes: #590002, #543805, #542927.
* However, many new failures on FreeBSD. Since that version is still an
  improvement, add the check that makes test suite failures non-fatal on
  FreeBSD again. That still needs to be investigated.
* Re-add 903_skip_base_ruby_check.dpatch
* Add build-dependency on ruby1.8 and drop all pre-generated files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: ossl_x509revoked.c 11708 2007-02-12 23:01:19Z shyouhei $
 
2
 * $Id: ossl_x509revoked.c 27440 2010-04-22 08:21:01Z nobu $
3
3
 * 'OpenSSL for Ruby' project
4
4
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
5
5
 * All rights reserved.
36
36
/*
37
37
 * PUBLIC
38
38
 */
39
 
VALUE 
 
39
VALUE
40
40
ossl_x509revoked_new(X509_REVOKED *rev)
41
41
{
42
42
    X509_REVOKED *new;
71
71
/*
72
72
 * PRIVATE
73
73
 */
74
 
static VALUE 
 
74
static VALUE
75
75
ossl_x509revoked_alloc(VALUE klass)
76
76
{
77
77
    X509_REVOKED *rev;
85
85
    return obj;
86
86
}
87
87
 
88
 
static VALUE 
 
88
static VALUE
89
89
ossl_x509revoked_initialize(int argc, VALUE *argv, VALUE self)
90
90
{
91
91
    /* EMPTY */
92
92
    return self;
93
93
}
94
94
 
95
 
static VALUE 
 
95
static VALUE
96
96
ossl_x509revoked_get_serial(VALUE self)
97
97
{
98
98
    X509_REVOKED *rev;
102
102
    return asn1integer_to_num(rev->serialNumber);
103
103
}
104
104
 
105
 
static VALUE 
 
105
static VALUE
106
106
ossl_x509revoked_set_serial(VALUE self, VALUE num)
107
107
{
108
108
    X509_REVOKED *rev;
113
113
    return num;
114
114
}
115
115
 
116
 
static VALUE 
 
116
static VALUE
117
117
ossl_x509revoked_get_time(VALUE self)
118
118
{
119
119
    X509_REVOKED *rev;
120
 
        
 
120
 
121
121
    GetX509Rev(self, rev);
122
122
 
123
123
    return asn1time_to_time(rev->revocationDate);
124
124
}
125
125
 
126
 
static VALUE 
 
126
static VALUE
127
127
ossl_x509revoked_set_time(VALUE self, VALUE time)
128
128
{
129
129
    X509_REVOKED *rev;
140
140
/*
141
141
 * Gets X509v3 extensions as array of X509Ext objects
142
142
 */
143
 
static VALUE 
 
143
static VALUE
144
144
ossl_x509revoked_get_extensions(VALUE self)
145
145
{
146
146
    X509_REVOKED *rev;
166
166
/*
167
167
 * Sets X509_EXTENSIONs
168
168
 */
169
 
static VALUE 
 
169
static VALUE
170
170
ossl_x509revoked_set_extensions(VALUE self, VALUE ary)
171
171
{
172
172
    X509_REVOKED *rev;
196
196
ossl_x509revoked_add_extension(VALUE self, VALUE ext)
197
197
{
198
198
    X509_REVOKED *rev;
199
 
    
 
199
 
200
200
    GetX509Rev(self, rev);
201
201
    if(!X509_REVOKED_add_ext(rev, DupX509ExtPtr(ext), -1)) {
202
202
        ossl_raise(eX509RevError, NULL);
214
214
    eX509RevError = rb_define_class_under(mX509, "RevokedError", eOSSLError);
215
215
 
216
216
    cX509Rev = rb_define_class_under(mX509, "Revoked", rb_cObject);
217
 
        
 
217
 
218
218
    rb_define_alloc_func(cX509Rev, ossl_x509revoked_alloc);
219
219
    rb_define_method(cX509Rev, "initialize", ossl_x509revoked_initialize, -1);
220
 
        
 
220
 
221
221
    rb_define_method(cX509Rev, "serial", ossl_x509revoked_get_serial, 0);
222
222
    rb_define_method(cX509Rev, "serial=", ossl_x509revoked_set_serial, 1);
223
223
    rb_define_method(cX509Rev, "time", ossl_x509revoked_get_time, 0);