[openssl-users] File signing/encrypting upgrade from 1.0.2 to 1.1.0

Jan Kohnert nospam001-lists at jan-kohnert.de
Tue Mar 27 17:36:58 UTC 2018


Am Sat, 24 Mar 2018 01:22:21 +0100
schrieb Jan Kohnert <nospam001-lists at jan-kohnert.de>:

> Am Fri, 23 Mar 2018 21:22:02 +0000
> schrieb Matt Caswell <matt at openssl.org>:
> > Also what happens if you change this line:
> > 
> >    bioCryptedData = BIO_new_file("testfile.crypt", "w");
> > 
> > to
> > 
> >    bioCryptedData = BIO_new_file("testfile.crypt", "wb");  
> good point, thanks. I'll test that on Monday and report back.

That one works for the encryption part,however, the signing is still
broken. Here's what I get trying to verify the decrypted generated file:

D:\Develop\TestCrypt\build>openssl smime -decrypt -inform DER -in
testfile.crypt -out testfile.sig -inkey local.key

D:\Develop\TestCrypt\build>openssl smime -verify -inform DER -in
testfile.sig -out testfile.txt_neu -CAfile local.cert
Error reading S/MIME message
4404:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too
long:crypt o\asn1\asn1_lib.c:101:
4404:error:0D068066:asn1 encoding routines:asn1_check_tlen:bad object
header:cry pto\asn1\tasn_dec.c:1100:
4404:error:0D08303A:asn1 encoding
routines:asn1_template_noexp_d2i:nested asn1
error:crypto\asn1\tasn_dec.c:536:Field=cert, Type=PKCS7_SIGNED
4404:error:0D08303A:asn1 encoding
routines:asn1_template_noexp_d2i:nested asn1
error:crypto\asn1\tasn_dec.c:609: 4404:error:0D08403A:asn1 encoding
routines:asn1_template_ex_d2i:nested asn1
error:crypto\asn1\tasn_dec.c:460:Field=d.sign, Type=PKCS7


Best regards Jan

More information about the openssl-users mailing list