KSC Open API
Kaspersky Security Center API description
MdmCertCtrlApi::SetCertificateAsync2 ( params  pAuthType,
params  pNotification,
params  pCertificate,
params  pRecipient,
[out] wstring  wstrRequestId 
)

Set user's certificate.

Saves caller-defined certificate or server-generated self-signed certificate.
Generates one-time password if required.
Notifies user by Mail, SMS or both about prepared certificate and method of authorization.
Certificate provided by caller may be applied only to one certificate type to one recipient. If request contains more than one recipient, provided certificates will be ignored.

Parameters:
pAuthType(params) KES only! Authentication method for user.
AttributeTypeDescriptionAdditional information
Only one of the following must be present (value does not matter):
"NSOneTime"(paramBool)One-time password authentication
"NSDomain"(paramBool)Domain authentication
pNotification(params) method of notifying the user
AttributeTypeDescriptionAdditional information
Only one of the following must be present (value does not matter):
"NMwstrNotification"(paramString)Notification text for mailmay contain URL% and/or PASS% template
"NMwstrNotificationSubject"(paramString)Notification subject for mail
"NMwstrNotificationSimple"(paramString)Notification message for SMSmust contain URL% and/or PASS% template
pCertificate(params) certificate parameters
AttributeTypeDescriptionAdditional information
Certificate purpose (optional), may be one (with value TRUE) of:
"CPKES"(paramBool)KES purpose
"CPIOS"(paramBool)IOS purpose
Certificate type (mandatory), must be one (with value TRUE) of:
"CTGeneral"(paramBool)User certificate type
"CTMail"(paramBool)Mail certificate type
"CTVpn"(paramBool)VPN certificate type
Certificate: (optional, see Common format for certificate params), if omitted it will be generated:
"CPublic"(paramBinary)certificatePEM format
"CPrivate"(paramBinary)private key for "CPublic"encrypted by "CPassword"
"CPKCS12"(paramBinary)certificatePFX format, used if "CPublic" and "CPrivate" are not specified
"CPassword"(paramBinary)password for "CPrivate" or "CPKCS12"encrypted
Other parameters:
"CTag"(paramString)certificate tagit is useful for VPN/Mail certificates of IOS purpose only
"CExpiryPeriod"(paramInt)certificate validity expiry period in days
"CBits"(paramInt)key length
"CPKITemplate"(paramString)PKI template nameencrypted
"CMultipleUse"(paramBool)Multiple-use certificatefalse if not set
pRecipient(params) notification recipient
AttributeTypeDescriptionAdditional information
"ul_binId"(paramBinary)universal user idmandatory
At least one of the fields below should be set:
"ul_wstrMail"(paramString)EMail addressoptional
"ul_wstrMailExtra"(paramString)additional EMail addressoptional
"User_wstrMailAlt"(paramString)alternative EMailoptional
"ul_wstrTelephoneNumber"(paramString)phone numberoptional
"ul_wstrTelephoneExtra"(paramString)additional phone numberoptional
"ul_wstrMobile"(paramString)mobile phone numberoptional
"User_wstrMobileAlt"(paramString)alternative mobileoptional
[out]wstrRequestId(wstring) identity of asynchronous operation:
  • to cancel operation call MdmCertCtrlApi::CancelSetCertificate;
  • to get status body use AsyncActionStateChecker::CheckActionState, lStateCode "1" means OK and "0" means fail;
  • to get result use AsyncActionStateChecker::CheckActionState, pStateData contains:
    AttributeTypeDescriptionAdditional information
    "AKLWNGTMDM_GenCertAsyncResult_UserDisplayName"(paramString) User Display Namemay be absent, present if a one-time password authentication is used
    "AKLWNGTMDM_GenCertAsyncResult_UserSamName"(paramString) User SAM Namepresent if a one-time password authentication is used
    "AKLWNGTMDM_GenCertAsyncResult_Pwd"(paramString) Passwordpresent if a one-time password authentication is used