[openssl-users] Use of command line openssl.exe

Marina Marina.Brusa at fastwebnet.it
Thu Apr 6 16:05:28 UTC 2017


Mr Victor , it works !!! You have taken me out of a great trouble !!! 
I'd image it could be easy but I could not understand how to do. 
Thanks a lot 

Marina 
(Milano , Italy) 
Viktor Dukhovni wrote
>> On Apr 5, 2017, at 6:23 AM, Marina <

> Marina.Brusa@

> > wrote:
>> 
>> I have been requested to fill a field  344 characters long with a crypted
>> string.
> 
> Why?
> 
>> My program uses a command to produce this string (cf.enc.b64),
>> starting from a string 16 char long (cf.inp)
>> 
>>    $ openssl rsautl -encrypt -in cf.inp -out CF.enc -inkey farma-fur.cer
>> -certin -pkcs
>>    $ openssl base64 -base64 -e -in cf.enc -out cf.enc.b64
>> 
>> I get a string with 6 '0x0A', and my length is 350! 
> 
> Those are newline characters.  The openssl base64 encoder output is
> chunked in lines of 64 characters each.  So for 344 bytes of base64
> output you'd expect 6 newlines.
> 
>> Is there some parameter to avoid these charachters?
> 
> Yes, the "-A" option to "openssl base64" suppresses the newlines.
> Your second command should be:
> 
>     $ openssl base64 -A -in cf.enc -out cf.enc.b64
> 
> The "-e" and "-base64" options are not needed (default behaviour of
> "base64").
> 
> -- 
> 	Viktor.
> 
> -- 
> openssl-users mailing list
> To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users





--
View this message in context: http://openssl.6102.n7.nabble.com/Use-of-command-line-openssl-exe-tp70350p70358.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.


More information about the openssl-users mailing list