Page 1 of 1
Last version of SB support PGP? or any other component?
Posted: Thu 09 Aug 2018 19:40
by byronrocha
Hi
Do you know if SecureBridge support PGP?
Re: Last version of SB support PGP? or any other component?
Posted: Fri 10 Aug 2018 06:41
by ViktorV
You can use the TScCMSProcessor component for encrypting (decrypting) data:
https://www.devart.com/sbridge/docs/tsccmsprocessor.htm
Re: Last version of SB support PGP? or any other component?
Posted: Fri 10 Aug 2018 14:24
by byronrocha
Great, I need to sign a file using a pgp certificate that I have created.
This is the code, but I got an error when I try to import the certificate
Cert := TScCertificate.Create(FileKeyStore.Certificates);
Cert.CertName := aPGPKeyName;
Cert.ImportFrom(aPGPPrivateKeyFileName, aPassPhrase); {Here I have an error "Wrong certificate context"}
ScCMSProcessor := TScCMSProcessor.Create(Self);
ScCMSProcessor.Storage := FileKeyStore;
ScCMSProcessor.CertificateName := aPGPKeyName;
ScCMSProcessor.Sign(aInputFileNameToSign, aOutputFileNameToSign);
Re: Last version of SB support PGP? or any other component?
Posted: Fri 10 Aug 2018 14:43
by ViktorV
To encode and sign the data in the CMS protocol, you need a certificate. You can create it by yourself using different tools or buy it. For more information about obtaining a certificate, you can ask the appropriate question at the specialized forums.
After receiving the certificate, you should import it using the TScCertificate.ImportFrom method. For example,
Perhaps, you are trying to import not a certificate, but an associated private key. To import the certificate and the private key associated with the certificate, you can use the following code
Code: Select all
Cert := TScCertificate.Create(FileKeyStore.Certificates);
Cert.CertName := aCertName;
Cert.ImportFrom(CerFileName);
Cert.Key.ImportFrom(aPGPPrivateKeyFileName, aPassPhrase);
Re: Last version of SB support PGP? or any other component?
Posted: Mon 13 Aug 2018 15:41
by byronrocha
Thanks for you answer, I tested using other certificate (crt) and it works, but, is there any way to sign a file just using a Private PGP Key and the passphrase?
Re: Last version of SB support PGP? or any other component?
Posted: Mon 20 Aug 2018 14:54
by Dimon
Currently SecureBridge does not provide functionality to work with PGP keys.
You can suggest this feature at our UserVoice (
http://devart.uservoice.com/forums/174370-securebridge ). If the suggestion gets a lot of votes, we will consider the possibility to implement it.