i have .p12 (pkcs#12) certificate file imports on xp machines, not on others.
the file contains tree of certificates (see below).
on failing machine mentions error:
certutil: -importpfx command failed: 0x80070002 (win32: 2)
certutil: system cannot find file specified.
what might cause error?
machine works:
c:\post-install-scripts>certutil -v -f -user -p "example" -importpfx "client.p12" "noexport" 402.203.0: 0x80070057 (win32: 87): ..certcli version host.example.nl -- host.example.nl-e493af87-491e-4c3-55290 host.example.nl -- host.example.nl-e493af87-491e-4c37-9c4d-5a183f833394 420.62.0: 0x80090016 (-2146893802): microsoft base cryptographic provider v1.0 420.69.0: 0x80090016 (-2146893802): host.example.nl-e493af87-491e-4c37-9c4d-5a183f833394 certificate "cn=host.example.nl, o=example, l=location, c=nl" added store.
machine fails:
c:\post-install-scripts>certutil -v -f -user -p "example" -importpfx "client.p12" "noexport" 402.203.0: 0x80070057 (win32: 87): ..certcli version 419.3569.0: 0x80070002 (win32: 2) 313.3884.0: 0x80070002 (win32: 2) 313.4100.0: 0x80070002 (win32: 2) certutil: -importpfx command failed: 0x80070002 (win32: 2) certutil: system cannot find file specified. 301.3160.0: 0x80070002 (win32: 2)
this dump (anonymized) of content of .p12 file:
402.203.0: 0x80070057 (win32: 87): ..certcli version enter pfx password: ================ begin nesting level 1 ================ element 0: x509 certificate: version: 1 serial number: d06ed56ff319e9ec signature algorithm: algorithm objectid: 1.2.840.113549.1.1.5 sha1rsa algorithm parameters: 05 00 issuer: cn=www.example.com o=example l=city c=nl notbefore: 9/15/2010 2:48 pm notafter: 9/12/2020 2:48 pm subject: cn=www.example.com o=example l=city c=nl public key algorithm: algorithm objectid: 1.2.840.113549.1.1.1 rsa algorithm parameters: 05 00 public key length: 1024 bits public key: unusedbits = 0 ... certificate extensions: 0 signature algorithm: algorithm objectid: 1.2.840.113549.1.1.5 sha1rsa algorithm parameters: 05 00 signature: unusedbits=0 ... signature matches public key root certificate: subject matches issuer key id hash(sha1): 02 bb 29 62 94 d9 55 9a ee 56 b6 c8 4c 85 08 d3 90 c1 84 76 cert hash(md5): 27 10 47 3d 7f 59 09 da 33 54 a7 94 7f e1 ed 5d cert hash(sha1): 73 c9 08 d9 8d 77 dd 2f 05 bf d0 3e eb e4 81 ee 31 35 b9 b2 ---------------- end nesting level 1 ---------------- no key provider information ================ begin nesting level 1 ================ element 1: x509 certificate: version: 1 serial number: 91397ea5dbedfc9b signature algorithm: algorithm objectid: 1.2.840.113549.1.1.5 sha1rsa algorithm parameters: 05 00 issuer: cn=www.example.com o=example l=city c=nl notbefore: 9/15/2010 5:23 pm notafter: 9/12/2020 5:23 pm subject: cn=host.example.com o=example l=city c=nl public key algorithm: algorithm objectid: 1.2.840.113549.1.1.1 rsa algorithm parameters: 05 00 public key length: 1024 bits public key: unusedbits = 0 ... certificate extensions: 0 signature algorithm: algorithm objectid: 1.2.840.113549.1.1.5 sha1rsa algorithm parameters: 05 00 signature: unusedbits=0 ... non-root certificate key id hash(sha1): 11 10 5d c3 23 4d 9c 1d 0a 19 2b 2b 5f dc 2a 86 1a 09 a2 12 cert hash(md5): 24 fd 20 2f 1b 30 14 71 06 fd 3f 9d 04 1b 27 76 cert hash(sha1): 38 95 21 12 50 5f 2a 93 a1 6d 06 e8 05 e1 df 8f 52 4b 69 09 ---------------- end nesting level 1 ---------------- key container = {cc1b726b-ef14-43b6-9291-d1fb4912cc2d} provider = microsoft base cryptographic provider v1.0 providertype = 1 flags = 0 keyspec = 1 56bb088658cc1061ec86f88101644b8a_5b2cf4f1-d502-4724-bb68-e4f4c0a3871d private key: privatekeyblob version: 2 aikeyalg: 0xa400 calg_rsa_keyx algorithm class: 0xa000(5) alg_class_key_exchange algorithm type: 0x400(2) alg_type_rsa algorithm sub-id: 0x0(0) alg_sid_rsa_any 0000 52 53 41 32 rsa2 0000 ... 024c certutil: -dump command completed successfully.
--jeroen
Comments
Post a Comment