Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
Zend_Crypt_Rsa_Key_Public Class Reference
Inheritance diagram for Zend_Crypt_Rsa_Key_Public:
Zend_Crypt_Rsa_Key

Public Member Functions

 __construct ($string)
 
 getCertificate ()
 
- Public Member Functions inherited from Zend_Crypt_Rsa_Key
 getOpensslKeyResource ()
 
 toString ()
 
 __toString ()
 
 count ()
 
 getType ()
 

Protected Member Functions

 _parse ($string)
 

Protected Attributes

 $_certificateString = null
 
- Protected Attributes inherited from Zend_Crypt_Rsa_Key
 $_pemString = null
 
 $_details = array()
 
 $_opensslKeyResource = null
 

Detailed Description

Definition at line 34 of file Public.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $string)

Definition at line 39 of file Public.php.

40  {
41  $this->_parse($string);
42  }

Member Function Documentation

◆ _parse()

_parse (   $string)
protected
Parameters
string$string
Exceptions
Zend_Crypt_Exception
See also
Zend_Crypt_Exception

Definition at line 48 of file Public.php.

49  {
50  if (preg_match("/^-----BEGIN CERTIFICATE-----/", $string)) {
51  $this->_certificateString = $string;
52  } else {
53  $this->_pemString = $string;
54  }
55  $result = openssl_get_publickey($string);
56  if (!$result) {
60  #require_once 'Zend/Crypt/Exception.php';
61  throw new Zend_Crypt_Exception('Unable to load public key');
62  }
63  //openssl_pkey_export($result, $public);
64  //$this->_pemString = $public;
65  $this->_opensslKeyResource = $result;
66  $this->_details = openssl_pkey_get_details($this->_opensslKeyResource);
67  }

◆ getCertificate()

getCertificate ( )

Definition at line 69 of file Public.php.

70  {
72  }

Field Documentation

◆ $_certificateString

$_certificateString = null
protected

Definition at line 37 of file Public.php.


The documentation for this class was generated from the following file: