martijnbrands_3
Feb 22, 2019Nimbostratus
Rest API generate key with passphrase
How can I generate a key with passphrase through the REST API. I do the following :
POST mgmt/tm/sys/crypto/key
{
"name": "/Common/test.domain.nl123.key",
"keyType": "rsa-private",
"securityType": "password",
"password": "$M$1p$1JabAKC3V/riq3CHKwBNCw=="
}
RESPONSE
{
"kind": "tm:sys:crypto🔑keystate",
"name": "/Common/test.domain.nl123.key",
"fullPath": "/Common/test.domain.nl123.key",
"generation": 5164,
"selfLink": "https://localhost/mgmt/tm/sys/crypto/key/~Common~test.domain.nl123.key?ver=12.1.3.2",
"keySize": "2048",
"keyType": "rsa-private",
"securityType": "normal"
}
The securityType is still "normal". Try also with "passphrase": "$M$1p$1JabAKC3V/riq3CHKwBNCw==" but then the response is:
{
"code": 400,
"message": "\"passphrase\" may not be specified in the context of the \"create\" command.
\"passphrase\" may be specified using the following commands: install",
"errorStack": [],
`text`"apiError": 26214401
}