Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
PKCS12.ReadFromFile
Reads certificate and private key from a PKCS12 file.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Certificates | 7.0 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| Path | The native file path to the PEM file. | "/Users/cs/Desktop/test.pem" |
| Password | The password for the p12 file. | "Hello" |
Result
Returns PKCS12 reference number or error.
Description
Reads certificate and private key from a PKCS12 file.Please call PKCS12.Release later to release memory.
This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.
Examples
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
See also
- IsError
- Path.FileMakerPathToNativePath
- PKCS12.CA
- PKCS12.PKey
- PKCS12.Release
- PKCS7.ReadFromFile
- PKey.DescriptionPrivateKey
- PKey.Release
- X509.Description
- X509.Release
Created 23th December 2016, last changed 6th March 2019
PKCS12.ReadFromContainer - PKCS12.Release
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins