Loading pfx file to certificate store (wodFTPServer)
I have generated a certificate.pfx file and want to automatically load it/install to windows certificate store. Is it possible to do this programmatically with WodCertificate component?
by Chris, (7041 days ago)
I have generated a certificate.pfx file and want to automatically load it/install to windows certificate store. Is it possible to do this programmatically with WodCertificate component?
by wodDamir
, (7041 days ago) @ Chris
Hi Chris,
You will have to install the certificate manually, but you can make FTPServer to load it automatically afterwards by just pointing the component towards the Certificate. You can do something like this (VB6):
---------------------------------
Dim location As CertLocation
Set location = New CertLocation
Dim cer As Certificate
Set cer = location(CurrentUser).Item( My ).Item( localhost )
---------------------------------
Just set up the Application to load the certificate on startup, and it should work.
Regards,
Damba
by Chris, (7041 days ago) @ wodDamir
Thanks.
Using the code, I want to check the OS store to see if my cert is already installed.
Dim location As CertLocation
Set location = New CertLocation
Dim cer As Certificate
Set cer = location(CurrentUser).Item( My ).Item( MyCert )
If cer.CommonName <> MyCert Then SomeRoutine....
If cert MyCert was in the OS store, I would have thought I could check its common name but all I get is an Object variable or with block not set
Any ideas on how to fix this?
Chris
by wodDamir
, (7041 days ago) @ Chris
Chris,
Where exatly do you get this error? This is probably an error with object initialization.
I don't think this is the error in this code. Perhaps you have tried to use the certificate, but didn't set server's Certificate Property to the Certificate object before you call Start Method. You can do it like this:
--------------------------
Set FtpD.Certificate = cer
--------------------------
I.e, you can try this code:
--------------------------
Dim WithEvents FtpD As wodFTPDCom
Dim location As CertLocation
Private Sub Form_Load()
Set FtpD = New wodFTPDCom
Set location = New CertLocation
Dim cer As Certificate
Set cer = location(CurrentUser).Item( My ).Item( localhost )
MsgBox cer.CommonName
If cer Is Nothing Then
Beep
Else
Set FtpD.Certificate = cer
FtpD.Protocol = FTPS
FtpD.Start
End If
End Sub
--------------------------
I get a message box saying Certificate's CommonName, and after that everything works like a charm.
The If statement in this case is just to check if certificate is actually loaded, and if it is, then we load it into the FTPD Object.
If this sample code still doesn't work, can you please contact me on techsupport@weonlydo.com ?
Regards,
Damba

WeOnlyDo!COM will be the first stop I make should I require any further off-the-shelf components.

You did a great job on wodSSH and wodSSHServer! I got a lot for very little money. Thanks!

We have recently completed a large 1200+ location project where reliable Telnet and SSH connectivity was required. wodSSH worked flawlessly and allowed our staff to complete our project ontime and within budget.

Thank you for the great customer service ... I am really impressed with the wodSSH ActiveX control.

Your professionalism is reflected into your email, your product and your web site. I am confident that these will make the difference.

Thank you very much for the rapid responses. I was a little nervous about dealing with a company that is on a different continent from me. You have proven my concerns to be unfounded.

...with WOD's excellent support I was able to bypass Winsock and focus on the task at hand...

The people at WeOnlyDo are amazing! ... I always get a super fast response from customer service, and the products are great too. Thanks WeOnlyDo

...with a minimum of effort as the DLL interface was written with such simplicity...

We have recently completed a large 1200+ location project where reliable Telnet and SSH connectivity was required. wodSSH worked flawlessly and allowed our staff to complete our project ontime and within budget.

