login about faq

I want to sign some text, but I'm getting different output from my code (using Visual Foxpro and Chilkat) and from OpenSSL. My code (Chilkat) returns about 3 times more output text then OpenSSL.

I don't know why a I don't know if it could be OK or not. Anyone to help me please?

(I used another variations of code too, signing files, etc. - still the same problem).

I have suspicion, that Chilkat returns signed data AND signature (see "AddingFinalCertWithSerialNumber" and "addingCert" in LastErrorText) - is it possible (see original doc)?

SignStringENC - original documentation: Digitally signs a string and returns the PKCS7 detached digital signature as an encoded string.

Simple Code FoxPro:

SetSigningCert(xxx)
EncodingMode = "Base64"
IncludeCertChain = 0
SignStringENC(Text_to_sign)

LastErrorText:

ChilkatLog:
  SignStringENC:
    DllDate: Aug  5 2012
    UnlockPrefix: TOMASKCrypt
    Username: ...
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    SigningCert:
      SubjectDN: C=CZ, L=..., OU=..., CN=..., SN=...
      SerialNumber: ...
    --SigningCert
    hashAlgorithm: sha1
    createPkcs7Signature:
      detachedSignature: 1
      numSigningCerts: 1
      issuerSerialNum: ...
      numAsnBytesToSign: 35
      rsaSigLen: 256
      AddingCertsToASN:
        Not embedding certificate chain..
        AddingFinalCertWithSerialNumber: ...
        addingCert: C=CZ, L=..., OU=..., CN=..., SN=...
        numCertsAdded: 1
      --AddingCertsToASN
    --createPkcs7Signature
    Success.
  --SignStringENC
--ChilkatLog

OpenSSL:

openssl smime -sign -outform pem -signer c:xxx.pem -in data_in.txt -out data_out.txt -nocerts

asked Feb 19 '13 at 08:34

tomas_klicka's gravatar image

tomas_klicka
1111

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×22
×3
×2

Asked: Feb 19 '13 at 08:34

Seen: 1,056 times

Last updated: Feb 19 '13 at 08:34

powered by OSQA