-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Playground_sample: Resolved the feedback.
- Loading branch information
1 parent
0c7c745
commit 11c4cd6
Showing
18 changed files
with
67 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 9 additions & 8 deletions
17
...gnature/Customized-revocation-validation/.NET/Customized-revocation-validation/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,33 @@ | ||
using Syncfusion.Pdf.Parsing; | ||
using Syncfusion.Pdf.Security; | ||
|
||
|
||
//Gets the stream from the document | ||
FileStream documentStream = new FileStream(Path.GetFullPath(@"Data/Input.pdf"), FileMode.Open, FileAccess.Read); | ||
|
||
//Loads an existing signed PDF document | ||
|
||
PdfLoadedDocument document = new PdfLoadedDocument(documentStream); | ||
|
||
// Gets the signature field | ||
|
||
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField; | ||
|
||
// Signature validation options | ||
|
||
PdfSignatureValidationOptions options = new PdfSignatureValidationOptions(); | ||
|
||
// Sets the revocation type | ||
|
||
options.RevocationValidationType = RevocationValidationType.Crl; | ||
|
||
// Validate signature and get validation result | ||
|
||
PdfSignatureValidationResult result = signatureField.ValidateSignature(options); | ||
|
||
Console.WriteLine("Successfully validate customized revocation"); | ||
//Check whether the CRL is revoked | ||
if (result.RevocationResult.IsRevokedCRL) | ||
{ | ||
Console.WriteLine("CRL is revoked"); | ||
} | ||
else | ||
{ | ||
Console.WriteLine("CRL is not revoked"); | ||
} | ||
|
||
// Closes the document | ||
|
||
document.Close(true); |
20 changes: 4 additions & 16 deletions
20
Digital Signature/Get-LTV-information/.NET/Get-LTV-information/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,33 @@ | ||
| ||
|
||
using Syncfusion.Pdf.Parsing; | ||
using Syncfusion.Pdf.Parsing; | ||
using Syncfusion.Pdf.Security; | ||
|
||
//Gets the stream from the document | ||
FileStream documentStream = new FileStream(Path.GetFullPath(@"Data/Input.pdf"), FileMode.Open, FileAccess.Read); | ||
|
||
//Loads an existing signed PDF document | ||
|
||
PdfLoadedDocument document = new PdfLoadedDocument(documentStream); | ||
|
||
// Gets the signature field | ||
|
||
PdfLoadedSignatureField signatureField = document.Form.Fields[0] as PdfLoadedSignatureField; | ||
|
||
// Validates signature and get validation result | ||
|
||
PdfSignatureValidationResult result = signatureField.ValidateSignature(); | ||
|
||
// Gets the LTV verification Information. | ||
|
||
LtvVerificationInfo ltvVerificationInfo = result.LtvVerificationInfo; | ||
|
||
// Checks whether the signature document LTV is enabled. | ||
|
||
bool isLtvEnabled = ltvVerificationInfo.IsLtvEnabled; | ||
|
||
Console.WriteLine("isLtvEnabled :" + isLtvEnabled); | ||
|
||
// Checks whether the signature document has CRL embedded. | ||
|
||
bool isCrlEmbedded = ltvVerificationInfo.IsCrlEmbedded; | ||
|
||
Console.WriteLine("isCrlEmbedded :" + isCrlEmbedded); | ||
|
||
// Checks whether the signature document has OCSP embedded. | ||
|
||
bool isOcspEmbedded = ltvVerificationInfo.IsOcspEmbedded; | ||
|
||
Console.WriteLine("isOcspEmbedded :" + isOcspEmbedded); | ||
Console.WriteLine("LTV enabled: " + isLtvEnabled); | ||
Console.WriteLine("CRL embedded: " + isCrlEmbedded); | ||
Console.WriteLine("OCSP embedded: " + isOcspEmbedded); | ||
|
||
// Closes the document | ||
|
||
document.Close(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters