by LEMBAS [lembas at myway dot com] posted on 2003/12/18 |
|
I want to get the country value in the certificate. i know the oid is 2.5.4.6. I want to search according to 2.5.4.6 and get the value (for example: "uk" or "usa" as string).
//I set the value to null, because that value is the value that i want to get
NameAttribute na = new NameAttribute("2.5.4.6",null);
int i = cert.GetDistinguishedName().IndexOf(na);
Console.WriteLine(cert.GetDistinguishedName()[i].Value);
but i always get i==-1.
how can I get the value of C or CN or L or the others...? |