Where PHP uses cryptography: OpenSSL extension, sodium and streams

PHP uses cryptography in its OpenSSL extension, its sodium extension and its TLS stream wrappers, and each one reads settings from code, php.ini and the linked OpenSSL build. This entry lists where to look, what to record and which items depend on public-key algorithms.

On this page

PHP cryptographic inventory: where to start

PHP uses cryptography in four places, and the inventory should record each one separately: the OpenSSL extension (ext/openssl), which binds the OpenSSL library and provides TLS streams, certificates, keys, signing and digests; the sodium extension, which provides Ed25519 signatures, public-key encryption and key exchange; the stream wrappers, where ssl://, tls://, and ftps:// all take the same SSL context options; and the php.ini` settings that choose the certificate store and library context. The cryptographic inventory for PHP covers five areas: protocols, certificates and keys, management access, firmware and updates, and integrations and dependencies. Start with the PHP branch in each environment, because the supported versions page lists 8.2 security support as ending on 31 December 2026, as of 3 December 2026.

Record each area against the extension, setting or host that carries it. For protocols, note the TLS stream settings in use, including crypto_method, which PHP 8.0.0 and later requires when neither the function call nor the context sets it, and ciphers, which defaults to DEFAULT. For certificates and keys, list local_cert, local_pk, cafile, capath and SNI_server_certs wherever they appear, plus any keys created with openssl_pkey_new() and any requests created with openssl_csr_new(). For management access, list the admin pages, SSH sessions and database connections that the PHP application opens or accepts, and confirm with each owner whether they use the OpenSSL library linked into PHP or a separate client library. Firmware and boot signing are not PHP settings. They belong to the host or appliance that runs PHP, so list that host as a dependency, name its owner, and leave its signing chain to that owner.

Which PHP areas use cryptography, from streams to management access

This table compares each area where PHP runs cryptography, from TLS streams and the OpenSSL and sodium extensions to password hashing, trust settings and third-party extensions. Read the third column first: true or Partly means the area relies on RSA, DH, EC, X25519 or Ed25519 keys, and those are the entries to inventory for a post-quantum review. The main takeaway: the OpenSSL, SSL context and sodium manual pages checked on 3 December 2026 list no ML-KEM, ML-DSA or SLH-DSA functions, options or constants.

