X509

primitive val X509

Constructors

create

new val create()
: X509 val^

Returns


Public Functions

valid_for_host

Checks if an OpenSSL X509 certificate is valid for a given host.

fun box valid_for_host(
  cert: Pointer[X509 val] ref,
  host: String val)
: Bool val

Parameters

Returns


common_name

Get the common name for the certificate. Raises an error if the common name contains any NULL bytes.

fun box common_name(
  cert: Pointer[X509 val] ref)
: String val ?

Parameters

Returns


all_names

Returns an array of all names for the certificate. Any names containing NULL bytes are not included. This includes the common name and all subject alternate names.

fun box all_names(
  cert: Pointer[X509 val] ref)
: Array[String val] val

Parameters

Returns


eq

fun box eq(
  that: X509 val)
: Bool val

Parameters

Returns


ne

fun box ne(
  that: X509 val)
: Bool val

Parameters

Returns


Private Functions

_match_name

Returns true if the name extracted from the certificate is valid for the given host.

fun box _match_name(
  host: String val,
  name: String val)
: Bool val

Parameters

Returns