X509CertStoreImportP12 (FUN)ΒΆ
FUNCTION X509CertStoreImportP12 : RTS_IEC_HANDLE
Import a PKCS#12/PFX/P12 containter to the certificate store of the PLC. As such container typically combine certificate and private key into a single encrypted file, the certificate is imported to the own trust level. The private key will also be imported. If the container also contains chain certificates, these certs will be imported to the OwnChain trust level and are used by X509CertStoreBuildChain.
- InOut:
Scope
Name
Type
Comment
Return
X509CertStoreImportP12RTS_IEC_HANDLEHandle to the imported certificate.
Input
hCertStoreRTS_IEC_HANDLEHandle of to certificate store.
hBackendRTS_IEC_HANDLEHandle to the back-end where to store the generated certificate. RTS_INVALID_HANDLE should be used if no back- end is specified.
pContainerPOINTER TO RtsByteString
Bytestring containing the PKCS#12 cotainer.
pPassphrasePOINTER TO STRING
Password to decrypt the container. UTF-8 encoding expected.
keyExportableBOOLIf TRUE, the private key may be exported using X509CertStoreExportP12 or CryptoExportAsymmetricKey afterwards. If FALSE, the private key can not be exported.
Output
ResultRTS_IEC_RESULTResult of the operation.