From: Jamis Buck Date: 2004-06-14T21:29:47+09:00 Subject: Re: OpenSSL: patch GOTOU Yuuzou wrote: > In message <40CCE7F9.2050500@email.byu.edu>, > `Jamis Buck ' wrote: > >>GOTOU Yuuzou wrote: >> >>>But a question. In ossl_pkey_dh.c, you made >>>dh_bignum_accessors without using OSSL_PKEY_BN and >>>DEF_OSSL_PKEY_BN. Does these macro have any problem? >> >>Hah! Forget I did that. I wrote those before I discovered the >>OSSL_PKEY_BN macros. I discovered them later and then used them (in the >>rsa and dsa modules). If you'd like, I'll fix the ossl_pkey_dh.c file >>and resubmit the patch. Let me know. > > > I did it. No need to re-post. One other thing: I was advised off-list that the "crypt" method I added is unecessary, and I have verified that this is true. My problem was that I was not setting the padding. By setting the padding on the cipher to 0, I can use update/final without any problems. I.e.: c = OpenSSL::Cipher::Cipher.new(...) c.encrypt c.key = ... c.iv = ... c.padding = 0 # <-- this is what I was missing v = c.update( .... ) << c.final p v So... if you haven't already applied the patch, I can send you another one. Or you can just remove the definition of that "crypt" method I added. -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis ruby -h | ruby -e 'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a << r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'