Starting October 27, 2016, this is the first Google search for “yaml rsa key”, so I would like to add an answer to the specific syntax needed for Yamaha RSA keys.
If you include the key on one line in the yaml file, there is no problem. If you want to split it on different lines for readability, and you cannot accept newlines in the generated line, the only option seems to be double quotes with escape codes.
In my case, I needed a generated single-line string with no spaces, since the key definition was used by the template engine to insert the key into the script variable. The following syntax is attached to each line without spaces (note the "\" in each line to remove translation lines):
yourKey: "-----BEGIN PUBLIC KEY-----\ xxx...\ yyy...\ zzz...\ -----END PUBLIC KEY-----" result: "-----BEGIN PUBLIC KEY-----xxx...yyy...zzz...-----END PUBLIC KEY-----"
A very good link to the formats for literals can be found here on SO: https://stackoverflow.com/a/16815/
dlouzan
source share