Ask a Question related to ASP.NET Security, Design and Development.
-
Pete #1
Creating & Distibuting X509 Client Certificates
Hi,
As part of a commerce site I'd like to generate Client Browser
Certificates for users to install and give access to some protected
resources.
I'm guessing I can use the .NET X509Certificate class to create a user's
certificate, but how do I create the initial .cer request file?
Also if I create the cerificate on the server using the
X509Certificate.CreateFromCertFile will be all that is required for the
certifcate to become active?
thanks
Pete
Pete Guest
-
Using SSL Client Certificates
I am using HTTPS with Apache and ColdFusion MX7. The Apache server is set up to require client certificates from a specific CA. I need to find out... -
Client Certificates
Hi all. I'm implementing a Web Service and a Client that comunicate with SSL. The Client has a certificate that load with:... -
Unable to communicate with SSL Web Service using X509 Client Cert
This is one of those cases where it works (calling the Web Service) in a WinForm app but not in ASP.Net. I am attempting to call a PayPal Web... -
ASP.NET and client certificates
Hi People, I know in IIS Admin you can tick the box to request a client certificate (over an SSL connection), but does anyone know of a way,... -
x509 certificates
Hi PHP folks, Does anybody know a way to read the extension fields from a x509 certificate? Maybe there is a better PHP module than openssl.... -
Pete #2
Re: Creating & Distibuting X509 Client Certificates
Finally came up with
public string CreateClientCertificate(string a_sName, string a_sEmail,
string a_sCompany, string a_sDepartment, string a_sCity, string a_sState,
string a_sCountry, string a_sCA)
{
CERTCLIENTLib.CCertRequestClass cr = new CERTCLIENTLib.CCertRequestClass();
XENROLLLib.CEnrollClass ce = new XENROLLLib.CEnrollClass();
try
{
//Create the request
string strDN = "CN=" + a_sName;
strDN = strDN + ",O=" + a_sCompany;
strDN = strDN + ",OU=" + a_sDepartment;
strDN = strDN + ",L=" + a_sCity;
strDN = strDN + ",S=" + a_sState;
strDN = strDN + ",C=" + a_sCountry;
strDN = strDN + ",E=" + a_sEmail;
//Encode the request (1.3.6.1.4.1.311.2.1.21) represents a client-browser
certificate
strDN = ce.createPKCS10(strDN,"1.3.6.1.4.1.311.2.1.21");
//Submit the request to the CA
int iResult = cr.Submit(0x100 | 0x1 ,strDN,"",a_sCA);
//Get it back out again
string s = cr.GetCertificate(iResult);
return s;
}
catch(Exception e)
{
return "";
}
}
--
Cheers
Pete
XBOX Live Leagues & Tournaments
[url]http://www.xboxracing.net/[/url]
"Pete" <pete denness a-t qsadotcodotuk> wrote in message
news:ent4SRYvDHA.2220@TK2MSFTNGP09.phx.gbl...> Hi,
> As part of a commerce site I'd like to generate Client Browser
> Certificates for users to install and give access to some protected
> resources.
>
> I'm guessing I can use the .NET X509Certificate class to create a user's
> certificate, but how do I create the initial .cer request file?
>
> Also if I create the cerificate on the server using the
> X509Certificate.CreateFromCertFile will be all that is required for the
> certifcate to become active?
>
> thanks
>
> Pete
>
>
Pete Guest



Reply With Quote

