Commit d5b6122
Feature/tls password support (#205)
* Implement mock definition validation and enhance error handling
* Refactor mappingCreateHandler to validate mock definition directly
* Add request path validation to Definition struct
* Fix Validate method receiver type
Change from pointer receiver to value receiver to fix compilation error
in mapping.go where mock.Validate() is called on a value type.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add support for password-protected TLS private keys
Resolves #116
This feature allows mmock to work with encrypted TLS private key files
by adding support for password authentication.
Features added:
- New --tls-key-password command line flag for specifying key password
- Environment variable MMOCK_TLS_KEY_PASSWORD for secure password input
- Automatic fallback to standard loading for unencrypted keys
- Support for multiple private key formats (PKCS#1, PKCS#8, EC)
- Comprehensive error handling with descriptive messages
Usage examples:
mmock --tls-key-password mypassword
MMOCK_TLS_KEY_PASSWORD=mypassword mmock
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a7550b3 commit d5b6122
File tree
8 files changed
+243
-213
lines changed- cmd/mmock
- internal
- console/ui/assets
- server
8 files changed
+243
-213
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| 171 | + | |
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
175 | 184 | | |
176 | 185 | | |
177 | 186 | | |
| |||
197 | 206 | | |
198 | 207 | | |
199 | 208 | | |
200 | | - | |
| 209 | + | |
201 | 210 | | |
202 | 211 | | |
203 | 212 | | |
| |||
This file was deleted.
0 commit comments