Skip to content

Commit

Permalink
Update README.md (#188)
Browse files Browse the repository at this point in the history
As discussions in #185 , change the sample codes and comments in README.md
  • Loading branch information
JoeHorn authored Jun 4, 2024
1 parent f1fe0fa commit 3e8639d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ $certificate = SslCertificate::createFromFile($pathToCertificateFile);
// or from a string
$certificate = SslCertificate::createFromString($certificateData);

$certificate->getIssuer(); // returns "Let's Encrypt Authority X3"
$certificate->isValid(); // returns true if the certificate is currently valid
$certificate->validFromDate(); // returns a Carbon instance Carbon

$certificate->expirationDate(); // returns a Carbon instance Carbon
$certificate->lifespanInDays(); // return the amount of days between validFromDate and expirationDate
$certificate->expirationDate()->diffInDays(); // returns an int
$certificate->getSignatureAlgorithm(); // returns a string
$certificate->validFromDate(); // returns a Carbon instance Carbon

$certificate->daysUntilExpirationDate(); // returns the amount of days between today and expirationDate
$certificate->lifespanInDays(); // return the amount of days between validFromDate and expirationDate

$certificate->getIssuer(); // returns "Let's Encrypt Authority X3"
$certificate->getOrganization(); // returns the organization name when available
$certificate->getPublicKeyAlgorithm(); // returns the public key algorithm
$certificate->getPublicKeySize(); // returns the public key algorithm
$certificate->getSignatureAlgorithm(); // returns the signature algorithm
```

#### Downloading invalid certificate
Expand Down

0 comments on commit 3e8639d

Please sign in to comment.