Chilkat HOME Android™ Classic ASP C C++ C# Mono C# .NET Core C# C# UWP/WinRT DataFlex Delphi ActiveX Delphi DLL Visual FoxPro Java Lianja MFC Objective-C Perl PHP ActiveX PHP Extension PowerBuilder PowerShell PureBasic CkPython Chilkat2-Python Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ Visual Basic 6.0 VB.NET VB.NET UWP/WinRT VBScript Xojo Plugin Node.js Excel Go
(VB.NET UWP/WinRT) Verify and Unwrap PCKS7 Signed MIMEDemonstrates calling the Verify method to verify and unwrap PKCS7 signed MIME. The MIME is restored to the original structure that it would have originally had prior to signing. The Verify method works with both detached signatures, as well as opaque/attached signatures.
' This example requires the Chilkat API to have been previously unlocked. ' See Global Unlock Sample for sample code. Dim mime As New Chilkat.Mime ' A PKCS7 signature usually embeds both the signing ' certificate with its public key. Therefore, it is usually ' possible to verify a signature without the need to ' already have the certificate installed. ' Load the signed MIME from a file... Dim success As Boolean = mime.LoadMimeFile("signedMime.txt") If (success = False) Then Debug.WriteLine(mime.LastErrorText) Exit Sub End If ' Verify the signed MIME and restore the MIME ' to the structure/content it had prior to signing. Dim verified As Boolean verified = mime.Verify() If (verified = False) Then Debug.WriteLine(mime.LastErrorText) Exit Sub End If ' Examine the MIME after signature verification (i.e. "unwrapping") Debug.WriteLine(mime.GetMime()) |
© 2000-2022 Chilkat Software, Inc. All Rights Reserved.