i need to get the Values inside the NameConstraint (of the second Certificate) through the .NET library and then validate it against the Subject Name of the last Certificate. But i cannot get the value of the NameConstraint in a parsed way. I can only get the raw bytes. My thoughts are, that the crypt32.dll used by the .NET Framework must be able to Parse the NameConstraint into some structure and then validate the SubjectName Structure, but i cannot figure out, how I can call the Library to retrieve such a NameConstraint structure. The struct in the crypt32.dll should be CERT_NAME_CONSTRAINT_INFO, the Method to call would be CertDecodeObject.
I already know there are some Libraries for this, but the functionality is already there and i do not have permission to use any Libraries other than what i already have. OpenSSL would be acceptable, but i guess it would be the same kind of ordeal.
Can anyone tell me how i can parse the data into a structure that i can use to check the NameConstraints with?
Thank You
I didn't find the right solution from the Internet.