All Classes Files Functions Variables Pages
webadmin::Certificates Interface Reference

Inherits Certificates.

Public Member Functions

void generateEx (out kerio::web::KId id, in kerio::web::NamedValueList subject, in string name, in kerio::web::CertificateType type, in kerio::web::ValidPeriod period, in kerio::web::NamedMultiValueList subjectAlternativeNameList)
 
void detect (out kerio::web::Certificate certificate, in string host)
 
void apply (out kerio::web::ErrorList errors)
 
void reset ()
 
void importCertificateP12 (out kerio::web::KId id, in string fileId, in string name, in kerio::web::CertificateType type, in string password)
 
void exportCertificateP12 (out kerio::web::Download fileDownload, in kerio::web::KId id, in string password, in boolean includeCa)
 
void importCertificateUrl (in string url)
 
void setDistrusted (out kerio::web::ErrorList errors, in kerio::web::KIdList ids)
 

Member Function Documentation

void webadmin::Certificates::apply ( out kerio::web::ErrorList  errors)

write changes cached in manager to configuration

Parameters
errors- list of errors
Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."
8001 Invalid params. - "Unable to add/modify certificate %1, wrong parameters."
8002 Database error. - "Unable to add/modify certificate %1."
8002 Database error. - "Unable to delete certificate."
void webadmin::Certificates::detect ( out kerio::web::Certificate  certificate,
in string  host 
)

Detect certificate of given VPN host.

Parameters
certificate- detected properties
host- the host certificate of which will be detected
Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1000 Operation failed. - "Unable to detect the remote endpoint's certificate."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Certificates::exportCertificateP12 ( out kerio::web::Download  fileDownload,
in kerio::web::KId  id,
in string  password,
in boolean  includeCa 
)

Export certificate in PKCS #12 format

Parameters
fileDownload- description of the output file
id- ID of the certificate or certificate request
password- password, which will be used to encrypt output certificate
includeCa- if true, engine will include whole certificate chain up to highest CA (only if all parents are present)
Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1002 No such entity. - "Certificate not found."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Certificates::generateEx ( out kerio::web::KId  id,
in kerio::web::NamedValueList  subject,
in string  name,
in kerio::web::CertificateType  type,
in kerio::web::ValidPeriod  period,
in kerio::web::NamedMultiValueList  subjectAlternativeNameList 
)

Generate certificate.

Parameters
id- ID of generated certificate
subject- properties specified by user
name- name of the new certificate
type- type of certificate to be generated, valid input is one of: InactiveCertificate/CertificateRequest/LocalAuthority
period- time properties specified by user, not relevant for CertificateRequest
subjectAlternativeNameList- Lists of subject alternative names in certificate. Key is similar to openSSL subj. alt. name type (see http://www.openssl.org/docs/apps/x509v3_config.html)
Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."
Invalid params. - "Unable to generate certificate, expiration date has already passed."
Invalid params. - "Unable to generate certificate, properties are invalid."
void webadmin::Certificates::importCertificateP12 ( out kerio::web::KId  id,
in string  fileId,
in string  name,
in kerio::web::CertificateType  type,
in string  password 
)

Import certificate in PKCS #12 format

Parameters
id- ID of generated certificate
fileId- id of uploaded file
name- name of the new certificate
type- type of certificate to be imported, valid input is one of: InactiveCertificate/LocalAuthority
password- password needed to decode certificate
Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1000 OperationFailed - "Unable to import certificate, password is not valid."
1002 No such entity. - "Uploaded file does not exist."
1002 No such entity. - "Unable to import certificate, it doesn't match imported private key!"
1004 Access denied. - "Insufficient rights to perform the requested operation."
Invalid params. - "Unable to import certificate, the content is invalid!"
void webadmin::Certificates::importCertificateUrl ( in string  url)

Import certificate from url

Parameters
url- url, where will be certificate downloaded from
Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1000 OperationFailed - "Unable to download certificate."
1004 Access denied. - "Insufficient rights to perform the requested operation."
Invalid params. - "Unable to import certificate, the content is invalid!"
void webadmin::Certificates::reset ( )

discard changes cached in manager

Exceptions
kerio::web::ApiException
-32001 Session expired. - "The user is not logged in."
1004 Access denied. - "Insufficient rights to perform the requested operation."
void webadmin::Certificates::setDistrusted ( out kerio::web::ErrorList  errors,
in kerio::web::KIdList  ids 
)

Distrust list of certificate records

Parameters
errors- error message list
ids- list of identifiers of deleted user templates
Exceptions
kerio::web::ApiExceptionon error: -32001 Session expired. - "The user is not logged in." 1002 No such entity. - "Certificate not found." 1004 Access denied. - "Insufficient rights to perform the requested operation."

The documentation for this interface was generated from the following file: