示例:使用REST API生成自签名的证书

以下示例生成自签名证书。

示例方法和URI:

发帖“ https://192.0.2.5/rest/v1/证书”

示例请求主体:

{...“ centerry_name”:“ my-cert-1”,“主题”:{“ country”:“ us”,“ state”:“ ca”,“ org”:“ hpe”,“ org_unit”:“”aruba“,“ common_name”:“ cx-8400”},“ key_type”:“ rsa”,“ key_size”:2048,“ cert_type”:“自我签名” ...}

示例卷曲命令:

$curl -noproxy 192.0.2.5 -K -X Post \ -b/tmp/auth_cookie \“ https://192.0.2.5/rest/v1/证书” –d'{...“ cidter_name”:“ my-cert-1”,“主题”:{“ country”:“ us”,“ state”:“ ca”,“ org”:“ hpe”,“ org_unit”:“ aruba”,“ common_name”:“ cx-8400”},“ key_type”:“ rsa”,“ key_size”:2048,“ cert_type”:“ selfsigned”

成功完成后,开关返回响应代码201。