Loading...
Searching...
No Matches
ServerSSLCert.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2010 Raritan Inc. All rights reserved.
*/
/**
* TLS Certificate Management
*/
module cert {
/** TLS certificate management interface */
interface ServerSSLCert {
/** success code */
constant int SUCCESS = 0;
/** shared error codes */
constant int ERR_BUSY = 1;
constant int ERR_CSR_OR_CERT_PENDING = 101;
constant int ERR_KEY_MISSING = 200;
constant int ERR_CERT_MISSING = 201;
constant int ERR_CERT_FORMAT_INVALID = 202;
constant int ERR_CERT_KEY_MISMATCH = 203;
constant int ERR_KEY_FORMAT_INVALID = 204;
/** key-pair generation specific error codes */
constant int ERR_GEN_KEY_LEN_INVALID = 100;
constant int ERR_GEN_CSR_OR_CERT_PENDING = 101; ///< same as ERR_CSR_OR_CERT_PENDING
constant int ERR_GEN_KEY_GEN_FAILED = 102;
constant int ERR_GEN_KEY_TYPE_INVALID = 103;
constant int ERR_GEN_ELLIPTIC_CURVE_INVALID = 104;
constant int ERR_GEN_VALIDITY_OUT_OF_RANGE = 105;
/** key-pair installation specific error codes (backward compatibility) */
constant int ERR_INSTALL_KEY_MISSING = 200; ///< same as ERR_KEY_MISSING
constant int ERR_INSTALL_CERT_MISSING = 201; ///< same as ERR_CERT_MISSING
constant int ERR_INSTALL_CERT_FORMAT_INVALID = 202; ///< same as ERR_CERT_FORMAT_INVALID
constant int ERR_INSTALL_CERT_KEY_MISMATCH = 203; ///< same as ERR_CERT_KEY_MISMATCH
constant int ERR_INSTALL_KEY_FORMAT_INVALID = 204; ///> same as ERR_KEY_FORMAT_INVALID
/** Certificate issuer or subject attributes */
structure CommonAttributes {
string country; ///< Country code
string stateOrProvince; ///< State or province
string locality; ///< Locality or city
string organization; ///< Organization
string organizationalUnit; ///< Organizational Unit
string commonName; ///< Common Name
string emailAddress; ///< Email Address
};
/** Supported key types */
enumeration KeyType {
KEY_TYPE_UNKNOWN, ///< Key type unknown (only allowed as return value)
KEY_TYPE_RSA, ///< RSA key
KEY_TYPE_ECDSA ///< ECDSA key
};
/** Supported elliptic curves for key type ECDSA */
enumeration EllipticCurve {
EC_CURVE_UNKNOWN, ///< Curve unknown (only allowed as return value)
EC_CURVE_NIST_P256, ///< NIST curve P-256 (also known as secp256r1 and prime256v1)
EC_CURVE_NIST_P384, ///< NIST curve P-384 (also known as secp384r1)
EC_CURVE_NIST_P521 ///< NIST curve P-521 (also known as secp521r1)
};
/** Public key information */
structure KeyInfo {
KeyType type; ///< Key type
EllipticCurve ecCurve; ///< Selected elliptic curve (only relevant if key type is ECDSA)
int rsaKeyLength; ///< Length of the RSA key in bits (only relevant if key type is RSA)
boolean inSecureElement; ///< \c true if located in a Secure Element
};
/**
* Certificate signing request information
*
* If names is empty then commonName from the subject is used as single entry.
*/
structure ReqInfo {
CommonAttributes subject; ///< Certificate subject attributes
vector<string> names; ///< DNS names and/or IP addresses
KeyInfo keyInfo; ///< Key information
};
/** Certificate information */
structure CertInfo {
CommonAttributes subject; ///< Subject attributes
CommonAttributes issuer; ///< Issuer attributes
vector<string> names; ///< DNS names and/or IP addresses
string invalidBefore; ///< Begin of validity period
string invalidAfter; ///< End of validity period
string serialNumber; ///< Serial number
KeyInfo keyInfo; ///< Key information
};
/** Certificate manager information */
structure Info {
boolean havePendingReq; ///< \c true if a CSR is pending
boolean havePendingCert; ///< \c true if an uploaded certificate is pending activation
ReqInfo pendingReqInfo; ///< Information about pending CSR
CertInfo pendingCertInfo; ///< Information about pending certificate file (device certificate)
vector<CertInfo> pendingCertChainInfos; ///< Information about pending certificate file (remaining certificate chain if available)
CertInfo activeCertInfo; ///< Information about active certificate file (device certificate)
vector<CertInfo> activeCertChainInfos; ///< Information about active certificate file (remaining certificate chain if available)
int maxSignDays; ///< Maximum number of days a self signed certificate will be valid.
};
/**
* Get all supported key variants.
*
* @return Vector of KeyInfo structures representing all supported key variants
*/
vector<KeyInfo> getSupportedKeyInfos();
/**
* Generate an unsigned key pair.
*
* @param reqInfo Certificate signing request information
* @param challenge Challenge password
*
* @return SUCCESS or one of the error code constants
*/
int generateUnsignedKeyPair(in ReqInfo reqInfo, in string challenge);
/**
* Generate a self-signed key pair.
*
* @param reqInfo Certificate signing request information
* @param days Number of days the certificate will be valid
*
* @return SUCCESS or one of the error code constants
*/
int generateSelfSignedKeyPair(in ReqInfo reqInfo, in int days);
/**
* Remove pending key and certificate signing request or certificate.
*/
void deletePending();
/**
* Retrieve certificate manager information.
*
* @param info Result: Certificate manager information
*/
void getInfo(out Info info);
/**
* Get the active cert chain in PEM format.
*
* Currently not available via JSON-RPC.
*
* @return Cert chain in PEM format.
*/
string getActiveCertChainPEM();
/**
* Get the active private key in PEM format.
*
* Currently not available via JSON-RPC.
*
* @param keyPassword Password to encrypt the returned key (currently not used)
*
* @return The private key in PEM format.
*/
string getActiveKeyPEM(in string keyPassword);
/**
* Get the pending cert signing request (CSR) in PEM format.
*
* Currently not available via JSON-RPC.
*
* @return Cert signing request in PEM format.
*/
string getPendingRequestPEM();
/**
* Get the pending cert chain in PEM format.
*
* Currently not available via JSON-RPC.
*
* @return Cert chain in PEM format.
*/
string getPendingCertChainPEM();
/**
* Get the pending private key in PEM format.
*
* Currently not available via JSON-RPC.
*
* @param keyPassword Password to encrypt the returned key (currently not used)
*
* @return The private key in PEM format.
*/
string getPendingKeyPEM(in string keyPassword);
/**
* Set the pending cert chain in PEM format.
*
* Currently not available via JSON-RPC.
*
* @param certChain Cert chain in PEM format.
*
* @return SUCCESS or one of the error code constants
*/
int setPendingCertChainPEM(in string certChain);
/**
* Set the pending private key and cert chain in PEM format.
*
* Currently not available via JSON-RPC.
*
* @param key Private key in PEM format.
* @param certChain Cert chain in PEM format.
* @param keyPassword Password to decrypt the private key (currently not used)
*
* @return SUCCESS or one of the error code constants
*/
int setPendingKeyAndCertChainPEM(in string key, in string certChain, in string keyPassword);
/**
* Activate a pending key pair.
*
* @return SUCCESS or one of the error code constants
*/
int installPendingKeyPair();
};
}
cert::ServerSSLCert
TLS certificate management interface.
Definition ServerSSLCert.idl:12
cert::ServerSSLCert::KeyType
KeyType
Supported key types.
Definition ServerSSLCert.idl:53
cert::ServerSSLCert::KEY_TYPE_RSA
@ KEY_TYPE_RSA
RSA key.
Definition ServerSSLCert.idl:55
cert::ServerSSLCert::KEY_TYPE_UNKNOWN
@ KEY_TYPE_UNKNOWN
Key type unknown (only allowed as return value)
Definition ServerSSLCert.idl:54
cert::ServerSSLCert::getSupportedKeyInfos
vector< KeyInfo > getSupportedKeyInfos()
Get all supported key variants.
cert::ServerSSLCert::deletePending
void deletePending()
Remove pending key and certificate signing request or certificate.
cert::ServerSSLCert::generateSelfSignedKeyPair
int generateSelfSignedKeyPair(in ReqInfo reqInfo, in int days)
Generate a self-signed key pair.
cert::ServerSSLCert::setPendingKeyAndCertChainPEM
int setPendingKeyAndCertChainPEM(in string key, in string certChain, in string keyPassword)
Set the pending private key and cert chain in PEM format.
cert::ServerSSLCert::EllipticCurve
EllipticCurve
Supported elliptic curves for key type ECDSA.
Definition ServerSSLCert.idl:60
cert::ServerSSLCert::EC_CURVE_NIST_P256
@ EC_CURVE_NIST_P256
NIST curve P-256 (also known as secp256r1 and prime256v1)
Definition ServerSSLCert.idl:62
cert::ServerSSLCert::EC_CURVE_NIST_P384
@ EC_CURVE_NIST_P384
NIST curve P-384 (also known as secp384r1)
Definition ServerSSLCert.idl:63
cert::ServerSSLCert::EC_CURVE_UNKNOWN
@ EC_CURVE_UNKNOWN
Curve unknown (only allowed as return value)
Definition ServerSSLCert.idl:61
cert::ServerSSLCert::getActiveCertChainPEM
string getActiveCertChainPEM()
Get the active cert chain in PEM format.
cert::ServerSSLCert::getPendingCertChainPEM
string getPendingCertChainPEM()
Get the pending cert chain in PEM format.
cert::ServerSSLCert::getActiveKeyPEM
string getActiveKeyPEM(in string keyPassword)
Get the active private key in PEM format.
cert::ServerSSLCert::installPendingKeyPair
int installPendingKeyPair()
Activate a pending key pair.
cert::ServerSSLCert::getPendingKeyPEM
string getPendingKeyPEM(in string keyPassword)
Get the pending private key in PEM format.
cert::ServerSSLCert::setPendingCertChainPEM
int setPendingCertChainPEM(in string certChain)
Set the pending cert chain in PEM format.
cert::ServerSSLCert::getInfo
void getInfo(out Info info)
Retrieve certificate manager information.
cert::ServerSSLCert::getPendingRequestPEM
string getPendingRequestPEM()
Get the pending cert signing request (CSR) in PEM format.
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:87
cert::ServerSSLCert::CertInfo::names
vector< string > names
DNS names and/or IP addresses.
Definition ServerSSLCert.idl:90
cert::ServerSSLCert::CertInfo::invalidAfter
string invalidAfter
End of validity period.
Definition ServerSSLCert.idl:92
cert::ServerSSLCert::CertInfo::keyInfo
KeyInfo keyInfo
Key information.
Definition ServerSSLCert.idl:94
cert::ServerSSLCert::CertInfo::serialNumber
string serialNumber
Serial number.
Definition ServerSSLCert.idl:93
cert::ServerSSLCert::CertInfo::issuer
CommonAttributes issuer
Issuer attributes.
Definition ServerSSLCert.idl:89
cert::ServerSSLCert::CertInfo::subject
CommonAttributes subject
Subject attributes.
Definition ServerSSLCert.idl:88
cert::ServerSSLCert::CertInfo::invalidBefore
string invalidBefore
Begin of validity period.
Definition ServerSSLCert.idl:91
cert::ServerSSLCert::CommonAttributes
Certificate issuer or subject attributes.
Definition ServerSSLCert.idl:42
cert::ServerSSLCert::CommonAttributes::organization
string organization
Organization.
Definition ServerSSLCert.idl:46
cert::ServerSSLCert::CommonAttributes::emailAddress
string emailAddress
Email Address.
Definition ServerSSLCert.idl:49
cert::ServerSSLCert::CommonAttributes::country
string country
Country code.
Definition ServerSSLCert.idl:43
cert::ServerSSLCert::CommonAttributes::stateOrProvince
string stateOrProvince
State or province.
Definition ServerSSLCert.idl:44
cert::ServerSSLCert::CommonAttributes::commonName
string commonName
Common Name.
Definition ServerSSLCert.idl:48
cert::ServerSSLCert::CommonAttributes::locality
string locality
Locality or city.
Definition ServerSSLCert.idl:45
cert::ServerSSLCert::CommonAttributes::organizationalUnit
string organizationalUnit
Organizational Unit.
Definition ServerSSLCert.idl:47
cert::ServerSSLCert::Info
Certificate manager information.
Definition ServerSSLCert.idl:98
cert::ServerSSLCert::Info::havePendingCert
boolean havePendingCert
true if an uploaded certificate is pending activation
Definition ServerSSLCert.idl:100
cert::ServerSSLCert::Info::havePendingReq
boolean havePendingReq
true if a CSR is pending
Definition ServerSSLCert.idl:99
cert::ServerSSLCert::Info::activeCertInfo
CertInfo activeCertInfo
Information about active certificate file (device certificate)
Definition ServerSSLCert.idl:104
cert::ServerSSLCert::Info::pendingReqInfo
ReqInfo pendingReqInfo
Information about pending CSR.
Definition ServerSSLCert.idl:101
cert::ServerSSLCert::Info::maxSignDays
int maxSignDays
Maximum number of days a self signed certificate will be valid.
Definition ServerSSLCert.idl:106
cert::ServerSSLCert::Info::pendingCertChainInfos
vector< CertInfo > pendingCertChainInfos
Information about pending certificate file (remaining certificate chain if available)
Definition ServerSSLCert.idl:103
cert::ServerSSLCert::Info::pendingCertInfo
CertInfo pendingCertInfo
Information about pending certificate file (device certificate)
Definition ServerSSLCert.idl:102
cert::ServerSSLCert::Info::activeCertChainInfos
vector< CertInfo > activeCertChainInfos
Information about active certificate file (remaining certificate chain if available)
Definition ServerSSLCert.idl:105
cert::ServerSSLCert::KeyInfo
Public key information.
Definition ServerSSLCert.idl:68
cert::ServerSSLCert::KeyInfo::ecCurve
EllipticCurve ecCurve
Selected elliptic curve (only relevant if key type is ECDSA)
Definition ServerSSLCert.idl:70
cert::ServerSSLCert::KeyInfo::type
KeyType type
Key type.
Definition ServerSSLCert.idl:69
cert::ServerSSLCert::KeyInfo::rsaKeyLength
int rsaKeyLength
Length of the RSA key in bits (only relevant if key type is RSA)
Definition ServerSSLCert.idl:71
cert::ServerSSLCert::KeyInfo::inSecureElement
boolean inSecureElement
true if located in a Secure Element
Definition ServerSSLCert.idl:72
cert::ServerSSLCert::ReqInfo
Certificate signing request information.
Definition ServerSSLCert.idl:80
cert::ServerSSLCert::ReqInfo::keyInfo
KeyInfo keyInfo
Key information.
Definition ServerSSLCert.idl:83
cert::ServerSSLCert::ReqInfo::names
vector< string > names
DNS names and/or IP addresses.
Definition ServerSSLCert.idl:82
cert::ServerSSLCert::ReqInfo::subject
CommonAttributes subject
Certificate subject attributes.
Definition ServerSSLCert.idl:81