X509CertGetBinary (FUN) ¶ FUNCTION X509CertGetBinary : RTS_IEC_RESULT Get the certificate in a binary encoded format. Use the encoding parameter to set the needed format. InOut: Scope Name Type Comment Return X509CertGetBinary RTS_IEC_RESULT Result of the operation. Input hCert RTS_IEC_HANDLE Handle of the certificate of intrest. encoding RtsCertEncoding How to encode the certificate. pCert POINTER TO RtsByteString Buffer where to store the certificate. If the bytestring contains a NULL memory pointer the function will write the needed bufferlength to the pCert->ui32Length member.
X509CertGetContent (FUN) ¶ FUNCTION X509CertGetContent : RTS_IEC_RESULT Get some common content from the certificate. InOut: Scope Name Type Comment Return X509CertGetContent RTS_IEC_RESULT Result of the operation. Input hCert RTS_IEC_HANDLE Handle of the certificate of intrest. pCertContent POINTER TO RtsX509CertInfo Pointer where to store the information.
X509CertGetPublicKey (FUN) ¶ FUNCTION X509CertGetPublicKey : RTS_IEC_RESULT Get the PUBLIC key FROM the certificate. The format of this key is an implementation detail and has to match the expected format of the asymmetric functions of the CmpCrpyotItf. The key data is opaque for the user of the keys. If the keys are needed in a defined exchange format use the CryptoKeyExport function of the CmpCryptoItf. InOut: Scope Name Type Comment Return X509CertGetPublicKey RTS_IEC_RESULT Result of the operation. Input hCert RTS_IEC_HANDLE Handle of the certificate of intrest. pPublicKey POINTER TO RtsCryptoKey Pointer to the crypto key storing the public key.
X509CertGetThumbprint (FUN) ¶ FUNCTION X509CertGetThumbprint : RTS_IEC_RESULT Generate the certificate thumbprint. The thumbprint will be just the plain bytes of the hash. The thumprint can be used to identify certificates of the local store. The thumprint may not be globally unique. InOut: Scope Name Type Comment Return X509CertGetThumbprint RTS_IEC_RESULT Result of the operation. Input hCert RTS_IEC_HANDLE Handle of the certificate of intrest. hashAlgorithm POINTER TO RtsCryptoID The hashing algorithmen used to generate the thumbprint. pThumprint POINTER TO RtsByteString Buffer to store the thumbprint. If bytestring is NULL memory ia allocated.
X509CertHasExtendedKeyUsage (FUN) ¶ FUNCTION X509CertHasExtendedKeyUsage : BOOL Check if the extended keyusages of the specified certificate has the specified extended keyusages InOut: Scope Name Type Comment Return X509CertHasExtendedKeyUsage BOOL True if all key usages are part of the certificate. Input hCert RTS_IEC_HANDLE Handle of to certificate. numOfExKeyUsages UDINT Number of extended keyusages pExKeyUsages POINTER TO RtsOID Pointer to list of extended keyusages pResult POINTER TO RTS_IEC_RESULT POINTER TO error code
X509CertHasKeyUsage (FUN) ¶ FUNCTION X509CertHasKeyUsage : BOOL Check if the specified key-usages are defined within the certificate. InOut: Scope Name Type Comment Return X509CertHasKeyUsage BOOL True if all key usages are part of the certificate. Input hCert RTS_IEC_HANDLE Handle of to certificate. keyUsage UDINT Key usages to check. Refer to Key Usage flags. pResult POINTER TO RTS_IEC_RESULT POINTER TO error code
X509CertIsAuthority (FUN) ¶ FUNCTION X509CertIsAuthority : BOOL Check if the given certificate is certificate autority. Typically this is indicated by the corresponding key usage. Some older ca certificates may be identified by other means. InOut: Scope Name Type Comment Return X509CertIsAuthority BOOL Input hCert RTS_IEC_HANDLE Handle of to certificate. pResult POINTER TO RTS_IEC_RESULT Pointer to error code. ERR_OK if everything went fine, ERR_PARAMETER if hCert was invalid. Output pathLen DINT The maximum path length of the CA. -1 if there is no limit. Only valid, if the function returned TRUE
X509CertIsDateValid (FUN) ¶ FUNCTION X509CertIsDateValid : BOOL Check if a certificate has a valid date (notbefore and notafter is in the current time period) InOut: Scope Name Type Comment Return X509CertIsDateValid BOOL True if the certificate date is valid Input hCert RTS_IEC_HANDLE Handle of to certificate. pResult POINTER TO RTS_IEC_RESULT Pointer to error code. ERR_OK: Everything went fine, ERR_PARAMETER: hCert was invalid
X509CertIsSelfSigned (FUN) ¶ FUNCTION X509CertIsSelfSigned : BOOL Check if a certificate is selfsigned of is signed by a CA authority InOut: Scope Name Type Comment Return X509CertIsSelfSigned BOOL True if the certificate is self signed, False if the certificate is signed by a CA. Input hCert RTS_IEC_HANDLE Handle of to certificate. pResult POINTER TO RTS_IEC_RESULT Pointer to error code. ERR_OK if everything went fine, ERR_PARAMETER if hCert was invalid.
X509CertKeyClose (FUN) ¶ FUNCTION X509CertKeyClose : RTS_IEC_RESULT Release a PRIVATE OR PUBLIC key with THIS FUNCTION. THIS FUNCTION indicates that this key is not needed anymore and allows to clean up ressources used by this key InOut: Scope Name Type Comment Return X509CertKeyClose RTS_IEC_RESULT Result of the operation Input pKey POINTER TO RtsCryptoKey Pointer to the key