diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-09-29 09:10:44 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-09-29 09:10:44 +0100 |
| commit | f0d2a59b20021d3582727978050641eaa8ccee30 (patch) | |
| tree | b4f952c3335f482cfd12e5eb916f96cc25161285 /src/certificates.cc | |
| parent | ee2b60a4aee4c9730f6c49b96498d040d242bdd4 (diff) | |
Add common_name().
Diffstat (limited to 'src/certificates.cc')
| -rw-r--r-- | src/certificates.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/certificates.cc b/src/certificates.cc index 4c41ebba..f23dbc5d 100644 --- a/src/certificates.cc +++ b/src/certificates.cc @@ -194,6 +194,14 @@ Certificate::subject () const } string +Certificate::common_name () const +{ + assert (_certificate); + + return get_name_part (X509_get_subject_name (_certificate), NID_commonName); +} + +string Certificate::serial () const { assert (_certificate); |
