Archived Forum Post

Index of archived forum posts

Question:

Which are the attributes that are signed?

May 31 '13 at 06:22

Hello.

I'm using the component TChilkatCert to sign a text string:

cert := TChilkatCert.Create(Self);
success := cert.LoadByCommonName('ENTIDAD CAI SL - CIF B');
if (success <> 1) then
begin
  ShowMessage(cert.LastErrorText);
  Exit;
end;

//  Make sure this certificate has a private key available:

bHasPrivateKey := cert.HasPrivateKey();
if (bHasPrivateKey <> 1) then
begin
  ShowMessage('No private key available for signing.');
  Exit;
end;

//  Tell the encryption component to use this cert.
crypt.SetSigningCert(cert.ControlInterface As CHILKATCRYPT2Lib_TLB.IChilkatCert);

strData := Edit1.Text;

//  Indicate that the PKCS7 signature should be returned
//  as a base64 encoded string:
crypt.EncodingMode := 'base64';
strSignatureWithData := crypt.OpaqueSignStringENC(strData);

Which are the attributes that are signed? What values​​?

The OIDS are :

1.3.6.1.4.1.311.16.4

1.2.840.113549.1.9.15

1.2.840.113549.1.9.16.2.11

Thanks


Answer

All three are "authenticated attributes".


Answer

Hello.

Which are the values of these attributes? How I can read the values​​? How I can assign a specific value?

Thank you very much.