summaryrefslogtreecommitdiffstats
path: root/vendor/fgrosse/phpasn1/lib/ASN1/Composite/RelativeDistinguishedName.php
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-01-11 12:35:47 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-01-11 12:35:47 +0100
commit19985dbb8c0aa66dc4bf7905abc1148de909097d (patch)
tree2cd5a5d20d7e80fc2a51adf60d838d8a2c40999e /vendor/fgrosse/phpasn1/lib/ASN1/Composite/RelativeDistinguishedName.php
download1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.gz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.bz2
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.lz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.xz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.zst
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.zip
Diffstat (limited to 'vendor/fgrosse/phpasn1/lib/ASN1/Composite/RelativeDistinguishedName.php')
-rw-r--r--vendor/fgrosse/phpasn1/lib/ASN1/Composite/RelativeDistinguishedName.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/vendor/fgrosse/phpasn1/lib/ASN1/Composite/RelativeDistinguishedName.php b/vendor/fgrosse/phpasn1/lib/ASN1/Composite/RelativeDistinguishedName.php
new file mode 100644
index 0000000..4185f41
--- /dev/null
+++ b/vendor/fgrosse/phpasn1/lib/ASN1/Composite/RelativeDistinguishedName.php
@@ -0,0 +1,50 @@
+<?php
+/*
+ * This file is part of the PHPASN1 library.
+ *
+ * Copyright © Friedrich Große <friedrich.grosse@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace FG\ASN1\Composite;
+
+use FG\ASN1\Exception\NotImplementedException;
+use FG\ASN1\ASNObject;
+use FG\ASN1\Universal\Set;
+
+class RelativeDistinguishedName extends Set
+{
+ /**
+ * @param string|\FG\ASN1\Universal\ObjectIdentifier $objIdentifierString
+ * @param \FG\ASN1\ASNObject $value
+ */
+ public function __construct($objIdentifierString, ASNObject $value)
+ {
+ // TODO: This does only support one element in the RelativeDistinguishedName Set but it it is defined as follows:
+ // RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
+ parent::__construct(new AttributeTypeAndValue($objIdentifierString, $value));
+ }
+
+ public function getContent()
+ {
+ /** @var \FG\ASN1\ASNObject $firstObject */
+ $firstObject = $this->children[0];
+ return $firstObject->__toString();
+ }
+
+ /**
+ * At the current version this code can not work since the implementation of Construct requires
+ * the class to support a constructor without arguments.
+ *
+ * @deprecated this function is not yet implemented! Feel free to submit a pull request on github
+ * @param string $binaryData
+ * @param int $offsetIndex
+ * @throws NotImplementedException
+ */
+ public static function fromBinary(&$binaryData, &$offsetIndex = 0)
+ {
+ throw new NotImplementedException();
+ }
+}