Legrand / Raritan / Server Technology Xerus™ JSON-RPC API

Loading...
Searching...
No Matches
ServerSSLCert.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2010 Raritan Inc. All rights reserved.
4 */
5
6/**
7 * TLS Certificate Management
8 */
9module cert {
10
11 /** TLS certificate management interface */
12 interface ServerSSLCert {
13
14 /** success code */
15 constant int SUCCESS = 0;
16
17 /** key-pair generation error codes */
18 constant int ERR_GEN_KEY_LEN_INVALID = 100;
19 constant int ERR_GEN_CSR_OR_CERT_PENDING = 101;
20 constant int ERR_GEN_KEY_GEN_FAILED = 102;
21 constant int ERR_GEN_KEY_TYPE_INVALID = 103;
22 constant int ERR_GEN_ELLIPTIC_CURVE_INVALID = 104;
23
24 /** key-pair installation error codes */
25 constant int ERR_INSTALL_KEY_MISSING = 200;
26 constant int ERR_INSTALL_CERT_MISSING = 201;
27 constant int ERR_INSTALL_CERT_FORMAT_INVALID = 202;
28 constant int ERR_INSTALL_CERT_KEY_MISMATCH = 203;
29 constant int ERR_INSTALL_KEY_FORMAT_INVALID = 204;
30
31 /** Certificate issuer or subject attributes */
32 structure CommonAttributes {
33 string country; ///< Country code
34 string stateOrProvince; ///< State or province
35 string locality; ///< Locality or city
36 string organization; ///< Organization
37 string organizationalUnit; ///< Organizational Unit
38 string commonName; ///< Common Name
39 string emailAddress; ///< Email Address
40 };
41
42 /** Supported key types */
43 enumeration KeyType {
44 KEY_TYPE_UNKNOWN, ///< Key type unknown (only allowed as return value)
45 KEY_TYPE_RSA, ///< RSA key
46 KEY_TYPE_ECDSA ///< ECDSA key
47 };
48
49 /** Supported elliptic curves for key type ECDSA */
50 enumeration EllipticCurve {
51 EC_CURVE_UNKNOWN, ///< Curve unknown (only allowed as return value)
52 EC_CURVE_NIST_P256, ///< NIST curve P-256 (also known as secp256r1 and prime256v1)
53 EC_CURVE_NIST_P384, ///< NIST curve P-384 (also known as secp384r1)
54 EC_CURVE_NIST_P521 ///< NIST curve P-521 (also known as secp521r1)
55 };
56
57 /**
58 * Certificate signing request information
59 *
60 * If names is empty then commonName from the subject is used as single entry.
61 */
62 structure ReqInfo {
63 CommonAttributes subject; ///< Certificate subject attributes
64 vector<string> names; ///< DNS names and/or IP addresses
65 KeyType keyType; ///< Key type
66 EllipticCurve ellipticCurve;///< Selected elliptic curve (only relevant if key type is ECDSA)
67 int rsaKeyLength; ///< Length of the RSA key in bits (only relevant if key type is RSA)
68 };
69
70 /** Certificate information */
71 structure CertInfo {
72 CommonAttributes subject; ///< Subject attributes
73 CommonAttributes issuer; ///< Issuer attributes
74 vector<string> names; ///< DNS names and/or IP addresses
75 string invalidBefore; ///< Begin of validity period
76 string invalidAfter; ///< End of validity period
77 string serialNumber; ///< Serial number
78 KeyType keyType; ///< Key type
79 EllipticCurve ellipticCurve;///< Selected elliptic curve (only relevant if key type is ECDSA)
80 int rsaKeyLength; ///< Length of the RSA key in bits (only relevant if key type is RSA)
81 };
82
83 /** Certificate manager information */
84 structure Info {
85 boolean havePendingReq; ///< \c true if a CSR is pending
86 boolean havePendingCert; ///< \c true if an uploaded certificate is pending activation
87 ReqInfo pendingReqInfo; ///< Information about pending CSR
88 CertInfo pendingCertInfo; ///< Information about pending certificate file (device certificate)
89 vector<CertInfo> pendingCertChainInfos; ///< Information about pending certificate file (remaining certificate chain if available)
90 CertInfo activeCertInfo; ///< Information about active certificate file (device certificate)
91 vector<CertInfo> activeCertChainInfos; ///< Information about active certificate file (remaining certificate chain if available)
92 int maxSignDays; ///< Maximum number of days a self signed certificate will be valid.
93 };
94
95 /**
96 * Generate an unsigned key pair.
97 *
98 * @param reqInfo Certificate signing request information
99 * @param challenge Challenge password
100 *
101 * @return SUCCESS or one of the error code constants
102 */
103 int generateUnsignedKeyPair(in ReqInfo reqInfo, in string challenge);
104
105 /**
106 * Generate a self-signed key pair.
107 *
108 * @param reqInfo Certificate signing request information
109 * @param days Number of days the certificate will be valid
110 *
111 * @return SUCCESS or one of the error code constants
112 */
113 int generateSelfSignedKeyPair(in ReqInfo reqInfo, in int days);
114
115 /**
116 * Remove a pending certificate signing request or certificate.
117 */
118 void deletePending();
119
120 /**
121 * Retrieve certificate manager information.
122 *
123 * @param info Result: Certificate manager information
124 */
125 void getInfo(out Info info);
126
127 /**
128 * Activate a pending key pair.
129 *
130 * @return SUCCESS or one of the error code constants
131 */
132 int installPendingKeyPair();
133
134 };
135
136}
cert::ServerSSLCert
TLS certificate management interface.
Definition ServerSSLCert.idl:12
cert::ServerSSLCert::KeyType
KeyType
Supported key types.
Definition ServerSSLCert.idl:43
cert::ServerSSLCert::KEY_TYPE_RSA
@ KEY_TYPE_RSA
RSA key.
Definition ServerSSLCert.idl:45
cert::ServerSSLCert::KEY_TYPE_UNKNOWN
@ KEY_TYPE_UNKNOWN
Key type unknown (only allowed as return value)
Definition ServerSSLCert.idl:44
cert::ServerSSLCert::deletePending
void deletePending()
Remove a pending certificate signing request or certificate.
cert::ServerSSLCert::generateSelfSignedKeyPair
int generateSelfSignedKeyPair(in ReqInfo reqInfo, in int days)
Generate a self-signed key pair.
cert::ServerSSLCert::EllipticCurve
EllipticCurve
Supported elliptic curves for key type ECDSA.
Definition ServerSSLCert.idl:50
cert::ServerSSLCert::EC_CURVE_NIST_P256
@ EC_CURVE_NIST_P256
NIST curve P-256 (also known as secp256r1 and prime256v1)
Definition ServerSSLCert.idl:52
cert::ServerSSLCert::EC_CURVE_NIST_P384
@ EC_CURVE_NIST_P384
NIST curve P-384 (also known as secp384r1)
Definition ServerSSLCert.idl:53
cert::ServerSSLCert::EC_CURVE_UNKNOWN
@ EC_CURVE_UNKNOWN
Curve unknown (only allowed as return value)
Definition ServerSSLCert.idl:51
cert::ServerSSLCert::installPendingKeyPair
int installPendingKeyPair()
Activate a pending key pair.
cert::ServerSSLCert::getInfo
void getInfo(out Info info)
Retrieve certificate manager information.
cert::ServerSSLCert::generateUnsignedKeyPair
int generateUnsignedKeyPair(in ReqInfo reqInfo, in string challenge)
Generate an unsigned key pair.
cert
TLS Certificate Management.
Definition ServerSSLCert.idl:9
cert::ServerSSLCert::CertInfo
Certificate information.
Definition ServerSSLCert.idl:71
cert::ServerSSLCert::CertInfo::rsaKeyLength
int rsaKeyLength
Length of the RSA key in bits (only relevant if key type is RSA)
Definition ServerSSLCert.idl:80
cert::ServerSSLCert::CertInfo::keyType
KeyType keyType
Key type.
Definition ServerSSLCert.idl:78
cert::ServerSSLCert::CertInfo::names
vector< string > names
DNS names and/or IP addresses.
Definition ServerSSLCert.idl:74
cert::ServerSSLCert::CertInfo::invalidAfter
string invalidAfter
End of validity period.
Definition ServerSSLCert.idl:76
cert::ServerSSLCert::CertInfo::serialNumber
string serialNumber
Serial number.
Definition ServerSSLCert.idl:77
cert::ServerSSLCert::CertInfo::issuer
CommonAttributes issuer
Issuer attributes.
Definition ServerSSLCert.idl:73
cert::ServerSSLCert::CertInfo::ellipticCurve
EllipticCurve ellipticCurve
Selected elliptic curve (only relevant if key type is ECDSA)
Definition ServerSSLCert.idl:79
cert::ServerSSLCert::CertInfo::subject
CommonAttributes subject
Subject attributes.
Definition ServerSSLCert.idl:72
cert::ServerSSLCert::CertInfo::invalidBefore
string invalidBefore
Begin of validity period.
Definition ServerSSLCert.idl:75
cert::ServerSSLCert::CommonAttributes
Certificate issuer or subject attributes.
Definition ServerSSLCert.idl:32
cert::ServerSSLCert::CommonAttributes::organization
string organization
Organization.
Definition ServerSSLCert.idl:36
cert::ServerSSLCert::CommonAttributes::emailAddress
string emailAddress
Email Address.
Definition ServerSSLCert.idl:39
cert::ServerSSLCert::CommonAttributes::country
string country
Country code.
Definition ServerSSLCert.idl:33
cert::ServerSSLCert::CommonAttributes::stateOrProvince
string stateOrProvince
State or province.
Definition ServerSSLCert.idl:34
cert::ServerSSLCert::CommonAttributes::commonName
string commonName
Common Name.
Definition ServerSSLCert.idl:38
cert::ServerSSLCert::CommonAttributes::locality
string locality
Locality or city.
Definition ServerSSLCert.idl:35
cert::ServerSSLCert::CommonAttributes::organizationalUnit
string organizationalUnit
Organizational Unit.
Definition ServerSSLCert.idl:37
cert::ServerSSLCert::Info
Certificate manager information.
Definition ServerSSLCert.idl:84
cert::ServerSSLCert::Info::havePendingCert
boolean havePendingCert
true if an uploaded certificate is pending activation
Definition ServerSSLCert.idl:86
cert::ServerSSLCert::Info::havePendingReq
boolean havePendingReq
true if a CSR is pending
Definition ServerSSLCert.idl:85
cert::ServerSSLCert::Info::activeCertInfo
CertInfo activeCertInfo
Information about active certificate file (device certificate)
Definition ServerSSLCert.idl:90
cert::ServerSSLCert::Info::pendingReqInfo
ReqInfo pendingReqInfo
Information about pending CSR.
Definition ServerSSLCert.idl:87
cert::ServerSSLCert::Info::maxSignDays
int maxSignDays
Maximum number of days a self signed certificate will be valid.
Definition ServerSSLCert.idl:92
cert::ServerSSLCert::Info::pendingCertChainInfos
vector< CertInfo > pendingCertChainInfos
Information about pending certificate file (remaining certificate chain if available)
Definition ServerSSLCert.idl:89
cert::ServerSSLCert::Info::pendingCertInfo
CertInfo pendingCertInfo
Information about pending certificate file (device certificate)
Definition ServerSSLCert.idl:88
cert::ServerSSLCert::Info::activeCertChainInfos
vector< CertInfo > activeCertChainInfos
Information about active certificate file (remaining certificate chain if available)
Definition ServerSSLCert.idl:91
cert::ServerSSLCert::ReqInfo
Certificate signing request information.
Definition ServerSSLCert.idl:62
cert::ServerSSLCert::ReqInfo::keyType
KeyType keyType
Key type.
Definition ServerSSLCert.idl:65
cert::ServerSSLCert::ReqInfo::ellipticCurve
EllipticCurve ellipticCurve
Selected elliptic curve (only relevant if key type is ECDSA)
Definition ServerSSLCert.idl:66
cert::ServerSSLCert::ReqInfo::rsaKeyLength
int rsaKeyLength
Length of the RSA key in bits (only relevant if key type is RSA)
Definition ServerSSLCert.idl:67
cert::ServerSSLCert::ReqInfo::names
vector< string > names
DNS names and/or IP addresses.
Definition ServerSSLCert.idl:64
cert::ServerSSLCert::ReqInfo::subject
CommonAttributes subject
Certificate subject attributes.
Definition ServerSSLCert.idl:63