[Pkg-openssl-devel] Bug#790883: enc -d -base64 doesn't work when there's no final \n

Jean-Michel Vourgère nirgal at debian.org
Thu Jul 2 16:16:24 UTC 2015


Package: openssl
Version: 1.0.1k-3+deb8u1
Severity: minor

Hello

When trying to decode a simple 44 character base64 text, I get errors like
error reading input file
unless I append a \n at the end of the string.

You can reproduce the issue with:
echo -n U2FsdGVkX1+eutlR490O+0HBLNL19kT2jiUb4RxLxhQ= | openssl enc -aes-256-cbc -pass pass:bar -d -base64

I expected openssl to ignore all space character since they are not part of the base64 alphabet.
I can add spaces and \n anywhere in the encoded string. This is weird the last line is a special case.

I know a base64 file should be \n-terminated.
But I belive openssl should be handle to handle file or pipes who are not.

Thanks.


-- System Information:
Debian Release: 8.1
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages openssl depends on:
ii  libc6        2.19-18
ii  libssl1.0.0  1.0.2c-1

openssl recommends no packages.

Versions of packages openssl suggests:
ii  ca-certificates  20141019

-- debconf-show failed



More information about the Pkg-openssl-devel mailing list