Thank you for you quick response :).

But passing in passwords with '-passin file:somthing.txt' causes problems with 
newlines in password.
Openssl read only first line :( and that will trun the NULL-byte-problem to a 
NEWLINE-problem.

Any other suggestions?

Thanks in advance :)

  Fabian


> You can make openssl to read password from file:
>
> -passin file:something.txt
>
> Should to the trick
>
> Regards,
> Grzegorz
>
> On Sat, Mar 1, 2008 at 7:49 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> Hello
>>
>>  I've got problems to decrypt a PKCS8 encrypted private-key with the
>>  openssl-application (not library), because the password is binary and
>>  contains NULL-bytes (0x00).
>>  The PKCS8-object is valid.
>>
>>  sample-password:  (hex) '0A 0B 91 00 17 F4 8E 4D FA BD 31 3D 72 43 ED A1'
>>
>>  sample-cmd:
>>   > passwd=cat 'binary_password_file.bin'  (cat as example, also ussed
>>  other ways)
>>   > export passwd
>>   > openssl pkcs8 -in filename.pkcs8 -inform DER -passin env:passwd
>>  -outform DER
>>
>>  (Using '-passin file:passwdfile' or '-passin stdin' causes problems with
>>  0x0A, cause these options read only the first line)
>>
>>  Platforms: Windows and Unix and I prefer not to write a C-programm to
>>  use openssl-library.
>>
>>
>>  Can anyone help me to decrypt a pkcs8-encrypted rsa-key, using a
>>  password, which contains NULL-Bytes ... please :)?
>>
>>  thx
>>     Fabian
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to