{"id":32532667,"url":"https://github.com/fiam/sslkeylog","last_synced_at":"2025-10-28T12:54:46.531Z","repository":{"id":315765078,"uuid":"1060748791","full_name":"fiam/sslkeylog","owner":"fiam","description":"sslkeylog is a package for simplifying SSL/TLS keys extraction in Go applications","archived":false,"fork":false,"pushed_at":"2025-09-20T14:39:20.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-20T16:29:23.246Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/fiam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-20T14:11:00.000Z","updated_at":"2025-09-20T14:39:24.000Z","dependencies_parsed_at":"2025-09-21T04:16:40.655Z","dependency_job_id":null,"html_url":"https://github.com/fiam/sslkeylog","commit_stats":null,"previous_names":["fiam/sslkeylog"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/fiam/sslkeylog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiam%2Fsslkeylog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiam%2Fsslkeylog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiam%2Fsslkeylog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiam%2Fsslkeylog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fiam","download_url":"https://codeload.github.com/fiam/sslkeylog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiam%2Fsslkeylog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281441021,"owners_count":26501758,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-28T12:54:41.466Z","updated_at":"2025-10-28T12:54:46.525Z","avatar_url":"https://github.com/fiam.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sslkeylogfile\n\nA Go package that provides SSL/TLS key logging functionality for debugging purposes, compatible with Wireshark and other tools that support the `SSLKEYLOGFILE` environment variable.\n\n## Features\n\n- **Zero-overhead when disabled**: All functions are no-ops unless `SSLKEYLOGFILE` is set\n- **Thread-safe logging**: Supports multiple concurrent writers with per-config file management\n- **Multiple integration options**: Create custom configs, transports, or patch the default transport\n- **Automatic build integration**: Use `sslkeylog-go.sh` to inject SSL key logging into any Go main package\n\n## Usage\n\n### Environment Setup\n\nSet the `SSLKEYLOGFILE` environment variable to specify where SSL/TLS keys should be logged:\n\n```bash\nexport SSLKEYLOGFILE=/path/to/your/sslkeylogfile.log\n```\n\n### Manual Integration\n\n```go\nimport (\n    \"crypto/tls\"\n    \"net/http\"\n\n    \"github.com/fiam/sslkeylogfile\"\n)\n\n// Option 1: Custom TLS config\ntlsConfig, err := sslkeylogfile.NewTLSConfig()\nif err != nil {\n    panic(err)\n}\n\n// Option 2: Custom HTTP transport\ntransport, err := sslkeylogfile.NewTransport()\nif err != nil {\n    panic(err)\n}\nclient := \u0026http.Client{Transport: transport}\n\n// Option 3: Patch default transport\nif err := sslkeylogfile.PatchDefaultTransport(); err != nil {\n    panic(err)\n}\n```\n\n### Automatic Integration with sslkeylog-go.sh\n\nThe `sslkeylog-go.sh` script provides seamless integration by automatically injecting the autopatch import into your main packages during build:\n\n```bash\n# Build with SSL key logging enabled\n./sslkeylog-go.sh build ./cmd/myapp\n\n# Install with SSL key logging enabled\n./sslkeylog-go.sh install ./...\n\n# Works with any go build/install arguments\n./sslkeylog-go.sh build -ldflags=\"-s -w\" ./cmd/myapp\n```\n\nThe script:\n- Automatically detects `package main` directories in your build arguments\n- Injects `import _ \"github.com/fiam/sslkeylogfile/autopatch\"` using Go's overlay feature\n- Requires no code changes to your application\n- Fails safely if no main packages are found\n\n#### Script Usage\n\n```bash\n./sslkeylog-go.sh {build|install} [go-build-args...]\n```\n\nThe script accepts the same arguments as `go build` or `go install`, but automatically adds SSL key logging to any main packages being built.\n\n## How It Works\n\n- **File Management**: Creates separate log files per `tls.Config` to support concurrent usage\n- **File Naming**: Uses the `SSLKEYLOGFILE` pattern with sequence numbers (e.g., `sslkeylogfile`, `sslkeylogfile.1`, etc.)\n- **Format Compatibility**: Outputs keys in the standard format expected by Wireshark and similar tools\n- **Autopatch**: The `autopatch` package automatically calls `PatchDefaultTransport()` on import\n\n## Security Considerations\n\n⚠️ **Warning**: This package logs SSL/TLS keys which can be used to decrypt network traffic. Only use in development/debugging environments. Never use in production with sensitive data.\n\n## License\n\nSee LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiam%2Fsslkeylog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiam%2Fsslkeylog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiam%2Fsslkeylog/lists"}