summaryrefslogtreecommitdiff
path: root/src/ClientCertificate.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientCertificate.php')
-rw-r--r--src/ClientCertificate.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ClientCertificate.php b/src/ClientCertificate.php
new file mode 100644
index 0000000..d2b9530
--- /dev/null
+++ b/src/ClientCertificate.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace GeminiFoundation;
+
+class ClientCertificate
+{
+ protected \OpenSSLCertificate $certificate;
+
+ public function __construct(\OpenSSLCertificate $certificate)
+ {
+ $this->certificate = $certificate;
+ }
+
+ public function getObject(): \OpenSSLCertificate
+ {
+ return $this->certificate;
+ }
+
+ public function getFingerprint(): string
+ {
+ return openssl_x509_fingerprint($this->certificate);
+ }
+
+ public function parse(): array
+ {
+ return openssl_x509_parse($this->certificate);
+ }
+}