EldoS | Feel safer!

Software components for data protection, secure storage and transfer

I sign a PDF twince with two certificate

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#35052
Posted: 11/19/2015 15:26:29
by ivan cursos (Basic support level)
Joined: 10/19/2015
Posts: 5

Hello,

I sign a PDF twince with two certificate.

First using iTextSharp

image 1



and then with SBB getting

Image 2




How I do in SecureBlackBox to hide the message "1 Miscellaneous Change(s)"?

like Picture 1
#35056
Posted: 11/20/2015 04:53:13
by Ken Ivanov (EldoS Corp.)

Hi Ivan,

Thank you for getting in touch with us.

It would be great if you could share some further details about the issue with us. I've created a Helpdesk support ticket for you (#28802) - would you mind sending us both documents (by attaching them to a new message in the ticket) so that we could have a look into them?

Many thanks,

Ken
#35080
Posted: 11/23/2015 08:18:59
by ivan cursos (Basic support level)
Joined: 10/19/2015
Posts: 5

these are the documents sample

http://www.alpha2000.com.ar/sistemas/clientes/sign1.pdf
http://www.alpha2000.com.ar/sistemas/clientes/sign2.pdf

I used two certificate to sign a same document.

I do this with iTextSharp, obtain the result in the picture 1.
I do this with SBB and obtain te resutl in the picture 2.


Code

TElPDFDocument Document;
TElPDFPublicKeySecurityHandler PublicKeyHandler;
TElMemoryCertStorage certStorage;


Document = new TElPDFDocument();
Document.OwnActivatedSecurityHandlers = true;


PublicKeyHandler = new TElPDFPublicKeySecurityHandler();

certStorage = new TElMemoryCertStorage();

string tempPathPdf = Path.GetTempFileName();
bool Success = false;

try
{
    System.IO.File.Copy(pathPdf, tempPathPdf, true);
                
    FileStream F = new FileStream(tempPathPdf, FileMode.Open, FileAccess.ReadWrite);
    try
    {




        if (Document.Encrypted)
        {
            throw new Exception("El documento esta encriptado y no puede se firmado");
        }

        int index = Document.AddSignature();
        TElPDFSignature s = Document.get_Signatures(index);


        s.Handler = PublicKeyHandler;


                        

        certStorage.Clear();
        certStorage.Add(Cert, true);

        PublicKeyHandler.CertStorage = certStorage;

        PublicKeyHandler.SignatureType = SBPDFSecurity.TSBPDFPublicKeySignatureType.pstPKCS7SHA1;
        //PublicKeyHandler.CustomName = "Adobe.PPKMS";

        Success = true;
    }
    finally
    {
        Document.Close(Success);
    }
}
finally
{
    certStorage.Clear();
    F.Close();
}
#35081
Posted: 11/23/2015 09:24:21
by Ken Ivanov (EldoS Corp.)

Thank you Ivan. We will review the documents and get back to you with some feedback on them shortly.

Reply

Statistics

Topic viewed 1441 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!