Client Certificate Download Utility - cert2src

I have published a basic command line utility for downloading and exporting the chain root certificate required for TinyCLR OS to access secure sites. This eliminates the need to download them manually from a web browser.

Certificate can be exported in Security Certificate File Format (crt) commonly embedded as a binary project resource or source code added directly to a project as a byte array. Also, using build tasks this utility can be used to automate updating project certificates on build.

I wanted to share in case anyone else finds it useful. Here are a couple usage examples:

C:\project>cert2src.exe --path


[Intentionally omitted]


Root certificate successfully exported to 'C:\project\certificate.crt'
Root certificate downloaded from ''
C:\project>cert2src.exe --path --code --width 10

private static readonly byte[] Certificate =
     0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e,
     0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41,

     [Intentionally omitted]

     0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45,
     0x2d, 0x2d, 0x2d, 0x2d, 0x0d, 0x0a

Root certificate successfully exported to 'C:\project\certificate.cs'
Root certificate downloaded from ''