From: "Martin Boßlet" Date: 2012-12-20T16:45:44+09:00 Subject: [ruby-core:51008] Re: [ruby-trunk - Feature #6946] FIPS support? --f46d04088e11f646b604d143ea90 Content-Type: text/plain; charset=ISO-8859-1 Thanks, I fixed it already - I used roughly the same approach as usa :) 2012/12/20 U.Nakamura > Hello, > > In message "[ruby-core:51006] Re: [ruby-trunk - Feature #6946] FIPS > support?" > on Dec.20,2012 16:32:23, wrote: > > No, I forgot to #ifdef... sorry! Fixing... > > here is a patch. > > Index: ext/openssl/ossl_cipher.c > =================================================================== > --- ext/openssl/ossl_cipher.c (revision 38491) > +++ ext/openssl/ossl_cipher.c (working copy) > @@ -482,6 +482,7 @@ ossl_cipher_set_iv(VALUE self, VALUE iv) > return iv; > } > > +#ifdef EVP_CTRL_GCM_GET_TAG > /* > * call-seq: > * cipher.auth_data = string -> string > @@ -644,6 +645,12 @@ ossl_cipher_is_authenticated(VALUE self) > return Qfalse; > } > } > +#else /* EVP_CTRL_GCM_GET_TAG */ > +# define ossl_cipher_set_auth_data rb_f_notimplement > +# define ossl_cipher_set_auth_tag rb_f_notimplement > +# define ossl_cipher_get_auth_tag rb_f_notimplement > +# define ossl_cipher_is_authenticated rb_f_notimplement > +#endif /* EVP_CTRL_GCM_GET_TAG */ > > /* > * call-seq: > > Regards, > -- > U.Nakamura > > > --f46d04088e11f646b604d143ea90 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks, I fixed it already - I used roughly the same appro= ach as usa :)


2012/12/20 U.Nakamura <usa@garbagecollect.jp>
Hello,

In message "[ruby-core:51006] Re: [ruby-trunk - Feature #6946] FIPS su= pport?"
=A0 =A0 on Dec.20,2012 16:32:23, <martin.bosslet@gmail.com> wrote:
> No, I forgot to #ifdef... sorry! Fixing...

here is a patch.

Index: ext/openssl/ossl_cipher.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- ext/openssl/ossl_cipher.c =A0 (revision 38491)
+++ ext/openssl/ossl_cipher.c =A0 (working copy)
@@ -482,6 +482,7 @@ ossl_cipher_set_iv(VALUE self, VALUE iv)
=A0 =A0 =A0return iv;
=A0}

+#ifdef EVP_CTRL_GCM_GET_TAG
=A0/*
=A0 * =A0call-seq:
=A0 * =A0 =A0 cipher.auth_data =3D string -> string
@@ -644,6 +645,12 @@ ossl_cipher_is_authenticated(VALUE self)
=A0 =A0 =A0 =A0 return Qfalse;
=A0 =A0 =A0}
=A0}
+#else /* EVP_CTRL_GCM_GET_TAG */
+# define ossl_cipher_set_auth_data rb_f_notimplement
+# define ossl_cipher_set_auth_tag rb_f_notimplement
+# define ossl_cipher_get_auth_tag rb_f_notimplement
+# define ossl_cipher_is_authenticated rb_f_notimplement
+#endif /* EVP_CTRL_GCM_GET_TAG */

=A0/*
=A0 * =A0call-seq:

Regards,
--
U.Nakamura <usa@garbagecollect.= jp>



--f46d04088e11f646b604d143ea90--