Write SSH keys in default encoding
The code change will take, if provided, the user property setting of an ssh key's file encoding, and it will set it on the remote agent's computer. If left unset, it will use the default of UTF-8.
This feature is needed for edge systems that don't use UTF-8 natively, like zOS(the mainframe). So, to allow the ssh keyfiles to be generated correctly, we can specify the encoding type.
This has been manually tested on a jenkins/zOS, and works as intended.
Can this not just be set to ASCII?
Unfortunately, no. zOS natively uses IBM-1047 (EBCDIC) code pages. This seems to be the only way that this could be addressed for that operating system.
So then the correct fix should be to use the agent JVM’s default encoding? Which would usually be UTF-8, occasionally some ASCII superset on Windows machines for example, and EBCDIC on z/OS?
BTW what will the impact be on z/OS of https://github.com/openjdk/jdk/pull/4733 whenever that is ported?
sorry, I am in the process of validating this now, and will clean up the pull request once everything is validated.