tfPkiSetOptions

Jump to: navigation, search

Table of Contents >> Application Reference >> Cryptography


#include <trsocket.h>


int tfPkiSetOptions (
ttUser32Bit option,
ttUser8Bit value
);


Function Description

Toggle some certificate verification options.


Parameters

  • option
    The option we are going to toggle. Valid values are:
TM_PKIOPT_PKICERTCHECKALIVE
Verify that the certificate is valid using the "valid before" and "valid after" dates. To enable this option, you must define TM_PKI_CERT_CHECK_ALIVE in your trsystem.h file.
0: Do not check the certificate's "aliveness".
(Non-zero): Check the certificate's "aliveness". (Default)
TM_PKIOPT_PKICERTNONVERIFY
Run a series of verification checks for the certificate. To enable this option, you must define TM_PKI_CERT_NOT_VERIFY in your trsystem.h file.
0: Attempt to verify the certificate.
(Non-zero): Do not attempt to verify the certificate. (Default)
  • value
    See the item description for valid values.


Returns

  • TM_ENOERROR
    Success
  • TM_EINVAL
    Invalid option.
  • TM_ENOENT
    PKI is not initialized. tfUsePki() must be called first.


Table of Contents >> Application Reference >> Cryptography