1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/openssl/openssl_missing.c, ext/openssl/ossl.h,

ext/openssl/ossl_asn1.c, ext/openssl/ossl_bio.c,
  ext/openssl/ossl_pkcs12.h, ext/openssl/ossl_x509req.c: avoid
  compiler warnings. suggested by Mical Rokos.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
gotoyuzo 2005-06-19 16:29:17 +00:00
parent e9b5f96b06
commit 36d6603e5f
6 changed files with 16 additions and 5 deletions

View file

@ -1,3 +1,10 @@
Mon Jun 20 01:26:49 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/openssl_missing.c, ext/openssl/ossl.h,
ext/openssl/ossl_asn1.c, ext/openssl/ossl_bio.c,
ext/openssl/ossl_pkcs12.h, ext/openssl/ossl_x509req.c: avoid
compiler warnings. suggested by Mical Rokos.
Sun Jun 19 14:09:07 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> Sun Jun 19 14:09:07 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (run_final): reduce unnecessary object allocation during * gc.c (run_final): reduce unnecessary object allocation during

View file

@ -106,6 +106,9 @@ HMAC_CTX_cleanup(HMAC_CTX *ctx)
#endif #endif
#if !defined(HAVE_EVP_CIPHER_CTX_COPY) #if !defined(HAVE_EVP_CIPHER_CTX_COPY)
#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ST_ENGINE)
#include <openssl/engine.h>
#endif
/* /*
* this function does not exist in OpenSSL yet... or ever?. * this function does not exist in OpenSSL yet... or ever?.
* a future version may break this function. * a future version may break this function.

View file

@ -45,7 +45,7 @@ extern "C" {
#include <openssl/conf_api.h> #include <openssl/conf_api.h>
#undef X509_NAME #undef X509_NAME
#undef PKCS7_SIGNER_INFO #undef PKCS7_SIGNER_INFO
#if defined(HAVE_OPENSSL_ENGINE_H) && !defined(OPENSSL_NO_ENGINE) #if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ST_ENGINE)
# define OSSL_ENGINE_ENABLED # define OSSL_ENGINE_ENABLED
# include <openssl/engine.h> # include <openssl/engine.h>
#endif #endif

View file

@ -42,21 +42,19 @@ asn1time_to_time(ASN1_TIME *time)
} else { } else {
tm.tm_year += 1900; tm.tm_year += 1900;
} }
tm.tm_mon -= 1;
break; break;
case V_ASN1_GENERALIZEDTIME: case V_ASN1_GENERALIZEDTIME:
if (sscanf(time->data, "%4d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon, if (sscanf(time->data, "%4d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon,
&tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) { &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) {
ossl_raise(rb_eTypeError, "bad GENERALIZEDTIME format" ); ossl_raise(rb_eTypeError, "bad GENERALIZEDTIME format" );
} }
tm.tm_mon -= 1;
break; break;
default: default:
rb_warning("unknown time format"); rb_warning("unknown time format");
return Qnil; return Qnil;
} }
argv[0] = INT2NUM(tm.tm_year); argv[0] = INT2NUM(tm.tm_year);
argv[1] = INT2NUM(tm.tm_mon+1); argv[1] = INT2NUM(tm.tm_mon);
argv[2] = INT2NUM(tm.tm_mday); argv[2] = INT2NUM(tm.tm_mday);
argv[3] = INT2NUM(tm.tm_hour); argv[3] = INT2NUM(tm.tm_hour);
argv[4] = INT2NUM(tm.tm_min); argv[4] = INT2NUM(tm.tm_min);

View file

@ -9,6 +9,9 @@
* (See the file 'LICENCE'.) * (See the file 'LICENCE'.)
*/ */
#include "ossl.h" #include "ossl.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
BIO * BIO *
ossl_obj2bio(VALUE obj) ossl_obj2bio(VALUE obj)

View file

@ -4,7 +4,7 @@
* $Id$ * $Id$
*/ */
#if !defined(_OSSL_PKCS12_H_) #if !defined(_OSSL_PKCS12_H_)
#define _OSSL_PKCS7_H_ #define _OSSL_PKCS12_H_
extern VALUE mPKCS12; extern VALUE mPKCS12;
extern VALUE cPKCS12; extern VALUE cPKCS12;