Commit 60d61fb
committed
ci(ios): say which secret is wrong instead of failing inside base64
The first run of this step died on
base64: stdin: (null): error decoding base64 input stream
Error: Process completed with exit code 1
which names neither the secret nor the mistake, in a step whose whole job
is to stop a signing problem from being cryptic.
The value was a *path* rather than the file's contents. I could not find
any other input that produces that message: empty, wrapped lines, stray
spaces and even a PEM header all decode without complaint on macOS, so the
one thing it does say is the one thing it says badly.
So the decode is guarded and its result is checked. Whitespace is stripped
first, because a value that travelled through a browser text field arrives
with whatever that field did to it, and `base64 --decode` is not uniformly
forgiving about it across runner images. Then the bytes have to start 0x30,
the DER SEQUENCE tag — a .cer, a PEM or a truncated paste all reach
`security import` otherwise, and it answers "Unknown format in import",
which is the same problem one layer further down.1 parent c667f37 commit 60d61fb
1 file changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
79 | 107 | | |
80 | 108 | | |
81 | 109 | | |
| |||
0 commit comments