[Bug 49144] Opening a PFX certificate in a dotnet application using X509Certificate2

WineHQ Bugzilla wine-bugs at winehq.org
Wed May 13 02:54:10 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=49144

--- Comment #6 from petrov_lv <petrov_lv at ekra.ru> ---
(In reply to Hans Leidekker from comment #3)

Thank you for the quick and helpful answers.

You are right, I did not provide access to the file. I gave access and the
program gave the following logs (DEBUG+crypto_dsa_key.log):
> 0024:fixme:crypt:import_key key algorithm 2 not supported

This line, apparently confirms your comment
> importing DSA keys from PFX blobs is currently not supported.

I decided to change the method of generating a private key from DSA to RSA
>certtool  --rsa --bits 4096  --generate-privkey --outfile key.pem

I modified the test application. Added logging of certificate fields:
> Console.WriteLine($"IssuerName:    {cert2.IssuerName.Name}");
> Console.WriteLine($"SubjectName:   {cert2.SubjectName.Name}");

Result (DEBUG+crypto_rsa4096_key.log):
> HasPrivateKey: False
> IssuerName:    C=RU, S=Test state, O=test org., OU=test unit, CN=Test User
> SubjectName:   C=RU, S=Test state, O=test org., OU=test unit, CN=Test User

* NO exception is thrown
* private key NOT loaded

"Windows" output:
> HasPrivateKey: True
> IssuerName:    C=RU, S=Test state, O=test org., OU=test unit, CN=Test User
> SubjectName:   C=RU, S=Test state, O=test org., OU=test unit, CN=Test User

A private key is required in the main application. Maybe I should create a new
report?

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list