cisco IOS XE 17.16.x — CanGenerateCSR RPC

// System modification time when the certificate was installed/rotated in // nanoseconds since epoch. int64 modification_time = 4; } // An endpoint represents an entity on the target which can use a certificate. message Endpoint { // Type of endpoint that can use a cert. This list is to be extended based on // conversation with vendors. enum Type { EP_UNSPECIFIED = 0; EP_IPSEC_TUNNEL = 1; EP_DAEMON = 2; } Type type = 1; // Human readable identifier for an endpoint. string endpoint = 2; } CanGenerateCSR RPC This RPC queries whether a device can generate a CSR for a specific key type, certificate type, and key size.

The supported key type is Rivest, Shamir, and Adelman (RSA), and the supported certificate type is X.509. When this RPC request is made for installing a completely new certificate as part of the Install RPC, the device must ensure that the certificate ID is new and no entities on the device are bound to this certificate ID. If any existing certificate matches the certificate ID, this request fails. When this RPC request is made for rotating an existing certificate as part of the Rotate RPC, the device must ensure that the certificate ID is already available.

If certificate rotation proceeds to load the certificate, it must associate the new certificate with the previously created certificate ID. The following is a sample CanGenerateCSR RPC: // An RPC to ask a target if it can generate a Certificate. rpc CanGenerateCSR(CanGenerateCSRRequest) returns (CanGenerateCSRResponse); // A request to ask the target if it can generate key pairs. message CanGenerateCSRRequest { KeyType key_type = 1; CertificateType certificate_type = 2; uint32 key_size = 3; } // Algorithm to be used for generation the key pair. enum KeyType { // 1 - 500, for known types. // 501 and onwards for private use. KT_UNKNOWN = 0; KT_RSA = 1; } // Types of certificates.

enum CertificateType { // 1 - 500 for public use. // 501 onwards for private use. CT_UNKNOWN = 0; CT_X509 = 1; } Model-Driven Programmability CanGenerateCSR RPC Programmability Configuration Guide, Cisco IOS XE 17.16.x 281