Hi everyone,
I find the output of the openssl smime -decrypt is not the same with the
original one.
My OS is Fedora 10 and the openssl version is 0.9.8g.
I use the following command to get the encrypt version of the file a.txt
# openssl smime -encrypt -in a.txt -out b.txt mycert.pem
and try to use the following command to the paintext from the b.txt to c.txt
# openssl smime -decrypt -in b.txt -out c.txt -recip mycert.pem -inkey
priv.key
The following is the hex dump and from the dump we can see that 0a
become 0d0a.
I think that should be a problem in the linux systems.
# xxd a.txt
0000000: 6269 6e0a 626f 6f74 0a64 6576 0a65 7463 bin.boot.dev.etc
0000010: 0a65 7670 5f70 6b63 7331 315f 7465 7374 .evp_pkcs11_test
0000020: 2e63 0a68 6f6d 650a 6c69 620a 6c6f 7374 .c.home.lib.lost
0000030: 2b66 6f75 6e64 0a6d 6564 6961 0a6d 6973 +found.media.mis
0000040: 630a 6d6e 740a 6e65 740a 6f70 740a 7065 c.mnt.net.opt.pe
0000050: 7273 6f6e 616c 0a70 726f 630a 726f 6f74 rsonal.proc.root
0000060: 0a73 6269 6e0a 7365 6c69 6e75 780a 7372 .sbin.selinux.sr
0000070: 760a 7379 730a 746d 700a 7479 7065 7363 v.sys.tmp.typesc
0000080: 7269 7074 0a75 7372 0a76 6172 0a77 730a ript.usr.var.ws.
[r...@amadis mykey]# xxd c.txt
0000000: 6269 6e0d 0a62 6f6f 740d 0a64 6576 0d0a bin..boot..dev..
0000010: 6574 630d 0a65 7670 5f70 6b63 7331 315f etc..evp_pkcs11_
0000020: 7465 7374 2e63 0d0a 686f 6d65 0d0a 6c69 test.c..home..li
0000030: 620d 0a6c 6f73 742b 666f 756e 640d 0a6d b..lost+found..m
0000040: 6564 6961 0d0a 6d69 7363 0d0a 6d6e 740d edia..misc..mnt.
0000050: 0a6e 6574 0d0a 6f70 740d 0a70 6572 736f .net..opt..perso
0000060: 6e61 6c0d 0a70 726f 630d 0a72 6f6f 740d nal..proc..root.
0000070: 0a73 6269 6e0d 0a73 656c 696e 7578 0d0a .sbin..selinux..
0000080: 7372 760d 0a73 7973 0d0a 746d 700d 0a74 srv..sys..tmp..t
0000090: 7970 6573 6372 6970 740d 0a75 7372 0d0a ypescript..usr..
00000a0: 7661 720d 0a77 730d 0a var..ws..
thanks,
-Derek
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org