Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
insert and verify digital signatures in pdf through c++,some one can help me?
Posted 26-Feb-12 17:37pm
chp845319
Comments
johny10151981 at 27-Feb-12 2:24am
   
One you can buy a link libraries for that
 
or go to adobe website get the documentation for PDF and develop the required tools
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can sign and verify data using CryptoAPI from Microsoft.
Microsoft has introduced CNG from Windows vista onwards. So evaluate your requirements.
 
Check out
http://msdn.microsoft.com/en-us/library/aa387761%28v=VS.85%29.aspx
  Permalink  
Comments
chp845 at 27-Feb-12 21:28pm
   
i know t,quite some time ago,i have using the openssl and CryptoAPI to do a project.but i want to do it in pdf!
sobingt at 28-Feb-12 6:23am
   
ok
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

'Verify certificate in pdf via vb.net
 

Dim theForm As Acrobat.CAcroPDDoc
Dim jso As Object
 
theForm = CreateObject("AcroExch.PDDoc")
theForm.Open("C:\Temp\Maru\DeclaracionJurada.pdf")
jso = theForm.GetJSObject
 
'Verifica que la firma sea valida
 
Dim signatureOne = jso.getField("Signature2")
Dim oState = signatureOne.SignatureValidate()
 
Select Case oState
Case Is = -1
ListBox1.Items.Add("Estado : Sin Firma ")
Case Is = 0
ListBox1.Items.Add("Estado : Firma en blanco ")
Case Is = 1
ListBox1.Items.Add("Estado : No conoce el estado de la firma ")
Case Is = 2
ListBox1.Items.Add("Estado : Firma invalida ")
Case Is = 3
ListBox1.Items.Add("Estado : La firma es valida, pero la identidad del firmante no se pudo verificar ")
Case Is = 4
ListBox1.Items.Add("Estado : Firma e identidad son validas ")
 
End Select
 
'Extrae la info del firmante, nombre y fecha de la firma
Dim signatureInformation = signatureOne.signatureInfo
 
ListBox1.Items.Add("Firmante " & signatureInformation.name)
ListBox1.Items.Add("Fecha " & signatureInformation.Date)
 
'Extrae la info del certificado
Dim signatureCertificate = signatureInformation.certificates
ListBox1.Items.Add("Emitido a : " & signatureCertificate(0).subjectDN.serialNumber)
ListBox1.Items.Add("Numero de Serie : " & signatureCertificate(0).serialNumber)
ListBox1.Items.Add("Valido desde : " & signatureCertificate(0).validityStart)
ListBox1.Items.Add("Valido hasta : " & signatureCertificate(0).validityEnd)
ListBox1.Items.Add("Para : " & signatureCertificate(0).subjectDN.o)
ListBox1.Items.Add("Tipo : " & signatureCertificate(0).subjectDN.ou)
ListBox1.Items.Add("Emitido Por : " & signatureCertificate(0).issuerDN.cn)
  Permalink  
Comments
CHill60 at 21-Jun-13 12:10pm
   
As per your other post, this one is also over a year old and the OP tagged it with C# not VB.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 6,569
1 Sergey Alexandrovich Kryukov 6,168
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 21 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100