@@ -51,11 +51,11 @@ discard block |
||
| 51 | 51 | public static function fromASN1(UnspecifiedType $el) |
| 52 | 52 | { |
| 53 | 53 | switch ($el->tag()) { |
| 54 | - case Element::TYPE_OCTET_STRING: |
|
| 55 | - case Element::TYPE_UTF8_STRING: |
|
| 56 | - return new self($el->asString()->string(), $el->tag()); |
|
| 57 | - case Element::TYPE_OBJECT_IDENTIFIER: |
|
| 58 | - return new self($el->asObjectIdentifier()->oid(), $el->tag()); |
|
| 54 | + case Element::TYPE_OCTET_STRING: |
|
| 55 | + case Element::TYPE_UTF8_STRING: |
|
| 56 | + return new self($el->asString()->string(), $el->tag()); |
|
| 57 | + case Element::TYPE_OBJECT_IDENTIFIER: |
|
| 58 | + return new self($el->asObjectIdentifier()->oid(), $el->tag()); |
|
| 59 | 59 | } |
| 60 | 60 | throw new \UnexpectedValueException( |
| 61 | 61 | "Type " . Element::tagToName($el->tag()) . " not supported."); |
@@ -153,12 +153,12 @@ discard block |
||
| 153 | 153 | public function toASN1() |
| 154 | 154 | { |
| 155 | 155 | switch ($this->_type) { |
| 156 | - case Element::TYPE_OCTET_STRING: |
|
| 157 | - return new OctetString($this->_value); |
|
| 158 | - case Element::TYPE_UTF8_STRING: |
|
| 159 | - return new UTF8String($this->_value); |
|
| 160 | - case Element::TYPE_OBJECT_IDENTIFIER: |
|
| 161 | - return new ObjectIdentifier($this->_value); |
|
| 156 | + case Element::TYPE_OCTET_STRING: |
|
| 157 | + return new OctetString($this->_value); |
|
| 158 | + case Element::TYPE_UTF8_STRING: |
|
| 159 | + return new UTF8String($this->_value); |
|
| 160 | + case Element::TYPE_OBJECT_IDENTIFIER: |
|
| 161 | + return new ObjectIdentifier($this->_value); |
|
| 162 | 162 | } |
| 163 | 163 | throw new \LogicException( |
| 164 | 164 | "Type " . Element::tagToName($this->_type) . " not supported."); |