Forum Discussion

Chris_07_140190's avatar
Chris_07_140190
Icon for Nimbostratus rankNimbostratus
Oct 16, 2015

Generate CSR via API

We have successfully made a call to the iControl REST API to create a key using /sys/crypto/key, and even though we're specifying 'gen-csr', it is not obvious how we actually obtain the CSR.

 

Using TMSH on the command line, it appears that the CSR is just printed out. But via the API, we don't get anything about the CSR in the response.

 

There must be a way to access it?

 

2 Replies

  • Try this:

    tmsh create sys crypto key test.key gen-csr common-name test && tmsh list sys crypto csr test.csr
    

    You can then pipe that output to a file.

  • R_Marc's avatar
    R_Marc
    Icon for Nimbostratus rankNimbostratus

    I just answered this in another thread

     

    Basically does what Kevin suggests, just via the API.