@@ -77,7 +77,9 @@ |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | $res = $this->rsa_imp->loadKey($this->pem_format, RSA::PRIVATE_FORMAT_PKCS1); |
80 | - if(!$res) throw new RSABadPEMFormat(sprintf('pem %s',$pem_format )); |
|
80 | + if(!$res) { |
|
81 | + throw new RSABadPEMFormat(sprintf('pem %s',$pem_format )); |
|
82 | + } |
|
81 | 83 | |
82 | 84 | $this->key = PublicKeyLoader::load($this->pem_format, $this->password)->toString('raw'); |
83 | 85 |
@@ -36,8 +36,9 @@ |
||
36 | 36 | |
37 | 37 | parent::__construct($pem_format, $password); |
38 | 38 | $this->d = $this->key['d']; |
39 | - if($this->d->toString() === $this->e->toString()) |
|
40 | - throw new RSABadPEMFormat(sprintf('pem %s is a public key!', $pem_format)); |
|
39 | + if($this->d->toString() === $this->e->toString()) { |
|
40 | + throw new RSABadPEMFormat(sprintf('pem %s is a public key!', $pem_format)); |
|
41 | + } |
|
41 | 42 | } |
42 | 43 | |
43 | 44 | /** |