x509-cert/allowed-ext-usage x509-cert/allowed-usage x509-cert/authority-key-id x509-cert/create-self-signed x509-cert/dup x509-cert/fingerprint x509-cert/hostname-match x509-cert/is-ca x509-cert/issue x509-cert/issuer-dn x509-cert/load x509-cert/load-file x509-cert/not-after x509-cert/not-before x509-cert/san x509-cert/serial-number x509-cert/subject-dn x509-cert/subject-key-id x509-cert/subject-public-key x509-cert/subject-public-key-bits x509-cert/to-der x509-cert/to-pem x509-cert/to-string x509-cert/validation-status x509-cert/verify
(x509-cert/allowed-ext-usage cert-obj oid)Check if the certificate allows the specified extended usage OID. The `oid` parameter can be either a canonical OID string or identifiers like "PKIX.ServerAuth", "PKIX.ClientAuth", "PKIX.CodeSigning", "PKIX.OCSPSigning". Returns true if the certificate allows the usage.
(x509-cert/allowed-usage cert-obj cert-usage)Test if the certificate is allowed for a particular usage. The cert-usage argument should be one of the following keywords:
(x509-cert/authority-key-id cert-obj)Return the authority key ID set in the certificate, which may be empty.
(x509-cert/create-self-signed key &keys {:rng rng :hash hash :expire-time expire-time :is-ca is-ca :CN cn :C c :O o :OU ou :ST st :L l :email email :dns dns :ip ip :uri uri :serial-number serial-number :key-usage key-usage :ext-key-usage ext-key-usage})Create a self-signed X.509 certificate.
(x509-cert/dup cert-obj)Create a new object that refers to the same certificate.
(x509-cert/fingerprint cert-obj &opt hash-algo)Return a fingerprint for the certificate, which is basically just a hash of the binary contents. Normally "SHA-1" or "SHA-256" is used, but any hash function is allowed. If omitted, "SHA-256" is used.
(x509-cert/hostname-match cert-obj hostname)Return true if the certificate matches a given `hostname`. If SAN DNS entries are present, only those are checked. Otherwise falls back to Common Name (CN). Supports wildcard matching.
(x509-cert/is-ca cert-obj)Return true if the certificate is a CA certificate.
(x509-cert/issue subject-key ca-cert ca-key not-before not-after &keys {:rng rng :hash hash :is-ca is-ca :CN cn :C c :O o :OU ou :ST st :L l :email email :dns dns :ip ip :uri uri :serial-number serial-number :key-usage key-usage :ext-key-usage ext-key-usage})Issue a new X.509 certificate signed by a CA.
(x509-cert/issuer-dn cert-obj key &opt index)Get a value from the issuer DN field. `key` is one of :CN, :C, :O, :OU, :ST, :L, :serial-number. If `index` is given, returns the value at that zero-based index. If omitted, returns a tuple of all values for that field.
(x509-cert/load cert)Load a X.509 certificate from DER or PEM representation.
(x509-cert/not-after cert-obj)Return the time the certificate expires, as seconds since epoch.
(x509-cert/not-before cert-obj)Return the time the certificate becomes valid, as seconds since epoch.
(x509-cert/san cert-obj type &opt index)Get a value from the Subject Alternative Name extension. `type` is one of :dns, :email, :uri, :ip. If `index` is given, returns the value at that zero-based index (nil if not found). If omitted, returns a tuple of all values for that type.
(x509-cert/serial-number cert-obj)Return the serial number of the certificate.
(x509-cert/subject-dn cert-obj key &opt index)Get a value from the subject DN field. `key` is one of :CN, :C, :O, :OU, :ST, :L, :serial-number. If `index` is given, returns the value at that zero-based index. If omitted, returns a tuple of all values for that field.
(x509-cert/subject-key-id cert-obj)Return the subject key ID set in the certificate, which may be empty.
(x509-cert/subject-public-key cert-obj)Get the public key included in this certificate as an object of `pubkey`.
(x509-cert/subject-public-key-bits cert-obj)Get the serialized representation of the public key included in this certificate.
(x509-cert/to-string cert-obj)Return a free-form string representation of this certificate
(x509-cert/validation-status error-code)Return an informative string explaining the verification return code.
(x509-cert/verify cert-obj &keys {:intermediates intermediates :trusted trusted :truste trusted-path :required-strength required-strength :hostname hostname :reference-time reference-time :crl crls})Verify a certificate. Returns 0 if validation was successful, returns a positive error code if the validation was unsuccesful.