AcmePhp\Ssl\KeyPair::getPublicKey PHP Method

getPublicKey() public method

public getPublicKey ( ) : PublicKey
return PublicKey
    public function getPublicKey()
    {
        return $this->publicKey;
    }

Usage Example

Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function storeDomainKeyPair($domain, KeyPair $keyPair)
 {
     try {
         $this->save('private/' . $domain . '/public.pem', $this->serializer->serialize($keyPair->getPublicKey(), PemEncoder::FORMAT));
         $this->save('private/' . $domain . '/private.pem', $this->serializer->serialize($keyPair->getPrivateKey(), PemEncoder::FORMAT));
     } catch (\Exception $e) {
         throw new AcmeCliException(sprintf('Storing of domain %s key pair failed', $domain), $e);
     }
 }