/** * Generate ASN.1 structure. * * @return Sequence */ public function toASN1() { return new Sequence($this->_certificationRequestInfo->toASN1(), $this->_signatureAlgorithm->toASN1(), $this->_signature->toBitString()); }
/** * Get ASN.1 structure. * * @return Sequence */ public function toASN1() { return new Sequence($this->_acinfo->toASN1(), $this->_signatureAlgorithm->toASN1(), $this->_signatureValue->toBitString()); }
/** * Get OpenSSL digest method for given signature algorithm identifier. * * @param SignatureAlgorithmIdentifier $algo * @throws \UnexpectedValueException * @return string */ protected function _algoToDigest(SignatureAlgorithmIdentifier $algo) { $oid = $algo->oid(); if (!array_key_exists($oid, self::MAP_DIGEST_OID_TO_NAME)) { throw new \UnexpectedValueException("Digest method {$oid} not supported."); } return self::MAP_DIGEST_OID_TO_NAME[$oid]; }