PHPackages                             infinityfree/acmecore - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. infinityfree/acmecore

ActiveLibrary[Security](/categories/security)

infinityfree/acmecore
=====================

Raw implementation of the ACME protocol in PHP

4.0.0(6mo ago)5769↓50%1MITPHPPHP &gt;=7.3.0CI passing

Since Feb 17Pushed 6mo agoCompare

[ Source](https://github.com/InfinityFreeHosting/acmecore)[ Packagist](https://packagist.org/packages/infinityfree/acmecore)[ Docs](https://github.com/InfinityFreeHosting/acmecore)[ RSS](/packages/infinityfree-acmecore/feed)WikiDiscussions release-4.0 Synced 1mo ago

READMEChangelog (6)Dependencies (11)Versions (34)Used By (0)

AcmeCore PHP Library
====================

[](#acmecore-php-library)

AcmeCore is a modified version of the [Acme PHP Core](https://github.com/acmephp/core) library.

When to use AcmeCore
--------------------

[](#when-to-use-acmecore)

AcmeCore is designed as a straight forward implementation of the [Let's Encrypt/ACME protocol](https://github.com/letsencrypt/acme-spec) following best practices for libraries. There are no file system dependencies, integrated schedulers or anything like that. You can integrate it in your own project and take care of scheduling and persistence yourself.

Differences with Acme PHP Core
------------------------------

[](#differences-with-acme-php-core)

Acme PHP Core is a great library, but assumes that the "happy path" always works. I.e. the CA never returns an error, performs all tasks quickly, and always returns the expected data. With Let's Encrypt this is generally true, but other CAs might be less stable.

The key differences between this library and Acme PHP Core are the following:

- **Every function on `AcmeClient` maps to a single step in the ACME process.** This way, you're free to call and retry the steps at your own pace (e.g. retrying receiving a certificate without calling finalize again).
- **No more sleep loops.** Schedule tasks the way you want, and don't hog a PHP process if you don't want to.
- **`CertificateOrder`s now contain the status of the order.** Load the order with the `reloadOrder` function, see the current status of the order and choose the next step to apply.

Documentation
-------------

[](#documentation)

The official [Acme PHP documentation](https://acmephp.github.io) still applies for the most part. But the certificate issuance process has been changed a bit.

```
$secureHttpClientFactory = new SecureHttpClientFactory(
    new GuzzleHttpClient(),
    new Base64SafeEncoder(),
    new KeyParser(),
    new DataSigner(),
    new ServerErrorHandler()
);

// $accountKeyPair instance of KeyPair
$secureHttpClient = $secureHttpClientFactory->createSecureHttpClient($accountKeyPair);

// Important, change to production LE directory for real certs!
$acmeClient = new AcmeClient($secureHttpClient, 'https://acme-staging-v02.api.letsencrypt.org/directory');

// Request a certificate for mydomain.com.
$certificateOrder = $acmeClient->requestOrder('mydomain.com');

// Retrieve the challenges to complete for mydomain.com.
$challenges = $certificateOrder->getAuthorizationChallenges('mydomain.com');

// Now complete the challenge for the domain.
// Find the challenge object for the verification type you want to do, e.g. http-01, dns-01.
$challenge = $challenges[0];

// Ask the CA to confirm the authorization.
$challenge = $acmeClient->challengeAuthorization($dnsChallenge);

// Wait for the CA to complete the authorization.
// This example uses a sleep loop, but you can schedule your own.
while ($challenge->getStatus() != 'ready') {
    sleep(1);

    $challenge = $acmeClient->reloadAuthorization($challenge);
}

// Prepare the CSR
$dn = new DistinguishedName('mydomain.com');
$keyPairGenerator = new KeyPairGenerator();
// Make a new key pair. We'll keep the private key as our cert key
$domainKeyPair = $keyPairGenerator->generateKeyPair();

// This is the private key
echo $domainKeyPair->getPrivateKey()->getPem());

// Generate CSR
$csr = new CertificateRequest($dn, $domainKeyPair);

// Tell the CA to generate the certificate.
$certificateOrder = $acmeClient->finalizeOrder($certificateOrder, $csr);

// Wait for the CA to complete the issuance.
// This example uses a sleep loop, but you can schedule your own.
while ($certificateOrder->getStatus() != 'issued') {
    sleep(1);

    $certificateOrder = $acmeClient->reloadOrder($certificateOrder->getOrderEndpoint());
}

// Retrieve the generated certificate.
$certificate = $acmeClient->retrieveCertificate($certificateOrder);

// This is the generated certificate.
echo $certificate->getPem();
```

Launch the Test suite
---------------------

[](#launch-the-test-suite)

The Acme PHP test suite is located in the main repository: .

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance68

Regular maintenance activity

Popularity23

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~142 days

Recently: every ~342 days

Total

26

Last Release

191d ago

Major Versions

1.3.0 → 2.0.02020-12-13

2.0.1 → 3.0.02022-02-09

3.2.0 → 4.0.02025-11-08

PHP version history (3 changes)1.0.0-alphaPHP &gt;=5.5.0

2.0.0PHP &gt;=7.2.5

3.2.0PHP &gt;=7.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c31ee61c3a8d78fc323838c4481bce8a9a8e2f836c87b23647a5e22708b561c8?d=identicon)[Grendel7](/maintainers/Grendel7)

---

Top Contributors

[![jderusse](https://avatars.githubusercontent.com/u/578547?v=4)](https://github.com/jderusse "jderusse (37 commits)")[![tgalopin](https://avatars.githubusercontent.com/u/1651494?v=4)](https://github.com/tgalopin "tgalopin (31 commits)")[![Grendel7](https://avatars.githubusercontent.com/u/1823324?v=4)](https://github.com/Grendel7 "Grendel7 (14 commits)")[![alexsoft](https://avatars.githubusercontent.com/u/1451894?v=4)](https://github.com/alexsoft "alexsoft (4 commits)")[![piotrantosik](https://avatars.githubusercontent.com/u/154553?v=4)](https://github.com/piotrantosik "piotrantosik (2 commits)")[![mgriego](https://avatars.githubusercontent.com/u/186428?v=4)](https://github.com/mgriego "mgriego (2 commits)")[![benjilevens](https://avatars.githubusercontent.com/u/37897020?v=4)](https://github.com/benjilevens "benjilevens (2 commits)")[![TJP85](https://avatars.githubusercontent.com/u/3156231?v=4)](https://github.com/TJP85 "TJP85 (1 commits)")[![elliotfehr](https://avatars.githubusercontent.com/u/5550991?v=4)](https://github.com/elliotfehr "elliotfehr (1 commits)")[![pauladams8](https://avatars.githubusercontent.com/u/37362614?v=4)](https://github.com/pauladams8 "pauladams8 (1 commits)")[![philipsharp](https://avatars.githubusercontent.com/u/1037033?v=4)](https://github.com/philipsharp "philipsharp (1 commits)")[![rokclimb15](https://avatars.githubusercontent.com/u/583271?v=4)](https://github.com/rokclimb15 "rokclimb15 (1 commits)")

---

Tags

httpsencryptionx509certificatecsropensslsslacmephpletsencrypt

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/infinityfree-acmecore/health.svg)

```
[![Health](https://phpackages.com/badges/infinityfree-acmecore/health.svg)](https://phpackages.com/packages/infinityfree-acmecore)
```

###  Alternatives

[acmephp/core

Raw implementation of the ACME protocol in PHP

38973.7k7](/packages/acmephp-core)[acmephp/acmephp

Let's Encrypt client written in PHP

649155.1k](/packages/acmephp-acmephp)[acmephp/ssl

PHP wrapper around OpenSSL extension providing SSL encoding, decoding, parsing and signing features

141.2M4](/packages/acmephp-ssl)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[kelunik/acme

ACME library written in PHP.

121603.9k3](/packages/kelunik-acme)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
