Beispiel #1
0
 /**
  * Generate ASN.1 structure.
  *
  * @return Sequence
  */
 public function toASN1()
 {
     $elements = array($this->_base->toASN1());
     if (isset($this->_min) && $this->_min != 0) {
         $elements[] = new ImplicitlyTaggedType(0, new Integer($this->_min));
     }
     if (isset($this->_max)) {
         $elements[] = new ImplicitlyTaggedType(1, new Integer($this->_max));
     }
     return new Sequence(...$elements);
 }
Beispiel #2
0
 /**
  *
  * @see \X501\ASN1\AttributeValue\AttributeValue::toASN1()
  * @return Sequence
  */
 public function toASN1()
 {
     $elements = array($this->_service->toASN1(), $this->_ident->toASN1());
     if (isset($this->_authInfo)) {
         $elements[] = new OctetString($this->_authInfo);
     }
     return new Sequence(...$elements);
 }
Beispiel #3
0
 /**
  *
  * @see \X501\ASN1\AttributeValue\AttributeValue::toASN1()
  * @return Sequence
  */
 public function toASN1()
 {
     $elements = array();
     if (isset($this->_roleAuthority)) {
         $elements[] = new ImplicitlyTaggedType(0, $this->_roleAuthority->toASN1());
     }
     $elements[] = new ExplicitlyTaggedType(1, $this->_roleName->toASN1());
     return new Sequence(...$elements);
 }
Beispiel #4
0
 public function toASN1()
 {
     return new ExplicitlyTaggedType($this->_type, $this->_name->toASN1());
 }