sign and verify using .pfx files (General questions)
hi guys its me again...
VB6 code :
Dim oCert as new Certificate
Dim oCrypt as wodCryptCom
Dim hashBlob as new MemBlob
Dim signBlob as new MemBlob
oCert.LoadKey useDrive & genexus.pfx ' self signed pfx
oCert.Load useDrive & genexus.pfx
lblOWNER.Caption = oCert.CommonName & < & oCert.Email & >
hashBlob.Text = QPxo1S95hM2nLzgcVKq5sg==
Set oCrypto = New wodCryptCom
oCrypto.Type = RSA
oCrypto.Padding = PadPKCS7
oCrypto.SecretKey = * how can I load private key from oCert ????
oCrypto.Sign hashBlob, signBlob
and...
when I would try to verify how can I load public key from oCert before oCrypto.Verify(hashBlob,signBlob) ???
thank you again.
Re: sign and verify using .pfx files
Mauricio,
regarding private key, did you try doing
Crypt.SecretKey = oCert
and for public key, you can do this
Crypt.SecretKey = oCert.PublicKeyOpenSSH
can you try that?
Re: sign and verify using .pfx files
Mauricio,
regarding private key, did you try doing
Crypt.SecretKey = oCert
and for public key, you can do this
Crypt.SecretKey = oCert.PublicKeyOpenSSHcan you try that?
let give it a try... let me see... it says:
Run-time error '30005': Secret Password is not set, or cannot be applied to selected algorithm. [:sad:]
Re: sign and verify using .pfx files
P.S.
about public key: my apologizes, there is already a topic that explains how to load public key from certificate. [:happy:]
Re: sign and verify using .pfx files
You were right. As seems, wodCertificate's PrivateKey cannot be used with wodCrypt.
ok, we fixed that. Now you're safe to do
oCrypt.SecretKey = oCertificate
and that's it. Make sure you request update, version 1.2.4
Best regards.