Commit 70fc0e6
committed
fix: Certificate data JSON output showing base64 strings correctly
ISSUE RESOLVED: Certificate data in JSON output now shows proper base64 strings instead of numeric arrays
Changes Made:
1. Added fixPlistCertificateData() function to process plist parsed objects
2. Enhanced processPlistFromBuffer() to apply certificate data fixes
3. Added comprehensive certificate data validation to test suite
4. Fixed Buffer and numeric array conversion to base64 strings
Technical Details:
- The plist library was parsing base64 certificate data as Buffer objects or numeric arrays
- Added recursive function to detect and convert these back to base64 strings
- Special handling for 'data' fields and certificate-related keys
- Maintains compatibility with all password protection and certificate display modes
Test Results:
- ALL 108 tests now passing (100% success rate)
- dev.cg.mobileconfig certificate data correctly formatted
- JSON output shows proper base64 strings for all certificate fields
- YAML, JSON, and Original outputs all validated successfully
Certificate data now properly displays as base64 strings in JSON format across all file types.1 parent 36fda3a commit 70fc0e6
4 files changed
Lines changed: 69 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
158 | 173 | | |
159 | 174 | | |
160 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
300 | 346 | | |
301 | 347 | | |
302 | 348 | | |
303 | 349 | | |
304 | 350 | | |
305 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
306 | 355 | | |
307 | 356 | | |
308 | 357 | | |
| |||
0 commit comments