@@ -564,7 +564,7 @@ function CustomSigningAPI($doc_path,
564564
565565 // Then, create ObjectIdentifiers for the algorithms you have used.
566566 // Here we use digest_algorithm_type (SHA256) for hashing, and RSAES-PKCS1-v1_5 (specified in the private key) for signing.
567- $ digest_algorithm_oid = new ObjectIdentifier (ObjectIdentifier::e_SHA256 );
567+ $ digest_algorithm_oid = ObjectIdentifier:: CreateFromDigestAlgorithm ( $ digest_algorithm_type );
568568 $ signature_algorithm_oid = new ObjectIdentifier (ObjectIdentifier::e_RSA_encryption_PKCS1);
569569
570570 // Then, put the CMS signature components together.
@@ -680,7 +680,7 @@ function main()
680680 {
681681 CertifyPDF ($ input_path .'waiver_withApprovalField.pdf ' ,
682682 'PDFTronCertificationSig ' ,
683- $ input_path .'pdftron .pfx ' ,
683+ $ input_path .'apryse .pfx ' ,
684684 'password ' ,
685685 $ input_path .'pdftron.bmp ' ,
686686 $ output_path .'waiver_withApprovalField_certified_output.pdf ' );
@@ -697,7 +697,7 @@ function main()
697697 {
698698 SignPDF ($ input_path .'waiver_withApprovalField_certified.pdf ' ,
699699 'PDFTronApprovalSig ' ,
700- $ input_path .'pdftron .pfx ' ,
700+ $ input_path .'apryse .pfx ' ,
701701 'password ' ,
702702 $ input_path .'signature.jpg ' ,
703703 $ output_path .'waiver_withApprovalField_certified_approved_output.pdf ' );
@@ -726,7 +726,7 @@ function main()
726726 //////////////////// TEST 4: Verify a document's digital signatures.
727727 try
728728 {
729- if (!VerifyAllAndPrint ($ input_path .'waiver_withApprovalField_certified_approved.pdf ' , $ input_path .'pdftron .cer ' ))
729+ if (!VerifyAllAndPrint ($ input_path .'waiver_withApprovalField_certified_approved.pdf ' , $ input_path .'apryse .cer ' ))
730730 {
731731 $ result = false ;
732732 }
@@ -740,7 +740,7 @@ function main()
740740 //////////////////// TEST 5: Verify a document's digital signatures in a simple fashion using the document API.
741741 try
742742 {
743- if (!VerifySimple ($ input_path .'waiver_withApprovalField_certified_approved.pdf ' , $ input_path .'pdftron .cer ' ))
743+ if (!VerifySimple ($ input_path .'waiver_withApprovalField_certified_approved.pdf ' , $ input_path .'apryse .cer ' ))
744744 {
745745 $ result = false ;
746746 }
@@ -762,9 +762,9 @@ function main()
762762 {
763763 CustomSigningAPI ($ input_path .'waiver.pdf ' ,
764764 'PDFTronApprovalSig ' ,
765- $ input_path .'pdftron .pfx ' ,
765+ $ input_path .'apryse .pfx ' ,
766766 'password ' ,
767- $ input_path .'pdftron .cer ' ,
767+ $ input_path .'apryse .cer ' ,
768768 $ input_path .'signature.jpg ' ,
769769 DigestAlgorithm::e_SHA256,
770770 true ,
0 commit comments