Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKCS12 #114

Draft
wants to merge 11 commits into
base: master
from

remove X509.common_name_to_string

  • Loading branch information...
hannesm committed Apr 22, 2019
commit a86ea763a3661adda8e74a54a4ed7bd51e78e9af
@@ -95,10 +95,6 @@ type host = [ `Strict of string | `Wildcard of string ]
contains the given [host], using {!hostnames}. *)
val supports_hostname : t -> host -> bool

(** [common_name_to_string certificate] is [common_name], the common name of the
subject of the [certificate]. *)
val common_name_to_string : t -> string

(** The polymorphic variant of a distinguished name component, as defined in
X.500. *)
type component = [
@@ -81,11 +81,6 @@ let subject_common_name cert =
List_ext.map_find cert.tbs_cert.subject
~f:(function `CN n -> Some n | _ -> None)

let common_name_to_string { asn = cert ; _ } =
match subject_common_name cert with
| None -> "NO commonName"
| Some x -> x

(* RFC 6125, 6.4.4:
Therefore, if and only if the presented identifiers do not include a
DNS-ID, SRV-ID, URI-ID, or any application-specific identifier types
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.