ruby-changes:15537
From: nobu <ko1@a...>
Date: Thu, 22 Apr 2010 17:21:19 +0900 (JST)
Subject: [ruby-changes:15537] Ruby:r27440 (trunk): * ext/**/*.[ch]: removed trailing spaces.
nobu 2010-04-22 17:21:01 +0900 (Thu, 22 Apr 2010) New Revision: 27440 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27440 Log: * ext/**/*.[ch]: removed trailing spaces. Modified files: trunk/ext/digest/sha2/sha2.c trunk/ext/openssl/ossl.c trunk/ext/openssl/ossl_asn1.c trunk/ext/openssl/ossl_bn.c trunk/ext/openssl/ossl_cipher.c trunk/ext/openssl/ossl_config.c trunk/ext/openssl/ossl_digest.c trunk/ext/openssl/ossl_hmac.c trunk/ext/openssl/ossl_ns_spki.c trunk/ext/openssl/ossl_pkcs7.c trunk/ext/openssl/ossl_pkey.c trunk/ext/openssl/ossl_pkey_dh.c trunk/ext/openssl/ossl_pkey_dsa.c trunk/ext/openssl/ossl_pkey_ec.c trunk/ext/openssl/ossl_pkey_rsa.c trunk/ext/openssl/ossl_rand.c trunk/ext/openssl/ossl_x509cert.c trunk/ext/openssl/ossl_x509crl.c trunk/ext/openssl/ossl_x509ext.c trunk/ext/openssl/ossl_x509name.c trunk/ext/openssl/ossl_x509req.c trunk/ext/openssl/ossl_x509revoked.c trunk/ext/socket/getaddrinfo.c trunk/ext/socket/getnameinfo.c Index: ext/digest/sha2/sha2.c =================================================================== --- ext/digest/sha2/sha2.c (revision 27439) +++ ext/digest/sha2/sha2.c (revision 27440) @@ -490,7 +490,7 @@ /* Part of the message block expansion: */ s0 = W256[(j+1)&0x0f]; s0 = sigma0_256(s0); - s1 = W256[(j+14)&0x0f]; + s1 = W256[(j+14)&0x0f]; s1 = sigma1_256(s1); /* Apply the SHA-256 compression function to update a..h */ Index: ext/openssl/ossl_pkey_dsa.c =================================================================== --- ext/openssl/ossl_pkey_dsa.c (revision 27439) +++ ext/openssl/ossl_pkey_dsa.c (revision 27440) @@ -36,7 +36,7 @@ { EVP_PKEY *pkey; VALUE obj; - + if (!dsa) { return Qfalse; } @@ -145,7 +145,7 @@ BIO *in; char *passwd = NULL; VALUE arg, pass; - + GetPKey(self, pkey); if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) { dsa = DSA_new(); @@ -211,9 +211,9 @@ ossl_dsa_is_private(VALUE self) { EVP_PKEY *pkey; - + GetPKeyDSA(self, pkey); - + return (DSA_PRIVATE(self, pkey->pkey.dsa)) ? Qtrue : Qfalse; } @@ -364,7 +364,7 @@ EVP_PKEY *pkey; DSA *dsa; VALUE obj; - + GetPKeyDSA(self, pkey); /* err check performed by dsa_instance */ dsa = DSAPublicKey_dup(pkey->pkey.dsa); @@ -453,7 +453,7 @@ eDSAError = rb_define_class_under(mPKey, "DSAError", ePKeyError); cDSA = rb_define_class_under(mPKey, "DSA", cPKey); - + rb_define_singleton_method(cDSA, "generate", ossl_dsa_s_generate, 1); rb_define_method(cDSA, "initialize", ossl_dsa_initialize, -1); Index: ext/openssl/ossl_config.c =================================================================== --- ext/openssl/ossl_config.c (revision 27439) +++ ext/openssl/ossl_config.c (revision 27440) @@ -298,7 +298,7 @@ return hash; } for (i=0; i<entries; i++) { - entry = sk_CONF_VALUE_value(sk, i); + entry = sk_CONF_VALUE_value(sk, i); rb_hash_aset(hash, rb_str_new2(entry->name), rb_str_new2(entry->value)); } Index: ext/openssl/ossl_hmac.c =================================================================== --- ext/openssl/ossl_hmac.c (revision 27439) +++ ext/openssl/ossl_hmac.c (revision 27440) @@ -53,7 +53,7 @@ MakeHMAC(obj, klass, ctx); HMAC_CTX_init(ctx); - + return obj; } @@ -135,7 +135,7 @@ unsigned char *buf; unsigned int buf_len; VALUE digest; - + GetHMAC(self, ctx); hmac_final(ctx, &buf, &buf_len); digest = ossl_buf2str((char *)buf, buf_len); @@ -156,7 +156,7 @@ char *hexbuf; unsigned int buf_len; VALUE hexdigest; - + GetHMAC(self, ctx); hmac_final(ctx, &buf, &buf_len); if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) { @@ -195,7 +195,7 @@ { unsigned char *buf; unsigned int buf_len; - + StringValue(key); StringValue(data); buf = HMAC(GetDigestPtr(digest), RSTRING_PTR(key), RSTRING_LEN(key), @@ -219,7 +219,7 @@ StringValue(key); StringValue(data); - + buf = HMAC(GetDigestPtr(digest), RSTRING_PTR(key), RSTRING_LEN(key), (unsigned char *)RSTRING_PTR(data), RSTRING_LEN(data), NULL, &buf_len); if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) { @@ -241,7 +241,7 @@ #endif eHMACError = rb_define_class_under(mOSSL, "HMACError", eOSSLError); - + cHMAC = rb_define_class_under(mOSSL, "HMAC", rb_cObject); rb_define_alloc_func(cHMAC, ossl_hmac_alloc); Index: ext/openssl/ossl_cipher.c =================================================================== --- ext/openssl/ossl_cipher.c (revision 27439) +++ ext/openssl/ossl_cipher.c (revision 27440) @@ -79,7 +79,7 @@ MakeCipher(obj, klass, ctx); EVP_CIPHER_CTX_init(ctx); - + return obj; } @@ -112,7 +112,7 @@ ossl_cipher_copy(VALUE self, VALUE other) { EVP_CIPHER_CTX *ctx1, *ctx2; - + rb_check_frozen(self); if (self == other) return self; @@ -170,7 +170,7 @@ GetCipher(self, ctx); if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, -1) != 1) ossl_raise(eCipherError, NULL); - + return self; } Index: ext/openssl/ossl_pkey_rsa.c =================================================================== --- ext/openssl/ossl_pkey_rsa.c (revision 27439) +++ ext/openssl/ossl_pkey_rsa.c (revision 27440) @@ -36,7 +36,7 @@ { EVP_PKEY *pkey; VALUE obj; - + if (!rsa) { return Qfalse; } @@ -48,7 +48,7 @@ return Qfalse; } WrapPKey(klass, obj, pkey); - + return obj; } @@ -136,7 +136,7 @@ BIO *in; char *passwd = NULL; VALUE arg, pass; - + GetPKey(self, pkey); if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) { rsa = RSA_new(); @@ -209,7 +209,7 @@ ossl_rsa_is_private(VALUE self) { EVP_PKEY *pkey; - + GetPKeyRSA(self, pkey); return (RSA_PRIVATE(self, pkey->pkey.rsa)) ? Qtrue : Qfalse; @@ -365,7 +365,7 @@ GetPKeyRSA(self, pkey); if (!RSA_PRIVATE(self, pkey->pkey.rsa)) { ossl_raise(eRSAError, "private key needed."); - } + } rb_scan_args(argc, argv, "11", &buffer, &padding); pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); StringValue(buffer); @@ -547,7 +547,7 @@ rb_define_singleton_method(cRSA, "generate", ossl_rsa_s_generate, -1); rb_define_method(cRSA, "initialize", ossl_rsa_initialize, -1); - + rb_define_method(cRSA, "public?", ossl_rsa_is_public, 0); rb_define_method(cRSA, "private?", ossl_rsa_is_private, 0); rb_define_method(cRSA, "to_text", ossl_rsa_to_text, 0); Index: ext/openssl/ossl_x509req.c =================================================================== --- ext/openssl/ossl_x509req.c (revision 27439) +++ ext/openssl/ossl_x509req.c (revision 27440) @@ -124,7 +124,7 @@ ossl_x509req_copy(VALUE self, VALUE other) { X509_REQ *a, *b, *req; - + rb_check_frozen(self); if (self == other) return self; GetX509Req(self, a); @@ -145,7 +145,7 @@ BIO *out; BUF_MEM *buf; VALUE str; - + GetX509Req(self, req); if (!(out = BIO_new(BIO_s_mem()))) { ossl_raise(eX509ReqError, NULL); @@ -213,7 +213,7 @@ { X509_REQ *req; X509 *x509; - + GetX509Req(self, req); ... if (!(x509 = X509_REQ_to_X509(req, d, pkey))) { @@ -271,7 +271,7 @@ ossl_x509req_set_subject(VALUE self, VALUE subject) { X509_REQ *req; - + GetX509Req(self, req); /* DUPs name */ if (!X509_REQ_set_subject_name(req, GetX509NamePtr(subject))) { @@ -290,7 +290,7 @@ VALUE str; GetX509Req(self, req); - + if (!(out = BIO_new(BIO_s_mem()))) { ossl_raise(eX509ReqError, NULL); } @@ -379,7 +379,7 @@ int count, i; X509_ATTRIBUTE *attr; VALUE ary; - + GetX509Req(self, req); count = X509_REQ_get_attr_count(req); @@ -441,13 +441,13 @@ Init_ossl_x509req() { eX509ReqError = rb_define_class_under(mX509, "RequestError", eOSSLError); - + cX509Req = rb_define_class_under(mX509, "Request", rb_cObject); - + rb_define_alloc_func(cX509Req, ossl_x509req_alloc); rb_define_method(cX509Req, "initialize", ossl_x509req_initialize, -1); rb_define_copy_func(cX509Req, ossl_x509req_copy); - + rb_define_method(cX509Req, "to_pem", ossl_x509req_to_pem, 0); rb_define_method(cX509Req, "to_der", ossl_x509req_to_der, 0); rb_define_alias(cX509Req, "to_s", "to_pem"); Index: ext/openssl/ossl_pkey_ec.c =================================================================== --- ext/openssl/ossl_pkey_ec.c (revision 27439) +++ ext/openssl/ossl_pkey_ec.c (revision 27440) @@ -110,7 +110,7 @@ { EVP_PKEY *pkey; VALUE obj; - + if (!ec) { return Qfalse; } @@ -163,7 +163,7 @@ EC_KEY *ec = NULL; VALUE arg, pass; VALUE group = Qnil; - + GetPKey(self, pkey); if (pkey->pkey.ec) rb_raise(eECError, "EC_KEY already initialized"); Index: ext/openssl/ossl_digest.c =================================================================== --- ext/openssl/ossl_digest.c (revision 27439) +++ ext/openssl/ossl_digest.c (revision 27440) @@ -241,7 +241,7 @@ cDigest = rb_define_class_under(mOSSL, "Digest", rb_path2class("Digest::Class")); eDigestError = rb_define_class_under(cDigest, "DigestError", eOSSLError); - + rb_define_alloc_func(cDigest, ossl_digest_alloc); rb_define_method(cDigest, "initialize", ossl_digest_initialize, -1); Index: ext/openssl/ossl.c =================================================================== --- ext/openssl/ossl.c (revision 27439) +++ ext/openssl/ossl.c (revision 27440) @@ -143,7 +143,7 @@ */ static VALUE ossl_pem_passwd_cb0(VALUE flag) -{ +{ VALUE pass; pass = rb_yield(flag); @@ -360,7 +360,7 @@ ossl_debug(const char *fmt, ...) { va_list args; - + if (dOSSL == Qtrue) { fprintf(stderr, "OSSL_DEBUG: "); va_start(args, fmt); @@ -393,7 +393,7 @@ { VALUE old = dOSSL; dOSSL = val; - + if (old != dOSSL) { if (dOSSL == Qtrue) { CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); Index: ext/openssl/ossl_bn.c =================================================================== --- ext/openssl/ossl_bn.c (revision 27439) +++ ext/openssl/ossl_bn.c (revision 27440) @@ -91,7 +91,7 @@ { BIGNUM *bn; VALUE obj; - + if (!(bn = BN_new())) { ossl_raise(eBNError, NULL); } @@ -573,7 +573,7 @@ VALUE vnum, vsafe, vadd, vrem, obj; rb_scan_args(argc, argv, "13", &vnum, &vsafe, &vadd, &vrem); - + num = NUM2INT(vnum); if (vsafe == Qfalse) { @@ -745,7 +745,7 @@ rb_define_alloc_func(cBN, ossl_bn_alloc); rb_define_method(cBN, "initialize", ossl_bn_initialize, -1); - + rb_define_copy_func(cBN, ossl_bn_copy); rb_define_method(cBN, "copy", ossl_bn_copy, 1); @@ -830,7 +830,7 @@ rb_define_alias(cBN, "to_int", "to_i"); rb_define_method(cBN, "to_bn", ossl_bn_to_bn, 0); rb_define_method(cBN, "coerce", ossl_bn_coerce, 1); - + /* * TODO: * But how to: from_bin, from_mpi? PACK? Index: ext/openssl/ossl_asn1.c =================================================================== --- ext/openssl/ossl_asn1.c (revision 27439) +++ ext/openssl/ossl_asn1.c (revision 27440) @@ -30,7 +30,7 @@ if (!time || !time->data) return Qnil; memset(&tm, 0, sizeof(struct tm)); - + switch (time->type) { case V_ASN1_UTCTIME: if (sscanf((const char *)time->data, "%2d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon, Index: ext/openssl/ossl_ns_spki.c =================================================================== --- ext/openssl/ossl_ns_spki.c (revision 27439) +++ ext/openssl/ossl_ns_spki.c (revision 27440) @@ -42,12 +42,12 @@ { NETSCAPE_SPKI *spki; VALUE obj; - + if (!(spki = NETSCAPE_SPKI_new())) { ossl_raise(eSPKIError, NULL); - } + } WrapSPKI(klass, obj, spki); - + return obj; } @@ -57,7 +57,7 @@ NETSCAPE_SPKI *spki; VALUE buffer; const unsigned char *p; - + if (rb_scan_args(argc, argv, "01", &buffer) == 0) { return self; } @@ -101,7 +101,7 @@ 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 @@ 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 @@ BIO_get_mem_ptr(out, &buf); str = rb_str_new(buf->data, buf->length); BIO_free(out); - + return str; } @@ -235,14 +235,14 @@ 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"); Index: ext/openssl/ossl_x509crl.c =================================================================== --- ext/openssl/ossl_x509crl.c (revision 27439) +++ ext/openssl/ossl_x509crl.c (revision 27440) @@ -116,7 +116,7 @@ ossl_x509crl_copy(VALUE self, VALUE other) { X509_CRL *a, *b, *crl; - + rb_check_frozen(self); if (self == other) return self; GetX509CRL(self, a); @@ -421,7 +421,7 @@ BIO_get_mem_ptr(out, &buf); str = rb_str_new(buf->data, buf->length); BIO_free(out); - + return str; } @@ -460,7 +460,7 @@ X509_CRL *crl; X509_EXTENSION *ext; int i; - + Check_Type(ary, T_ARRAY); /* All ary members should be X509 Extensions */ for (i=0; i<RARRAY_LEN(ary); i++) { @@ -507,7 +507,7 @@ eX509CRLError = rb_define_class_under(mX509, "CRLError", eOSSLError); cX509CRL = rb_define_class_under(mX509, "CRL", rb_cObject); - + rb_define_alloc_func(cX509CRL, ossl_x509crl_alloc); rb_define_method(cX509CRL, "initialize", ossl_x509crl_initialize, -1); rb_define_copy_func(cX509CRL, ossl_x509crl_copy); Index: ext/openssl/ossl_x509name.c =================================================================== --- ext/openssl/ossl_x509name.c (revision 27439) +++ ext/openssl/ossl_x509name.c (revision 27440) @@ -78,7 +78,7 @@ { X509_NAME *name; VALUE obj; - + if (!(name = X509_NAME_new())) { ossl_raise(eX509NameError, NULL); } @@ -231,7 +231,7 @@ char long_name[512]; const char *short_name; VALUE ary, ret; - + GetX509Name(self, name); entries = X509_NAME_entry_count(name); if (entries < 0) { Index: ext/openssl/ossl_pkey.c =================================================================== --- ext/openssl/ossl_pkey.c (revision 27439) +++ ext/openssl/ossl_pkey.c (revision 27440) @@ -99,7 +99,7 @@ GetPrivPKeyPtr(VALUE obj) { EVP_PKEY *pkey; - + if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) { ossl_raise(rb_eArgError, "Private key is needed."); } @@ -112,7 +112,7 @@ DupPKeyPtr(VALUE obj) { EVP_PKEY *pkey; - + SafeGetPKey(obj, pkey); CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY); @@ -123,7 +123,7 @@ DupPrivPKeyPtr(VALUE obj) { EVP_PKEY *pkey; - + if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) { ossl_raise(rb_eArgError, "Private key is needed."); } @@ -216,19 +216,19 @@ #endif mPKey = rb_define_module_under(mOSSL, "PKey"); - + ePKeyError = rb_define_class_under(mPKey, "PKeyError", eOSSLError); cPKey = rb_define_class_under(mPKey, "PKey", rb_cObject); - + rb_define_alloc_func(cPKey, ossl_pkey_alloc); rb_define_method(cPKey, "initialize", ossl_pkey_initialize, 0); rb_define_method(cPKey, "sign", ossl_pkey_sign, 2); rb_define_method(cPKey, "verify", ossl_pkey_verify, 3); - + id_private_q = rb_intern("private?"); - + /* * INIT rsa, dsa, dh, ec */ Index: ext/openssl/ossl_pkey_dh.c =================================================================== --- ext/openssl/ossl_pkey_dh.c (revision 27439) +++ ext/openssl/ossl_pkey_dh.c (revision 27440) @@ -42,7 +42,7 @@ { EVP_PKEY *pkey; VALUE obj; - + if (!dh) { return Qfalse; } @@ -114,7 +114,7 @@ DH *dh ; int g = 2; VALUE size, gen, obj; - + if (rb_scan_args(argc, argv, "11", &size, &gen) == 2) { g = NUM2INT(gen); } @@ -208,7 +208,7 @@ EVP_PKEY *pkey; GetPKeyDH(self, pkey); - + return (DH_PRIVATE(pkey->pkey.dh)) ? Qtrue : Qfalse; } @@ -328,7 +328,7 @@ EVP_PKEY *pkey; DH *dh; VALUE obj; - + GetPKeyDH(self, pkey); dh = DHparams_dup(pkey->pkey.dh); /* err check perfomed by dh_instance */ obj = dh_instance(CLASS_OF(self), dh); Index: ext/openssl/ossl_x509cert.c =================================================================== --- ext/openssl/ossl_x509cert.c (revision 27439) +++ ext/openssl/ossl_x509cert.c (revision 27440) @@ -51,7 +51,7 @@ ossl_raise(eX509CertError, NULL); } WrapX509(cX509Cert, obj, new); - + return obj; } @@ -90,9 +90,9 @@ GetX509CertPtr(VALUE obj) { X509 *x509; - + SafeGetX509(obj, x509); - + return x509; } @@ -100,11 +100,11 @@ DupX509CertPtr(VALUE obj) { X509 *x509; - + SafeGetX509(obj, x509); - + CRYPTO_add(&x509->references, 1, CRYPTO_LOCK_X509); - + return x509; } @@ -160,7 +160,7 @@ ossl_x509_copy(VALUE self, VALUE other) { X509 *a, *b, *x509; - + rb_check_frozen(self); if (self == other) return self; @@ -210,7 +210,7 @@ X509 *x509; BIO *out; VALUE str; - + GetX509(self, x509); out = BIO_new(BIO_s_mem()); if (!out) ossl_raise(eX509CertError, NULL); @@ -234,7 +234,7 @@ X509 *x509; BIO *out; VALUE str; - + GetX509(self, x509); out = BIO_new(BIO_s_mem()); @@ -281,7 +281,7 @@ X509 *x509; GetX509(self, x509); - + return LONG2NUM(X509_get_version(x509)); } @@ -316,7 +316,7 @@ X509 *x509; GetX509(self, x509); - + return asn1integer_to_num(X509_get_serialNumber(x509)); } @@ -333,7 +333,7 @@ x509->cert_info->serialNumber = num_to_asn1integer(num, X509_get_serialNumber(x509)); - + return num; } @@ -370,7 +370,7 @@ { X509 *x509; X509_NAME *name; - + GetX509(self, x509); if (!(name = X509_get_subject_name(x509))) { /* NO DUP - don't free! */ ossl_raise(eX509CertError, NULL); @@ -387,7 +387,7 @@ ossl_x509_set_subject(VALUE self, VALUE subject) { X509 *x509; - + GetX509(self, x509); if (!X509_set_subject_name(x509, GetX509NamePtr(subject))) { /* DUPs name */ ossl_raise(eX509CertError, NULL); @@ -458,7 +458,7 @@ { X509 *x509; time_t sec; - + sec = time_to_time_t(time); GetX509(self, x509); if (!X509_time_adj(X509_get_notBefore(x509), 0, &sec)) { @@ -495,7 +495,7 @@ { X509 *x509; time_t sec; - + sec = time_to_time_t(time); GetX509(self, x509); if (!X509_time_adj(X509_get_notAfter(x509), 0, &sec)) { @@ -597,7 +597,7 @@ { X509 *x509; EVP_PKEY *pkey; - + /* not needed private key, but should be */ pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */ GetX509(self, x509); @@ -645,7 +645,7 @@ X509 *x509; X509_EXTENSION *ext; int i; - + Check_Type(ary, T_ARRAY); /* All ary's members should be X509Extension */ for (i=0; i<RARRAY_LEN(ary); i++) { @@ -656,7 +656,7 @@ x509->cert_info->extensions = NULL; for (i=0; i<RARRAY_LEN(ary); i++) { ext = DupX509ExtPtr(RARRAY_PTR(ary)[i]); - + if (!X509_add_ext(x509, ext, -1)) { /* DUPs ext - FREE it */ X509_EXTENSION_free(ext); ossl_raise(eX509CertError, NULL); @@ -676,7 +676,7 @@ { X509 *x509; X509_EXTENSION *ext; - + GetX509(self, x509); ext = DupX509ExtPtr(extension); if (!X509_add_ext(x509, ext, -1)) { /* DUPs ext - FREE it */ @@ -729,9 +729,9 @@ Init_ossl_x509cert() { eX509CertError = rb_define_class_under(mX509, "CertificateError", eOSSLError); - + cX509Cert = rb_define_class_under(mX509, "Certificate", rb_cObject); - + rb_define_alloc_func(cX509Cert, ossl_x509_alloc); rb_define_method(cX509Cert, "initialize", ossl_x509_initialize, -1); rb_define_copy_func(cX509Cert, ossl_x509_copy); Index: ext/openssl/ossl_rand.c =================================================================== --- ext/openssl/ossl_rand.c (revision 27439) +++ ext/openssl/ossl_rand.c (revision 27440) @@ -65,7 +65,7 @@ ossl_rand_load_file(VALUE self, VALUE filename) { SafeStringValue(filename); - + if(!RAND_load_file(RSTRING_PTR(filename), -1)) { ossl_raise(eRandomError, NULL); } @@ -134,7 +134,7 @@ ossl_rand_egd(VALUE self, VALUE filename) { SafeStringValue(filename); - + if(!RAND_egd(RSTRING_PTR(filename))) { ossl_raise(eRandomError, NULL); } @@ -186,9 +186,9 @@ #endif mRandom = rb_define_module_under(mOSSL, "Random"); - + eRandomError = rb_define_class_under(mRandom, "RandomError", eOSSLError); - + DEFMETH(mRandom, "seed", ossl_rand_seed, 1); DEFMETH(mRandom, "random_add", ossl_rand_add, 2); DEFMETH(mRandom, "load_random_file", ossl_rand_load_file, 1); @@ -196,7 +196,7 @@ DEFMETH(mRandom, "random_bytes", ossl_rand_bytes, 1); DEFMETH(mRandom, "pseudo_bytes", ossl_rand_pseudo_bytes, 1); DEFMETH(mRandom, "egd", ossl_rand_egd, 1); - DEFMETH(mRandom, "egd_bytes", ossl_rand_egd_bytes, 2); + DEFMETH(mRandom, "egd_bytes", ossl_rand_egd_bytes, 2); DEFMETH(mRandom, "status?", ossl_rand_status, 0) } Index: ext/openssl/ossl_x509revoked.c =================================================================== --- ext/openssl/ossl_x509revoked.c (revision 27439) +++ ext/openssl/ossl_x509revoked.c (revision 27440) @@ -117,7 +117,7 @@ ossl_x509revoked_get_time(VALUE self) { X509_REVOKED *rev; - + GetX509Rev(self, rev); return asn1time_to_time(rev->revocationDate); @@ -214,10 +214,10 @@ eX509RevError = rb_define_class_under(mX509, "RevokedError", eOSSLError); cX509Rev = rb_define_class_under(mX509, "Revoked", rb_cObject); - + rb_define_alloc_func(cX509Rev, ossl_x509revoked_alloc); rb_define_method(cX509Rev, "initialize", ossl_x509revoked_initialize, -1); - + rb_define_method(cX509Rev, "serial", ossl_x509revoked_get_serial, 0); rb_define_method(cX509Rev, "serial=", ossl_x509revoked_set_serial, 1); rb_define_method(cX509Rev, "time", ossl_x509revoked_get_time, 0); Index: ext/openssl/ossl_x509ext.c =================================================================== --- ext/openssl/ossl_x509ext.c (revision 27439) +++ ext/openssl/ossl_x509ext.c (revision 27440) @@ -64,7 +64,7 @@ ossl_raise(eX509ExtError, NULL); } WrapX509Ext(cX509Ext, obj, new); - + return obj; } @@ -186,7 +186,7 @@ { /*X509V3_CTX *ctx;*/ VALUE issuer_cert, subject_cert, subject_req, crl; - + /*GetX509ExtFactory(self, ctx);*/ rb_scan_args(argc, argv, "04", @@ -429,10 +429,10 @@ eX509ExtError = rb_define_class_under(mX509, "ExtensionError", eOSSLError); cX509ExtFactory = rb_define_class_under(mX509, "ExtensionFactory", rb_cObject); - + rb_define_alloc_func(cX509ExtFactory, ossl_x509extfactory_alloc); rb_define_method(cX509ExtFactory, "initialize", ossl_x509extfactory_initialize, -1); - + rb_attr(cX509ExtFactory, rb_intern("issuer_certificate"), 1, 0, Qfalse); rb_attr(cX509ExtFactory, rb_intern("subject_certificate"), 1, 0, Qfalse); rb_attr(cX509ExtFactory, rb_intern("subject_request"), 1, 0, Qfalse); @@ -445,7 +445,7 @@ rb_define_method(cX509ExtFactory, "crl=", ossl_x509extfactory_set_crl, 1); rb_define_method(cX509ExtFactory, "config=", ossl_x509extfactory_set_config, 1); rb_define_method(cX509ExtFactory, "create_ext", ossl_x509extfactory_create_ext, -1); - + cX509Ext = rb_define_class_under(mX509, "Extension", rb_cObject); rb_define_alloc_func(cX509Ext, ossl_x509ext_alloc); rb_define_method(cX509Ext, "initialize", ossl_x509ext_initialize, -1); Index: ext/openssl/ossl_pkcs7.c =================================================================== --- ext/openssl/ossl_pkcs7.c (revision 27439) +++ ext/openssl/ossl_pkcs7.c (revision 27440) @@ -97,7 +97,7 @@ DupPKCS7SignerPtr(VALUE obj) { PKCS7_SIGNER_INFO *p7si, *pkcs7; - + SafeGetPKCS7si(obj, p7si); if (!(pkcs7 = PKCS7_SIGNER_INFO_dup(p7si))) { ossl_raise(ePKCS7Error, NULL); @@ -123,7 +123,7 @@ DupPKCS7RecipientPtr(VALUE obj) { PKCS7_RECIP_INFO *p7ri, *pkcs7; - + SafeGetPKCS7ri(obj, p7ri); if (!(pkcs7 = PKCS7_RECIP_INFO_dup(p7ri))) { ossl_raise(ePKCS7Error, NULL); @@ -814,7 +814,7 @@ PKCS7 *pkcs7; BIO *out; VALUE str; - + GetPKCS7(self, pkcs7); if (!(out = BIO_new(BIO_s_mem()))) { ossl_raise(ePKCS7Error, NULL); @@ -889,9 +889,9 @@ { PKCS7_SIGNER_INFO *p7si; ASN1_TYPE *asn1obj; - + GetPKCS7si(self, p7si); - + if (!(asn1obj = PKCS7_get_signed_attribute(p7si, NID_pkcs9_signingTime))) { ossl_raise(ePKCS7Error, NULL); } Index: ext/socket/getaddrinfo.c =================================================================== --- ext/socket/getaddrinfo.c (revision 27439) +++ ext/socket/getaddrinfo.c (revision 27440) @@ -114,7 +114,7 @@ int a_socklen; int a_off; const char *a_addrany; - const char *a_loopback; + const char *a_loopback; } afdl [] = { #ifdef INET6 #define N_INET6 0 @@ -145,7 +145,7 @@ static int get_addr __P((const char *, int, struct addrinfo **, struct addrinfo *, int)); static int str_isnumber __P((const char *)); - + static const char *const ai_errlist[] = { "success.", "address family for hostname not supported.", /* EAI_ADDRFAMILY */ @@ -302,7 +302,7 @@ pai->ai_addr = NULL; pai->ai_next = NULL; port = ANY; - + if (hostname == NULL && servname == NULL) return EAI_NONAME; if (hints) { @@ -409,7 +409,7 @@ ERR(EAI_PROTOCOL); /*xxx*/ } } - + /* * hostname == NULL. * passive socket -> anyaddr (0.0.0.0 or ::) @@ -458,7 +458,7 @@ else ERR(EAI_FAMILY); } - + /* hostname as numeric name */ for (i = 0; afdl[i].a_af; i++) { if (inet_pton(afdl[i].a_af, hostname, pton)) { @@ -484,7 +484,7 @@ break; #endif } - + if (pai->ai_family == afdl[i].a_af || pai->ai_family == PF_UNSPEC) { if (! (pai->ai_flags & AI_CANONNAME)) { @@ -549,7 +549,7 @@ GET_CANONNAME(cur, hp->h_name); } else GET_AI(cur, afd, numaddr, port); - + #ifdef INET6 if (hp) freehostent(hp); @@ -612,7 +612,7 @@ if ((hp->h_name == NULL) || (hp->h_name[0] == 0) || (hp->h_addr_list[0] == NULL)) ERR(EAI_FAIL); - + for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) { switch (af) { #ifdef INET6 Index: ext/socket/getnameinfo.c =================================================================== --- ext/socket/getnameinfo.c (revision 27439) +++ ext/socket/getnameinfo.c (revision 27440) @@ -156,7 +156,7 @@ len = SA_LEN(sa); if (len != salen) return ENI_SALEN; - + family = sa->sa_family; for (i = 0; afdl[i].a_af; i++) if (afdl[i].a_af == family) { @@ -164,10 +164,10 @@ goto found; } return ENI_FAMILY; - + found: if (len != afd->a_socklen) return ENI_SALEN; - + port = ((struct sockinet *)sa)->si_port; /* network byte order */ addr = (char *)sa + afd->a_off; @@ -199,7 +199,7 @@ flags |= NI_NUMERICHOST; v4a >>= IN_CLASSA_NSHIFT; if (v4a == 0) - flags |= NI_NUMERICHOST; + flags |= NI_NUMERICHOST; break; #ifdef INET6 case AF_INET6: -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/