Hi
Do you know if SecureBridge support PGP?
Last version of SB support PGP? or any other component?
-
- Posts: 9
- Joined: Fri 20 Jul 2018 16:45
Re: Last version of SB support PGP? or any other component?
You can use the TScCMSProcessor component for encrypting (decrypting) data: https://www.devart.com/sbridge/docs/tsccmsprocessor.htm
-
- Posts: 9
- Joined: Fri 20 Jul 2018 16:45
Re: Last version of SB support PGP? or any other component?
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);
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?
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
After receiving the certificate, you should import it using the TScCertificate.ImportFrom method. For example,
Code: Select all
Cert.ImportFrom('MyCert.CRT').
Code: Select all
Cert := TScCertificate.Create(FileKeyStore.Certificates);
Cert.CertName := aCertName;
Cert.ImportFrom(CerFileName);
Cert.Key.ImportFrom(aPGPPrivateKeyFileName, aPassPhrase);
-
- Posts: 9
- Joined: Fri 20 Jul 2018 16:45
Re: Last version of SB support PGP? or any other component?
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?
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.
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.