{"id":15457536,"url":"https://github.com/stayallive/tlsa-php","last_synced_at":"2025-06-25T03:06:59.027Z","repository":{"id":43317127,"uuid":"148890664","full_name":"stayallive/tlsa-php","owner":"stayallive","description":"TSLA RR builder for PHP.","archived":false,"fork":false,"pushed_at":"2023-09-05T13:24:50.000Z","size":38,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-08T21:11:55.651Z","etag":null,"topics":["dns","php","tlsa"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stayallive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"stayallive"}},"created_at":"2018-09-15T10:06:08.000Z","updated_at":"2022-03-01T14:52:52.000Z","dependencies_parsed_at":"2024-10-27T00:04:38.779Z","dependency_job_id":null,"html_url":"https://github.com/stayallive/tlsa-php","commit_stats":{"total_commits":11,"total_committers":4,"mean_commits":2.75,"dds":0.6363636363636364,"last_synced_commit":"15c55926dd92fe5f733a94fc05ed45178e30e247"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/stayallive/tlsa-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stayallive%2Ftlsa-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stayallive%2Ftlsa-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stayallive%2Ftlsa-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stayallive%2Ftlsa-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stayallive","download_url":"https://codeload.github.com/stayallive/tlsa-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stayallive%2Ftlsa-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261795318,"owners_count":23210619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","php","tlsa"],"created_at":"2024-10-01T22:46:53.103Z","updated_at":"2025-06-25T03:06:59.006Z","avatar_url":"https://github.com/stayallive.png","language":"PHP","funding_links":["https://github.com/sponsors/stayallive"],"categories":[],"sub_categories":[],"readme":"# TSLA RR builder for PHP\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/stayallive/tlsa.svg?style=flat-square)](https://packagist.org/packages/stayallive/tlsa)\n[![Total Downloads](https://img.shields.io/packagist/dt/stayallive/tlsa.svg?style=flat-square)](https://packagist.org/packages/stayallive/tlsa)\n\nThis package contains a class that can generate TLSA resource records.\n\n```php\n$tlsa = new Stayallive\\TLSA\\Builder('alexbouma.me');\n\n$tlsa-\u003eforCertificate($pemEncodedCertificate);\n\n$tlsa-\u003egetRecord(); // returns the full DNS record\n\n$tlsa-\u003egetRecordContents(); // returns the DNS record contents only\n```\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require stayallive/tlsa\n```\n\n## Usage\n\nThe class can generate a TLSA resource record for all certificate usages, selectors and matching types.\n\nFor more information check out the Wikipedia entry: https://en.wikipedia.org/wiki/DNS-based_Authentication_of_Named_Entities#RR_data_fields\n\n``` php\nuse Stayallive\\TLSA;\n\n$tlsa = new TLSA\\Builder('alexbouma.me', 25, 'udp'); // Builder for the alexbouma.me domain, port 25 and the UDP protocol\n\n$tlsa-\u003eforCertificate($pemEncodedCertificate);\n$tlsa-\u003eforPublicKey($pemEncodedPublicKey);\n\n$tlsa-\u003ecertificateUsage(TLSA\\Builder::CERTIFICATE_USAGE_DOMAIN_ISSUED_CERTIFICATE); // Set the certificate usage to `3` (default)\n\n$tlsa-\u003eselector(TLSA\\Builder::SELECTOR_PUBLIC_KEY); // Set the selector to `1` (default)\n\n$tlsa-\u003ematchingType(TLSA\\Builder::MATCHING_TYPE_SHA256); // Set the matching type to `1` (default)\n\n$dns-\u003egetRecord(); // returns the full DNS record\n$dns-\u003egetRecordContents(); // returns the DNS record contents\n```\n\n### Testing\n\n``` bash\ncomposer test\n```\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Security\n\nIf you discover any security related issues, please email me@alexbouma.me instead of using the issue tracker.\n\n## Credits\n\n- [Alex Bouma](https://github.com/stayallive)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstayallive%2Ftlsa-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstayallive%2Ftlsa-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstayallive%2Ftlsa-php/lists"}