AreaWhat it protects and algorithm familyDepends on public-key algorithmsWhere it is configured
TLS client and server streams (ssl://, tls://)Client and server connections: TLS key exchange, certificate checks and negotiated protocol versions and ciphers. https:// and ftps:// use ssl:// underneath.YesStream context options such as verify_peer, ciphers and crypto_method in application code. These options also apply to https:// and ftps://.
Certificate and key material in stream contextsServer and client identity: X.509 certificates and the private keys that match them, set with local_cert, local_pk, passphrase, cafile and capath.YesPer-stream context array in application code. SNI_server_certs and alpn_protocols are set in the same context.
OpenSSL extension: key generation and CSRsCreating RSA, DSA, DH, EC keys and, from PHP 8.4.0, X25519, X448, Ed25519 and Ed448 keys, plus certificate signing requests.YesApplication code. CSR digest and key size default to default_md and default_bits in openssl.cnf unless overridden.
OpenSSL extension: signing, digests and encryptionSignatures with openssl_sign(), digests and symmetric ciphers through openssl_encrypt(). Signing depends on keys, digests and ciphers do not.PartlyFunction arguments in application code. openssl_sign() defaults to OPENSSL_ALGO_SHA1 and gained a padding parameter in PHP 8.5.0.
Sodium extensionEd25519 signatures, public-key boxes and key exchange through Curve25519 operations, and Argon2 password hashing through sodium_crypto_pwhash*.PartlyApplication code calling sodium_crypto_* functions. Confirm any build or INI setting for your PHP version with the distributor.
password_hash() with bcryptPassword storage using PASSWORD_DEFAULT, currently bcrypt. This is a hashing feature, not a public-key feature.NoApplication code. The bcrypt default cost rose from 10 to 12 in PHP 8.4.0.
php.ini trust settingsTrust anchors for certificate verification: openssl.cafile and openssl.capath, both empty by default. openssl.libctx defaults to custom.Partlyphp.ini, php-fpm pool or per-directory settings. openssl.cafile and openssl.capath are INI_PERDIR, so ini_set() cannot change them.
Management access, firmware and updatesAdministrator access to PHP hosts, HSM or TPM key storage, and how PHP binaries are patched. The PHP manual does not describe these points.Not documentedNot covered by PHP vendor documentation. Your platform team and your PHP distributor or hosting provider must confirm it.
Third-party extensions (ext-pqcrypto)Paragon's ext-pqcrypto implements ML-KEM, ML-DSA, SLH-DSA and X-Wing. It is not part of PHP core, and the repository showed no published releases on 3 December 2026.Not assessedInstalled as a separate extension. Paragon has not said it is audited and advised against production use for now.

How a PHP request reaches the OpenSSL library and certificate files

The diagram follows one PHP process. Application code calls the OpenSSL extension or the sodium extension directly, or opens a stream through the ssl:// or tls:// wrappers, which and ftps:// also use. The OpenSSL extension and the stream layer hand work to the linked OpenSSL library, which connects to the remote peer. Certificate and key files named in stream context options, such as local_cert and local_pk, are read from disk, and trust roots come from openssl.cafile and openssl.capath in php.ini. The third-party pqcrypto extension is optional and separately installed. Check the host's php.ini` and the linked OpenSSL build.

One PHP process, its OpenSSL paths and the files it reads.

Which PHP protocols and settings choose TLS algorithms

PHP chooses TLS algorithms in three places: stream context options for ssl:// and tls:// connections, the stream_socket_enable_crypto() call on a socket that is already open, and application code that calls the sodium extension. The cards below cover each path and its defaults. The effective cipher list depends on the OpenSSL library that your PHP build is linked against, so record that version with each setting.

TLS stream transports and inherited options

The ssl:// and tls:// stream transports take SSL context options, and https:// and ftps:// use ssl:// underneath, so the same options apply to every HTTPS and FTPS call that PHP opens. Any outbound client that passes a context inherits these settings. Find each place where your code or a third-party library creates a context with the ssl key, and note which connections carry explicit values and which rely on the defaults in the cards that follow.

SSL context options

Peer verification defaults

The verify_peer and verify_peer_name options default to true, and allow_self_signed defaults to false, so a stream that sets none of them still checks the server certificate and the name it presents. Trust roots come from cafile and capath in the stream context. The php.ini directives openssl.cafile and openssl.capath both default to an empty string and cannot be changed with ini_set(). Search for any context that turns verification off, and confirm which trust store your build reads.

OpenSSL configuration

Cipher list and protocol versions

The ciphers option defaults to DEFAULT, written in the format described in ciphers(1), while security_level, min_proto_version and max_proto_version use the OpenSSL library default when they are not set. Unset options follow the linked OpenSSL, so the same script can negotiate differently after an OpenSSL upgrade. The build option --with-system-ciphers makes PHP use the system cipher list, which replaces its built-in default. Pin the values you need in the context, and test them after each upgrade.

SSL context options

Method selection on open sockets

The stream_socket_enable_crypto() function starts TLS on a socket that is already open and selects the protocol with STREAM_CRYPTO_METHOD_* constants. The TLSv1_3 client and server constants were added in PHP 7.4.0. From PHP 8.0.0, a call with no method argument and no crypto_method option in the context throws a ValueError, so code that relied on an older default can fail after an upgrade. Check every call site and set the method explicitly.

stream_socket_enable_crypto manual

Sodium key exchange is separate

The sodium extension performs key exchange through sodium_crypto_kx_* functions that the application calls directly, so the ciphers, version and crypto_method settings above are not part of those calls. Identify each call site in your code and record which key exchange it runs. The sodium manual pages checked on 3 December 2026 document no ML-KEM, ML-DSA or SLH-DSA functions. Ask your vendors and library maintainers whether any newer release adds them.

Sodium manual

Windows builds and legacy algorithms

PHP 8.2.0 and later use OpenSSL 3.0.0 by default on Windows. In OpenSSL 3.x, legacy algorithms such as bf-cbc, rc4 and des-ecb are unavailable unless the legacy provider is loaded, so cipher names that worked on an older build may stop working. Legacy ciphers are unavailable unless the legacy provider is loaded. Confirm the OpenSSL version reported by your Windows PHP build, and test every stream that names a cipher.

OpenSSL installation

Which PHP certificates and keys to inventory, and who rotates them

PHP's server identity for TLS is set per stream context. The local_cert option points to the certificate file, local_pk points to the private key, and passphrase unlocks the key when it is encrypted. Applications that serve several host names can add SNI_server_certs, which maps each name to its own certificate and key. Because these options live in application code, the inventory has to be built from the stream contexts, not from the web server configuration alone.

  • Location: the paths set in local_cert, local_pk and each SNI_server_certs entry, usually inside the application or deployment directory.
  • Issuance: your certificate authority issues the certificate, and PHP only loads the files it is given.
  • Passphrase: if passphrase is set, record where that secret is stored, because the key cannot be loaded without it.
  • SNI entries: each name in SNI_server_certs carries its own certificate and key, so each one needs its own inventory row.
  • Rotation: the team that owns the deployment replaces the files and reloads the process, and that step should appear in its runbook.

Search every stream context in the codebase for these options, since a context can load a certificate that no web server configuration file mentions.

How PHP, OpenSSL and updates reach the host

PHP's cryptography arrives through several layers: the PHP branch you run, the OpenSSL library the build links, build options and separately installed extensions, and the host underneath. Each layer has its own owner and update path, so an inventory should record all of them, not only the PHP version.

Supported PHP branches

As of 3 December 2026, php.net lists PHP 8.6, released 19 November 2026, along with 8.5, 8.4, 8.3 and 8.2 as supported branches. 8.2 security support ends 31 December 2026, so any 8.2 deployment needs a planned move to a supported branch before that date. Record the exact patch release in your inventory, because branch support and patch level are separate facts. Confirm which branch and patch level your distributor packages, since packaged builds can lag the upstream release.

PHP supported versions

Source license terms

PHP's source code is licensed under the Modified BSD License. The copyright holders are listed as The PHP Group and Contributors and Zend Technologies Ltd., a subsidiary of Perforce Software, Inc. The license matters for your inventory if your organization builds PHP from source, patches it, or redistributes a modified build to customers. Have legal counsel confirm what those terms mean for your build pipeline. The license does not tell you which OpenSSL version a given build links, so record that separately.

PHP license page

OpenSSL library the build links

The OpenSSL extension is a binding to an OpenSSL library chosen at build time or by the distributor, so the same PHP version can link different OpenSSL releases. On Windows, PHP 8.2.0 and later use OpenSSL 3.0.0 by default. With OpenSSL 3.x, legacy algorithms such as bf-cbc, rc4 and des-ecb are unavailable unless the legacy provider is loaded, so check whether any application depends on them. Confirm the linked OpenSSL version on each host, and ask your distributor which OpenSSL release its packages carry.

OpenSSL installation

System cipher list build option

The --with-system-ciphers build option makes PHP use the system cipher list instead of its hard-coded default. That moves the list of TLS cipher suites under the control of the OpenSSL and system configuration on the host. The SSL context option ciphers is a separate setting and defaults to DEFAULT, in the format described in ciphers(1). Check whether your builds use this option, whether application code sets the ciphers context option, and where each list is maintained.

ext-pqcrypto is a separate extension

ext-pqcrypto, from Paragon Initiative Enterprises, is a third-party extension that is not part of PHP core and is installed separately. It implements ML-KEM, ML-DSA, SLH-DSA and an X-Wing hybrid, and it requires PHP 8.1 or later and a nightly Rust toolchain at rustc 1.85 or later. The repository showed no published releases on 3 December 2026. Paragon's April 2026 announcement does not say the extension has been audited, warns that there will be bugs, and advises against rushing it into production.

ext-pqcrypto repository

Host, firmware and secure boot

The operator controls the host, its firmware and its secure boot chain, and PHP and its packages have no role in them. These layers decide which OpenSSL packages install, how updates are applied and whether the boot chain verifies what runs. Ask your distributor how it signs PHP and OpenSSL packages and how you verify those signatures, since this page does not state that process. Include firmware and boot settings in the same inventory as the PHP version and OpenSSL release.

What to record for each PHP cryptographic inventory item

This table lists the fields to record for each PHP cryptographic inventory item, with where to read each value and the date it was checked. Read each row as one field in the inventory record, and refresh the date column when you re-check, since branch support and certificate expiry both change over time. The confidentiality period has to come from the data owner, since PHP cannot supply it, so it needs its own named source in the record.

FieldWhat to recordWhere to check itDate checked
Product and buildPHP build, distribution or package, and whether the openssl and sodium extensions are loadedPackage manager record and php -m on each hostDate the host was read
PHP version and patch levelExact version and patch level, and whether its branch is listed as supportedphp -v on each host, compared with the php.net supported versions page3 December 2026 for branch status, plus the host read date
Linked OpenSSL buildOpenSSL version the running PHP reports, including the library loaded at runtimephpinfo() OpenSSL section on each host. On Windows, PHP 8.2.0 and later default to OpenSSL 3.0.0Date the phpinfo() output was captured
OwnerTeam that runs the PHP build and the application code, with a named contactService catalog or change record for the applicationDate the owner was confirmed
LocationFile path, php.ini key (openssl.cafile, openssl.capath, openssl.libctx) and code path for each ssl://, tls://, https:// or ftps:// usephp --ini and the application repositoryDate the code and php.ini were last read
Protocol, algorithm and key sizeTLS version from crypto_method or min and max protocol options, plus key type and size from the certificate or openssl_pkey_new() callApplication code. The openssl_pkey_new() page does not state a default key size, so confirm it in the codeDate the code path was last read
Certificate issuer and expiryIssuer and expiry date of each certificate in local_cert, or the CA bundle in cafile or capath, with its renewal ownerThe certificate files themselves, read on the host that serves themDate the certificate was read
Configurable or vendor-fixedWhether each setting is set by the application, by php.ini or by the build. Ciphers default to DEFAULT unless the build uses --with-system-ciphersphp.ini, application code and the PHP build optionsDate the running configuration was confirmed
Confidentiality periodHow long the protected data must stay confidential, as stated by the data owner. PHP does not supply this valueData classification record or the data owner's written statementDate the data owner confirmed the period

Which PHP cryptographic items depend on public-key algorithms

Three groups of PHP items depend on public-key algorithms. The first is TLS in the stream and OpenSSL layers: key exchange and certificate signatures for ssl:// and tls:// connections, the and ftps:// wrappers that run on them, and the handshakes started by stream_socket_enable_crypto(). The second is the asymmetric keys in the OpenSSL extension: RSA, DSA, DH and EC keys from openssl_pkey_new(), and, since PHP 8.4.0, x25519, x448, ed25519 and ed448 keys. openssl_sign() uses those private keys to create signatures, and its algorithm parameter defaults to OPENSSL_ALGO_SHA1. The third is the sodium extension, which provides Ed25519 signatures through sodium_crypto_sign*, public-key boxes through sodium_crypto_box*, and key exchange through sodium_crypto_kx_*`. Record each of these separately, because key exchange protects session keys while signatures and certificates establish identity and integrity.

The remaining items are symmetric or hashing features, and they do not depend on public-key algorithms in the same way. openssl_encrypt() provides symmetric ciphers, and the OpenSSL extension also documents PBKDF2 and digests. password_hash() uses PASSWORD_DEFAULT, which is currently bcrypt, and the bcrypt default cost was raised from 10 to 12 in PHP 8.4.0. Sodium's sodium_crypto_pwhash* functions provide Argon2 password hashing. Check whether your code passes an explicit cost value or a fixed algorithm to these functions. An explicit setting overrides the runtime default, so it must appear in the inventory with the code that sets it, and a change to the PHP version alone will not change it.

As of 3 December 2026, the PHP manual pages checked for the OpenSSL extension, the SSL context options and the sodium extension document no ML-KEM, ML-DSA or SLH-DSA functions, constants or options. The PHP manual OpenSSL extension page also notes that OpenSSL has features the PHP module does not yet support, so an inventory should not record a post-quantum algorithm as available from these pages alone. Record each public-key item with the PHP version, the linked OpenSSL version and the sodium build in use. For how RSA and elliptic-curve keys are used in connections, logins and signatures, see the sibling page Which PHP features and APIs depend on RSA and elliptic-curve keys. For support status and upgrade work, see Does PHP support post-quantum cryptography? and What a post-quantum upgrade of PHP involves.

How to gather the PHP cryptographic inventory from code and configuration

This sequence gathers the PHP cryptographic inventory in the order the evidence appears: runtime and build first, then configuration, code, certificates and external endpoints. Each step names the output to record, so the result can be reviewed and dated. Questions that code and configuration cannot answer go to the distributor or vendor.

  1. Record PHP branch and patch level

    Run the PHP binary the application uses, including any alternate binary named in the service unit or container, and record the full output of php -v. Then record the version the package manager reports for that runtime and note any difference. Compare the branch, for example 8.4 or 8.5, with the supported versions page, which lists PHP 8.2 security support ending 31 Dec 2026. Done when the record holds the branch, the patch level and the source of each version, with the date you checked.

  2. Read php.ini OpenSSL settings

    Run php --ini to list the loaded php.ini file and any scanned configuration directories, then read openssl.cafile and openssl.capath from each file that applies to the handler you run, such as the web server SAPI and the CLI. Both directives default to an empty string, and both are INI_PERDIR, so ini_set() cannot change them at run time. Record openssl.libctx as well, which defaults to custom. Confirm the effective values with php -i in the same runtime. Done when each value is written down with its file path, or marked as unset.

  3. Search code for crypto calls

    Search the application and its vendored libraries, including vendor/, for SSL and TLS stream contexts, stream_socket_enable_crypto() calls, openssl_* and sodium_* calls, and password_hash() calls. Record each match with its file path, line number and the option or function used. For every stream_socket_enable_crypto() call, note whether a method constant is passed or the context sets crypto_method, because PHP 8.0.0 and later throws a ValueError when neither is present. Note and ftps://` calls, which use the ssl:// transport. Done when the list covers the code and the vendored libraries and each entry has a path.

  4. List curves in the linked OpenSSL

    Run php -r 'print_r(openssl_get_curve_names());' with the same binary and php.ini that the application uses, and save the output. The list shows the curves in the OpenSSL library that PHP is linked against. It does not show the curves a TLS connection negotiates. The manual names prime256v1 (NIST P-256) and secp384r1 (NIST P-384) as the most widely supported. Record the OpenSSL version from php -i beside the list. Done when the saved list and the OpenSSL version line share one dated record.

  5. Record certificates named in TLS settings

    For each local_cert, cafile and capath value from the code search and the php.ini values from the configuration read, open the certificate and record its subject, issuer and expiry date, for example with openssl x509 -noout -subject -issuer -enddate. For a capath directory, record every certificate file inside it. Mark any path that is missing or unreadable by the runtime user. Also note whether verify_peer, verify_peer_name and allow_self_signed are set away from their defaults of true, true and false. Done when every path has one row with issuer and expiry, or a missing flag.

  6. Scan TLS endpoints from outside the host

    From a host outside the PHP server, run a TLS scanner against each endpoint the application serves or calls, public and internal, and record the protocol versions, cipher suites and key exchange groups the endpoint negotiates. A scan shows what the endpoint accepts from that client, so it does not confirm the PHP settings on the calling side. Compare the results with any ciphers, security_level, min_proto_version and max_proto_version values found in the code search, and note where those options are unset and the OpenSSL library default applies. Done when each endpoint has a row with the negotiated values and the scan date.

  7. Send questions the code cannot answer

    Some facts cannot come from code or configuration: how the OpenSSL library was built (including whether PHP was built with --with-system-ciphers), whether release packages are signed, whether HSM or TPM support is available, and how updates are managed. Send these questions to your distributor or the PHP build vendor in writing. Log each answer with the date received and the name of the person who gave it. Done when every question has a dated answer, or a dated note that none was given.

Questions teams ask about PHP cryptographic inventory and readiness

Is PHP quantum safe, and does its OpenSSL extension support post-quantum algorithms?

No, the facts support only a narrow answer: PHP core does not document post-quantum support, so it cannot be described as quantum safe. As of 3 December 2026, the PHP manual pages checked for the OpenSSL extension, the SSL context options and the sodium extension document no ML-KEM, ML-DSA or SLH-DSA functions, constants or options. The php-src request for post-quantum support, issue 22862, is open, labeled Status: Requires RFC, and has no written maintainer plan. Issue 23421, which asked ext/openssl to expose ML-KEM and ML-DSA, was closed as a duplicate of it on 25 Aug 2026. The third-party ext-pqcrypto extension implements ML-KEM, ML-DSA, SLH-DSA and X-Wing, but it is not part of PHP core, its repository shows no published releases, and Paragon has said it has not been audited and advised against rushing it into production.

Which PHP version do we record in the cryptographic inventory?

Record the exact patch version of every PHP runtime, along with its branch and the OpenSSL library it is linked against. As of 3 December 2026, php.net lists PHP 8.6 (released 19 Nov 2026), 8.5, 8.4, 8.3 and 8.2 as supported branches. Security support for 8.2 ends 31 Dec 2026, so any 8.2 runtime in the inventory should be flagged for upgrade planning. Check the version on each host with php -v, then confirm the linked OpenSSL version in the php -i output, because the OpenSSL library decides which TLS and key functions are available. On Windows, PHP 8.2.0 and later use OpenSSL 3.0.0 by default. The supplied facts do not list patch releases, so confirm the exact patch version with your distributor or the release notes. Store the branch, patch version, OpenSSL build and php.ini path in the same record.

Does the cryptographic inventory cost extra for PHP applications?

The inventory is mostly staff time. Your engineers are paid to find PHP hosts, read php.ini and OpenSSL settings, and search code for stream, OpenSSL and sodium calls. If you bring in outside help, it should be under a written scope. DeployOpen's engagements are most often fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and DeployOpen does not publish a price list. No fee figure applies here because none is supplied. Inventory work is usually one-time, while refreshes recur after a PHP branch upgrade or a new application. Cost rises with the number of PHP runtimes and hosts, the number of applications and their age, the use of vendor-built PHP packages, and the amount of custom TLS, certificate and signing code. When you request a quote, ask for a written scope that names the systems, the deliverables, the review method and whether a refresh is included.

What breaks if we only inventory our PHP cryptography?

Nothing in the running systems changes when you only inventory. An inventory reads and records PHP versions, the OpenSSL build, php.ini directives such as openssl.cafile, openssl.capath and openssl.libctx, TLS stream settings, certificate and key file locations, and calls to functions such as openssl_pkey_new(), openssl_sign() and sodium_crypto_sign*. Recording a setting leaves it unchanged, so services keep running as they do today. Risk comes from what the inventory reveals, and those findings belong in an upgrade plan. For example, an illustrative finding would be an 8.2 runtime that leaves security support after 31 Dec 2026. Any change that follows is a separate action under your own change control. Keep the inventory read-only, use approved access to hosts and repositories, and store the evidence with each host record.

What should we ask our PHP distributor or vendor about post-quantum support?

Ask four things and request each answer in writing with a date. First, the status of php-src issue 22862 and whether a maintainer has planned work on it. As of 3 December 2026 it was open, labeled Status: Requires RFC, with no written maintainer plan. Second, the distributor's OpenSSL build: which OpenSSL version is linked, whether it is OpenSSL 3.x, and which algorithms and providers it enables. Third, signing: which PHP packages and extensions the distributor signs, and whether any post-quantum signing is planned for them. Fourth, hardware security modules: whether PHP keys can be held in an HSM in your deployment, and what the vendor has said about post-quantum support on that path. Where the vendor has published nothing on a point, record that fact along with the date you asked.

Can our own team run the PHP inventory without outside help?

Yes, for a first pass. Your team can list PHP branches and patch versions, read php.ini for the openssl.* and stream settings, and search code for the functions named in the PHP manual, including stream_socket_enable_crypto(), openssl_pkey_new(), openssl_csr_new(), openssl_sign(), password_hash() and the sodium_crypto_* functions. The work needs read access to hosts and repositories, a list of applications and a place to keep results. Outside help is available under a fixed scope when you want an independent review of the findings, a written inventory for an assessor, or support on a remediation plan. DeployOpen plans, documents and supports self-hosted platforms inside your infrastructure and prepares systems and evidence for compliance assessments. It does not issue audit reports or certifications. Independent auditors and certification bodies do that work.

Which PHP settings and functions should the inventory search for first?

Start where PHP sets TLS, keys and signatures. Search for stream_socket_enable_crypto() and the ssl:// and tls:// transports, which also apply to the https:// and ftps:// wrappers. Review SSL context options such as local_cert, local_pk, cafile, capath, ciphers, min_proto_version and max_proto_version. Where the options are unset, note it: for security_level, min_proto_version and max_proto_version, the OpenSSL library default applies, and ciphers defaults to DEFAULT. Check openssl.cafile and openssl.capath in php.ini, which are INI_PERDIR and cannot be changed with ini_set(). Then search openssl_pkey_new(), openssl_csr_new() and openssl_sign(), where the default algorithm is OPENSSL_ALGO_SHA1. Record sodium_crypto_sign*, sodium_crypto_box* and sodium_crypto_kx_* calls separately, because the sodium extension uses Ed25519 and Curve25519 operations.

How DeployOpen supports a PHP cryptographic inventory

DeployOpen treats a PHP cryptographic inventory as a scoped piece of work inside your own infrastructure. We map where your PHP applications call the OpenSSL extension, sodium and stream transports, record the settings that govern them, and hand over documented findings that your engineers and assessors can check.

How we scope

  • Written scope lists the PHP versions, applications, servers and hosts covered before any work starts.
  • Scope names the code paths: ssl:// and tls:// streams, https:// and ftps:// wrappers, openssl_* and sodium_crypto_* calls.
  • Fixed-scope engagements set deliverables and timelines in writing, and ongoing support is available as a retainer.

How we build

  • Inventory collects each place PHP sets ssl context options, php.ini directives and certificate or key files for TLS streams.
  • Settings review checks verify_peer, verify_peer_name, allow_self_signed, ciphers, and the min and max protocol version options.
  • Key use review lists openssl_pkey_new, openssl_csr_new, openssl_sign and sodium box, signing and key exchange call sites.

How we hand over

  • Inventory report records each cryptographic call site, the PHP and OpenSSL versions it was checked against, and its owner.
  • Notes separate public-key uses (TLS key exchange, certificate signatures, RSA, EC and Ed25519 keys) from symmetric and hashing uses.
  • PHP post-quantum status is recorded as of the review date, since the project's position can change.

How we support

  • Retests follow fixes so the inventory matches the PHP versions and php.ini settings running in production.
  • Upgrades of PHP and its OpenSSL library are implemented inside your infrastructure under a retainer or fixed scope.
  • Ongoing continuous testing can rerun the inventory checks when PHP releases or configuration changes.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.