Importing a Server Certificate

Function

This interface is used to import a server certificate.

Syntax

Operation type: POST

URL: https://device_ip/redfish/v1/Systems/SecurityService/HttpsCert/Actions/HttpsCert.ImportServerCertificate

Request header:

X-Auth-Token: auth_value
Content-Type: header_type

Request message body:

{
    "FileName":filename,
    "Password":password
}

Request Parameters

Table 1 Request parameters

Parameter

Mandatory/Optional

Parameter Description

Value

FileName

Mandatory

Server certificate file name.

The value is a character string. Only certificates in .cer or .crt format are supported.

The value contains 1 to 255 characters, including uppercase and lowercase letters (a to z and A to Z), digits (0 to 9), and other characters (_.-). The value cannot contain two consecutive periods (..). The suffix can only be crt or cer.

Password

Mandatory

Password of the current user.

The value is a user-defined character string.

The value contains 8 to 20 characters, including at least three types of the following characters: uppercase letters, lowercase letters, digits, other characters (``~!@#$%^&*()-_=+\|[{}];:'",<.>/?), and spaces.

Usage Guidelines

None

Example

Request:

POST https://10.10.10.10/redfish/v1/Systems/SecurityService/HttpsCert/Actions/HttpsCert.ImportServerCertificate

Request header:

X-Auth-Token: auth_value
Content-Type: application/json

Request message body:

{
    "FileName":"server.crt",
    "Password":"password"
}
Response:
{
    "error": {
        "code": "Base.1.0.Success",
        "message": "Operation success. See ExtendedInfo for more information.",
        "@Message.ExtendedInfo": [
            {
                "@odata.type": "#MessageRegistry.v1_0_0.MessageRegistry",
                "Description": "Indicates that no error has occurred.",
                "Message": "Import custom certificate successfully.",
                "Severity": "OK",
                "NumberOfArgs": null,
                "ParamTypes": null,
                "Resolution": "None"
            }
        ]
    }
}

Response code: 202

Output Description

Table 2 Operation output description

Field

Type

Description

code

Character string

A string indicating the specific message ID in the message registry.

message

Character string

A readable message corresponding to a message in the message registry.

@odata.type

Character string

OData description of a message resource.

Description

Character string

Detailed description of a message resource.

Message

Character string

Detailed information about a message resource.

Severity

Character string

Severity.

  • OK
  • Warning
  • Critical

NumberOfArgs

Number

Number of parameters in a message description.

ParamTypes

Array

Parameter type list.

Resolution

Character string

Event handling suggestions.