PHPackages                             pantheon-systems/drupal\_tls\_checker - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. pantheon-systems/drupal\_tls\_checker

ActiveDrupal-module[HTTP &amp; Networking](/categories/http)

pantheon-systems/drupal\_tls\_checker
=====================================

A scanner for outgoing HTTP requests in Drupal code to check TLS 1.2/1.3 compatibility.

1.0.0(1y ago)03.0k↓47.1%[3 PRs](https://github.com/pantheon-systems/drupal_tls_checker/pulls)MITPHPCI passing

Since Mar 5Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/pantheon-systems/drupal_tls_checker)[ Packagist](https://packagist.org/packages/pantheon-systems/drupal_tls_checker)[ RSS](/packages/pantheon-systems-drupal-tls-checker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (6)Used By (0)

Drupal TLS Compatibility Checker
================================

[](#drupal-tls-compatibility-checker)

[![Unofficial Support](https://camo.githubusercontent.com/a2715fb40335a172cd189b166de44cd63f82f818ba6b94af958a799eb5f8293a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50616e7468656f6e2d556e6f6666696369616c5f537570706f72742d79656c6c6f773f6c6f676f3d70616e7468656f6e26636f6c6f723d464644433238)](https://docs.pantheon.io/oss-support-levels#unofficial-support)[![Test Drush CLI](https://github.com/pantheon-systems/drupal_tls_checker/actions/workflows/test-drush.yml/badge.svg)](https://github.com/pantheon-systems/drupal_tls_checker/actions/workflows/test-drush.yml)[![Lint](https://github.com/pantheon-systems/drupal_tls_checker/actions/workflows/lint.yml/badge.svg)](https://github.com/pantheon-systems/drupal_tls_checker/actions/workflows/lint.yml)[![GitHub Release](https://camo.githubusercontent.com/969f99a46ed4dc06bb1d873b8c97faae752304c1fe35718142dbd4dc1b8e3bb2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f70616e7468656f6e2d73797374656d732f64727570616c5f746c735f636865636b6572)](https://camo.githubusercontent.com/969f99a46ed4dc06bb1d873b8c97faae752304c1fe35718142dbd4dc1b8e3bb2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f70616e7468656f6e2d73797374656d732f64727570616c5f746c735f636865636b6572)[![GitHub License](https://camo.githubusercontent.com/1428f67a777a4153348c15679d1b3eb46a1d7ad80dd3b7cea115f1b17060f07b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70616e7468656f6e2d73797374656d732f64727570616c5f746c735f636865636b6572)](https://camo.githubusercontent.com/1428f67a777a4153348c15679d1b3eb46a1d7ad80dd3b7cea115f1b17060f07b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70616e7468656f6e2d73797374656d732f64727570616c5f746c735f636865636b6572)

Stable tag: 1.0.0
Contributors: [jazzsequence](https://github.com/jazzsequence)

---

A scanner for outgoing HTTP requests in Drupal code to check TLS 1.2/1.3 compatibility.

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
composer require pantheon-systems/drupal_tls_checker
```

### Manual Installation

[](#manual-installation)

1. Download the module from the [GitHub repository](https://github.com/pantheon-systems/drupal_tls_checker/releases).
2. Extract the downloaded archive.
3. Upload the extracted folder to the `modules/custom` directory of your Drupal installation.
4. Navigate to the **Extend** page in your Drupal admin panel (`/admin/modules`).
5. Find the **TLS Compatibility Checker** module in the list and enable it.
6. Click the **Install** button.

Usage
-----

[](#usage)

There are two ways to use the TLS Checker: via the Drupal admin or via Drush. The module adds a TLS Compatibility Checker page to `/admin/config/development/tls-checker`. This page allows you to run a TLS scan on your site against `/modules` and `/themes` and all subdirectories (including `/contrib` and `/custom`). When the scan is complete, a list of URLs that are not compatible with TLS 1.2 or higher will be displayed.

[![TLS Compatibility Checker scan](./.github/drupal_tls_checker_scan.png)](./.github/drupal_tls_checker_scan.png)

You can also run the scan using the [Drush command described below](#drush-commands).

In either case, both *passing* and *failing* urls are stored to the database. Subsequent scans will automatically *skip* the TLS check for URLs that are known to have passed previously (while still testing URLs that were previously failing). This data can be reset at any time either by using the `tls-checker:reset` command from Drush or in the admin with the "Reset TLS Scan Data" button.

After a scan has been run, if there are any URLs detected that fail the TLS 1.2/1.3 check, an alert will be displayed on the admin page with a list of the failing URLs.

Drush Commands
--------------

[](#drush-commands)

### `scan`

[](#scan)

Runs the TLS checker scan across all PHP files in the given directories (defaults to `/modules` and `/themes`). You can specify a directory by passing a `--directory` flag, e.g.:

```
drush tls-checker:scan --directory=/modules/custom
```

#### Examples

[](#examples)

```
drush tls-checker:scan
```

```
drush tls-checker:scan --directory=/private/scripts/quicksilver
```

Or, in a Pantheon environment using Terminus:

```
terminus drush -- . tls-checker:scan
```

### `report`

[](#report)

Returns a full report of checked URLs and whether they passed or failed the TLS check. Supports multiple formats (table, JSON, CSV, YAML).

#### Examples

[](#examples-1)

```
drush tls-checker:report
```

```
drush tls-checker:report --format=json | jq
```

```
drush tls-checker:report --format=csv
```

Or, in a Pantheon environment using Terminus:

```
terminus drush -- . tls-checker:report
```

### `reset`

[](#reset)

Resets the stored passing and failing URLs so the next scan will re-check all discovered URLs.

#### Examples

[](#examples-2)

```
drush tls-checker:reset
```

```
terminus drush -- . tls-checker:reset
```

How do I know it worked?
------------------------

[](#how-do-i-know-it-worked)

If the scan doesn't find anything bad, you should be good to go. If it does, it will list the URLs that it found that weren't compatible. However, if you want to validate that it's working, you can create a new module with the following code:

```
