@@ -39,7 +39,9 @@ |
||
39 | 39 | |
40 | 40 | $this->file = new X509(); |
41 | 41 | $this->info = $this->file->loadX509($pem); |
42 | - if($this->info === false) throw new InvalidX509CertificateException($pem); |
|
42 | + if($this->info === false) { |
|
43 | + throw new InvalidX509CertificateException($pem); |
|
44 | + } |
|
43 | 45 | $this->original_pem = $pem; |
44 | 46 | } |
45 | 47 |
@@ -45,12 +45,15 @@ |
||
45 | 45 | $this->pem_format = $pem_format; |
46 | 46 | $this->rsa_imp = new RSA(); |
47 | 47 | |
48 | - if(!empty($password)) |
|
49 | - $this->rsa_imp->setPassword($password); |
|
48 | + if(!empty($password)) { |
|
49 | + $this->rsa_imp->setPassword($password); |
|
50 | + } |
|
50 | 51 | |
51 | 52 | $res = $this->rsa_imp->loadKey($this->pem_format, RSA::PRIVATE_FORMAT_PKCS1); |
52 | 53 | |
53 | - if(!$res) throw new RSABadPEMFormat(sprintf('pem %s',$pem_format )); |
|
54 | + if(!$res) { |
|
55 | + throw new RSABadPEMFormat(sprintf('pem %s',$pem_format )); |
|
56 | + } |
|
54 | 57 | |
55 | 58 | $this->n = $this->rsa_imp->modulus; |
56 | 59 | } |