SWI-Prolog SSL Interface
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog SSL Interface
        • Introduction
        • library(ssl): Secure Socket Layer (SSL) library
        • library(crypto): Cryptography and authentication library
        • XML cryptographic libraries
        • SSL Security
        • CRLs and Revocation
        • Example code
        • Compatibility of the API
        • Acknowledgments

8 Compatibility of the API

Previous versions of the library used plain Prolog terms to represent the certificate objects as lists of fields. Newer versions of the library preserve the raw underlying structures as opaque handles to allow for more complicated operations to be performed on them. Any old code which obtains fields from the certificate using memberchk/2 should be modified to use certificate_field/2 instead. For example,
  memberchk(subject(Subject), Certificate)

will instead need to be

  cerficate_field(Certificate, subject(Subject))

Note that some of the fields do not match up exactly with their previous counterparts (key is now public_key, for example).