Ejemplo n.º 1
0
 /**
  * @param Csr $csr
  * @param int $serialNumber
  * @param \DateTime $validityStart
  * @param \DateTime $validityEnd
  * @return CertificateInfo
  */
 public function createCertificateInfo(Csr $csr, $serialNumber, \DateTime $validityStart, \DateTime $validityEnd)
 {
     return new CertificateInfo($serialNumber, $this->sigAlg, $this->issuer, $csr->getSubject(), $csr->getPublicKey(), $validityStart, $validityEnd);
 }
Ejemplo n.º 2
0
 /**
  * @param Csr $csr
  * @return Sequence
  */
 public function getCsrASN(Csr $csr)
 {
     return new Sequence($this->getCertRequestInfoASN($csr->getCurve(), $csr->getPublicKey(), $csr->getSubject()), new Sequence(SigAlgorithmOidMapper::getSigAlgorithmOid($csr->getSigAlgorithm())), new BitString(bin2hex($this->sigSer->serialize($csr->getSignature()))));
 }