Skip to content

X509Certificate2 contains empty "Subject" property on Linux on .Net Core 2.2 #29693

@vitaaaly

Description

@vitaaaly

I create X509Certificate2 instance from a byte array on Linux, but property "Subject" is empty.
When I make the same operation on Windows property "Subject" contains necessary information.

I use .Net Core 2.2.
Code for creation X509Certificate2:

`

        var collection = new X509Certificate2Collection();

        collection.Import(rawData);

        var certificate = collection.Cast<X509Certificate2>().First();

`
See original code

This code work well done on Linux and on Windows on .Net Core 2.1.
Problems started after .Net Core switching to 2.2.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions