@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | public static function fromASN1(UnspecifiedType $el): self |
64 | 64 | { |
65 | 65 | switch ($el->tag()) { |
66 | - case Element::TYPE_OCTET_STRING: |
|
67 | - case Element::TYPE_UTF8_STRING: |
|
68 | - return new self($el->asString()->string(), $el->tag()); |
|
69 | - case Element::TYPE_OBJECT_IDENTIFIER: |
|
70 | - return new self($el->asObjectIdentifier()->oid(), $el->tag()); |
|
66 | + case Element::TYPE_OCTET_STRING: |
|
67 | + case Element::TYPE_UTF8_STRING: |
|
68 | + return new self($el->asString()->string(), $el->tag()); |
|
69 | + case Element::TYPE_OBJECT_IDENTIFIER: |
|
70 | + return new self($el->asObjectIdentifier()->oid(), $el->tag()); |
|
71 | 71 | } |
72 | 72 | throw new \UnexpectedValueException( |
73 | 73 | 'Type ' . Element::tagToName($el->tag()) . ' not supported.'); |
@@ -169,12 +169,12 @@ discard block |
||
169 | 169 | public function toASN1(): Element |
170 | 170 | { |
171 | 171 | switch ($this->_type) { |
172 | - case Element::TYPE_OCTET_STRING: |
|
173 | - return new OctetString($this->_value); |
|
174 | - case Element::TYPE_UTF8_STRING: |
|
175 | - return new UTF8String($this->_value); |
|
176 | - case Element::TYPE_OBJECT_IDENTIFIER: |
|
177 | - return new ObjectIdentifier($this->_value); |
|
172 | + case Element::TYPE_OCTET_STRING: |
|
173 | + return new OctetString($this->_value); |
|
174 | + case Element::TYPE_UTF8_STRING: |
|
175 | + return new UTF8String($this->_value); |
|
176 | + case Element::TYPE_OBJECT_IDENTIFIER: |
|
177 | + return new ObjectIdentifier($this->_value); |
|
178 | 178 | } |
179 | 179 | throw new \LogicException( |
180 | 180 | 'Type ' . Element::tagToName($this->_type) . ' not supported.'); |