We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Good catch -- thank you! That now works in the example I provided.
The ironic thing is that I introduced the bug you found when moving to the shorter example; it's not in the original. The original code is much longer, and within a module I'm writing to handle SSH handshaking between a Client and remote Server. Both the original program and the example have the same symptoms though; the error message is the same. So I've got some work to do... I now have a working (finally!) example, and a longer program with the error. I'll work at it from both ends, and post what I find here. Ideally I did something else stupid in the original, and it'll be easy to find and fix. Edit: Found it. Well, it was not as stupid as the short example perhaps. I wasn't getting the same data over the socket that I was sending. I kludged up some routines to calculate an md5sum on the data at different stages, and realized that, differing from what I believed about MIME::Base64, the encode_base64() method was inserting newline into the string. (I know my example didn't show the encode_base64() and decode_base64 methods(), but that was because I was getting the error without them). So I went back to the docs for MIME::Base64 and found: When I changed the $eol char from "\n" to "", the Client was able to get the full string, and it fixed the problem. :D In reply to Re^2: Errors in Crypt::OpenSSL::RSA (from 'RSA.xs')
by golux
|
|