Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Reads certificate and private key from a PKCS12 file.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Certificates | 7.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
Path | The native file path to the PEM file. | "/Users/cs/Desktop/test.pem" | |
Password | The password for the p12 file. | "Hello" | Optional |
Returns PKCS12 reference number or error.
Read PKCS12 file and shows details:
Set Variable [$p12; Value:MBS( "PKCS12.ReadFromFile"; "/Users/cs/Desktop/test.p12"; "test" )]
If [MBS("IsError")]
Show Custom Dialog ["Error"; $p12]
Else
Set Variable [$cert; Value:MBS( "PKCS12.Cert"; $p12 )]
Set Variable [$pkey; Value:MBS( "PKCS12.PKey"; $p12 )]
Set Variable [$CACount; Value:MBS( "PKCS12.CACount"; $p12 )]
Show Custom Dialog ["Certificate"; MBS( "X509.Description"; $cert )]
Show Custom Dialog ["Private Key"; MBS( "PKey.DescriptionPrivateKey"; $pkey )]
Set Variable [$r; Value:MBS( "PKey.Release"; $pkey )]
Set Variable [$r; Value:MBS( "X509.Release"; $cert )]
Set Variable [$r; Value:MBS( "PKCS12.Release"; $p12 )]
End If
Read sample pfx file:
Set Variable [$pkcs12; Value: MBS( "PKCS12.ReadFromFile"; "/Users/cs/Desktop/test_cert.pfx"; "123456") ]
This function checks for a license.
Created 23th December 2016, last changed 28th February 2023