summaryrefslogtreecommitdiffstats
path: root/functions/parse_certificate.php
diff options
context:
space:
mode:
authorRemy <relst@relst.nl>2015-03-15 14:46:42 +0100
committerRemy <relst@relst.nl>2015-03-15 14:46:42 +0100
commit6434b3dbb8b528607a9da605a16b9e8bdd870531 (patch)
tree86fe491c08611858008e826a32c27eead566d873 /functions/parse_certificate.php
parent323dadfe5be03ff408c2b4aa465f71a90fd33d57 (diff)
downloadssl-decoder-6434b3dbb8b528607a9da605a16b9e8bdd870531.zip
ssl-decoder-6434b3dbb8b528607a9da605a16b9e8bdd870531.tar.gz
ssl-decoder-6434b3dbb8b528607a9da605a16b9e8bdd870531.tar.bz2
Add navigation menu
Diffstat (limited to 'functions/parse_certificate.php')
-rw-r--r--functions/parse_certificate.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/functions/parse_certificate.php b/functions/parse_certificate.php
index c6656e5..250d4fe 100644
--- a/functions/parse_certificate.php
+++ b/functions/parse_certificate.php
@@ -14,6 +14,12 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
+function get_cert_cn($raw_cert_data){
+ $cert_data = openssl_x509_parse($raw_cert_data);
+ if ($cert_data['subject']['CN']) {
+ return $cert_data['subject']['CN'];
+ }
+}
function cert_parse($raw_cert_data, $raw_next_cert_data=null, $csr=false, $host=null, $port=null, $is_issuer=false) {
global $random_blurp;