Not sure if I first need to do a NEW or not - WeOnlyDo Discussion board

Not sure if I first need to do a NEW or not (General questions)

by dirk, Monday, April 19, 2010, 11:43 (5331 days ago)

If I do
Dim cl As New CertLocation
Dim yourcert As ICertificate
Set yourcert = cl(CurrentUser).item(iSSLCertStore).item(iSSLCertSubject)

should
iWodHTTP(http_check_counter).Certificate = yourcert
then work OR should I first do:
set iWodHTTP(http_check_counter).Certificate = new certificate
?

Re: Not sure if I first need to do a NEW or not

by woddrazen, Monday, April 19, 2010, 13:09 (5331 days ago) @ dirk

Hi Dirk,


Actually you should only add this:
[code]Set iWodHTTP(http_check_counter).Certificate = yourcert[/code]
Regards,
Drazen

Re: Not sure if I first need to do a NEW or not

by dirk, Monday, April 19, 2010, 13:13 (5331 days ago) @ woddrazen

Hi Dirk,


Actually you should only add this:
[code]Set iWodHTTP(http_check_counter).Certificate = yourcert[/code]
Regards,
Drazen


But doing this set iWodHTTP(http_check_counter).Certificate = new certificate first is also possible?

Re: Not sure if I first need to do a NEW or not

by woddrazen, Monday, April 19, 2010, 13:37 (5331 days ago) @ dirk

Dirk,


I don't think you need this. Something like this should work:
[code] Dim cert As New Certificate
Dim Location As CertLocation

Set Location = New CertLocation
Set cert = Location(CurrentUser).item(iSSLCertStore).item(iSSLCertSubject)

Dim http1 As wodHttpDLXCom
Set http1 = New wodHttpDLXCom

Set http1.Certificate = cert

Debug.Print http1.Certificate.CommonName[/code]
Drazen