Regenerate device identity certificate without using the GUI

Is there any way to regenerate the device identity cert via tmsh, SOAP, or REST?

When you change the device name in the GUI it allows you to select “Generate a new self signed authority” as well as “Specify a User Defined Authority”. Are there tmsh equivalents of this?

You can do via openssl, see this solution:

I had quick look using tmsh, and does not look like is possible via tmsh. I doubt you can do with iControl SOAP. iControl REST works on top of tmsh, so if tmsh does not have the command REST will not have.