Hello Mr. Henson,

> I suggest you try the latest 0.9.7 snapshots first.

I tried several releases of 0.9.7 since January 2003. It's always the same problem. 
Now I'm using the Snapshot 20030717. The problem occurs also, when library and program 
are compiled with Sun CC on another Solaris64 machine.
 
> Are you really calling:
> 
> d2i_PKCS12_bio("test.p12",NULL)??

Oops, of course not. I'm calling BIO_new_file first.
 
> I don't have access to Solaris 64 so I can't try it myself.

But I can try...

> the value of ctx->ciper->ctx_size

384

> However if you could a stack trace when it crashes, also 

core file = core -- program ``dspwd'' on platform SUNW,Ultra-1
SIGSEGV: Segmentation Fault
$c
libc.so.1`realfree+0x70(1001da280, 1001da0f0, 342c636e3d442d50, 1001bf400, 
100000000, 1bf400)
libc.so.1`_malloc_unlocked+0x274(180, ffffffff7efb4ee0, 11333c, 0, 10002debc, 0
)
libc.so.1`malloc+0x20(180, 1, 1, 1001bf400, 100000000, 1bf400)
default_malloc_ex+0x1c(180, 1000a2660, 97, 100000000, 1001bf400, 10001bf60)
CRYPTO_malloc+0x74(1bf400, 1000a2660, 97, 80, 100000000, 1)
EVP_CipherInit_ex+0xb4(ffffffff7fffebb0, 1000a28b0, a2400, ffffffff7fffe980, 
ffffffff7fffe970, 0)
PKCS12_PBE_keyivgen+0x178(ffffffff7fffebb0, 8, 6, 0, 1000a28b0, 1000a2ce8)
EVP_PBE_CipherInit+0x7c(1001d7c40, ffffffff7ffff5e8, 6, 1001d9bf0, 10003ce80, 0
)
PKCS12_pbe_crypt+0x2c(1001d9bb0, ffffffff7ffff5e8, ffffffffffffffff, 1001dc9b0, 
280, ffffffff7fffed40)
PKCS12_item_decrypt_d2i+0x24(1001d9bb0, 1000a5e10, ffffffff7ffff5e8, 
ffffffffffffffff, 1001f82e0, 1)
parse_bag+0x20c(0, ffffffff7ffff5e8, ffffffffffffffff, ffffffff7ffff178, 
ffffffff7ffff170, 0)
parse_bags+0x50(0, ffffffff7ffff5e8, ffffffffffffffff, ffffffff7ffff178, 
ffffffff7ffff170, 0)
parse_pk12+0xb4(1001f8010, ffffffff7ffff5e8, ffffffffffffffff, ffffffff7ffff178
, ffffffff7ffff170, 0)
PKCS12_parse+0x78(1001f35f0, ffffffff7ffff5e8, ffffffff7ffff178, 
ffffffff7ffff170, 0, 9d400)
main+0x14c(ffffffff7ffff5e8, ffffffff7ffff358, ffffffff7ffff378, 1001d51d0, 
100000000, 0)
_start+0x7c(0, 0, 0, 0, 0, 0)


There are more intresting information I can provide now:

When I call:
PKCS12_parse(pkcs12,"123456",&tmpKey,NULL,NULL)  

_xor_

PKCS12_parse(pkcs12,"123456",NULL,&tmpCert,NULL) 

there will be no segmentation fault.


When I call

PKCS12_parse(pkcs12,"123456",&tmpKey,NULL,NULL) 

_and_

PKCS12_parse(pkcs12,"123456",NULL,&tmpCert,NULL) 

there will be a segmentation fault with following stacktrace:

core file = core -- program ``dspwd'' on platform SUNW,Ultra-1
SIGSEGV: Segmentation Fault
$c
libc.so.1`realfree+0x70(1001d9ef0, ffffffff7efb4ee0, f, 1000a58f8, 0, 100064f80
)
libc.so.1`cleanfree+0x5c(0, 1001f9610, 90, 1001d9870, 1000a26b8, 1000a2af0)
libc.so.1`_malloc_unlocked+0x10c(10, ffffffff7efb4ee0, 6, 1001d9870, 10003cce0, 
0)
libc.so.1`malloc+0x20(10, 3, 1, ffffffff7f7242d0, ffffffff7f621200, 4)
default_malloc_ex+0x1c(10, 1000a4008, aa, 100000000, 1001bf400, 10001bdc0)
CRYPTO_malloc+0x74(1bf400, 1000a4008, aa, 0, 100000000, 1)
asn1_item_ex_combine_new+0x1f8(ffffffff7fffe838, 1000a58f8, 0, ffffffff7fffe74f
, ffffffff7fffe74e, ffffffff7fffe750)
ASN1_item_ex_d2i+0x578(ffffffff7fffe838, ffffffff7fffe948, 0, 1000a58f8, 10, 0)
ASN1_item_d2i+0x34(ffffffff7fffe838, ffffffff7fffe948, f, 1000a58f8, 0, 
100064f80)
PKCS12_PBE_keyivgen+0x5c(ffffffff7fffeb90, ffffffff7ffff5c0, 6, 1001d9870, 
1000a26b8, 1000a2af0)
EVP_PBE_CipherInit+0x7c(1001d7940, ffffffff7ffff5c0, 6, 1001d9870, 10003cce0, 0
)
PKCS12_pbe_crypt+0x2c(1001d9a50, ffffffff7ffff5c0, ffffffffffffffff, 1001dc7b0, 
280, ffffffff7fffed20)
PKCS12_item_decrypt_d2i+0x24(1001d9a50, 1000a5c18, ffffffff7ffff5c0, 
ffffffffffffffff, 1001f8230, 1)
parse_bag+0x20c(0, ffffffff7ffff5c0, ffffffffffffffff, ffffffff7ffff140, 0, 0)
parse_bags+0x50(0, ffffffff7ffff5c0, ffffffffffffffff, ffffffff7ffff140, 0, 0)
parse_pk12+0xb4(1001f8260, ffffffff7ffff5c0, ffffffffffffffff, ffffffff7ffff140
, 0, 0)
PKCS12_parse+0x78(1001f33f0, ffffffff7ffff5c0, ffffffff7ffff140, 0, 0, 10009d518
)
main+0x170(1001f33f0, ffffffff7ffff328, ffffffff7ffff348, 1001d4fd0, 100000000, 
0)
_start+0x7c(0, 0, 0, 0, 0, 0)


Best regards,
Stephan Collet
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to