summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_ns_spki.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 08:21:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 08:21:01 +0000
commitd0e5a34ac7c34e70c145024a0fed8f6042814f29 (patch)
tree8a7edcfded4a6fe70c18cb33c65868baf9268573 /ext/openssl/ossl_ns_spki.c
parent3e8d63059d36fe6ba64ffba7bfce577693c98b59 (diff)
* ext/**/*.[ch]: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_ns_spki.c')
-rw-r--r--ext/openssl/ossl_ns_spki.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/openssl/ossl_ns_spki.c b/ext/openssl/ossl_ns_spki.c
index 2ebad18..b67dd22 100644
--- a/ext/openssl/ossl_ns_spki.c
+++ b/ext/openssl/ossl_ns_spki.c
@@ -42,12 +42,12 @@ ossl_spki_alloc(VALUE klass)
{
NETSCAPE_SPKI *spki;
VALUE obj;
-
+
if (!(spki = NETSCAPE_SPKI_new())) {
ossl_raise(eSPKIError, NULL);
- }
+ }
WrapSPKI(klass, obj, spki);
-
+
return obj;
}
@@ -57,7 +57,7 @@ ossl_spki_initialize(int argc, VALUE *argv, VALUE self)
NETSCAPE_SPKI *spki;
VALUE buffer;
const unsigned char *p;
-
+
if (rb_scan_args(argc, argv, "01", &buffer) == 0) {
return self;
}
@@ -101,7 +101,7 @@ ossl_spki_to_pem(VALUE self)
NETSCAPE_SPKI *spki;
char *data;
VALUE str;
-
+
GetSPKI(self, spki);
if (!(data = NETSCAPE_SPKI_b64_encode(spki))) {
ossl_raise(eSPKIError, NULL);
@@ -118,7 +118,7 @@ ossl_spki_print(VALUE self)
BIO *out;
BUF_MEM *buf;
VALUE str;
-
+
GetSPKI(self, spki);
if (!(out = BIO_new(BIO_s_mem()))) {
ossl_raise(eSPKIError, NULL);
@@ -130,7 +130,7 @@ ossl_spki_print(VALUE self)
BIO_get_mem_ptr(out, &buf);
str = rb_str_new(buf->data, buf->length);
BIO_free(out);
-
+
return str;
}
@@ -235,14 +235,14 @@ void
Init_ossl_ns_spki()
{
mNetscape = rb_define_module_under(mOSSL, "Netscape");
-
+
eSPKIError = rb_define_class_under(mNetscape, "SPKIError", eOSSLError);
-
+
cSPKI = rb_define_class_under(mNetscape, "SPKI", rb_cObject);
-
+
rb_define_alloc_func(cSPKI, ossl_spki_alloc);
rb_define_method(cSPKI, "initialize", ossl_spki_initialize, -1);
-
+
rb_define_method(cSPKI, "to_der", ossl_spki_to_der, 0);
rb_define_method(cSPKI, "to_pem", ossl_spki_to_pem, 0);
rb_define_alias(cSPKI, "to_s", "to_pem");