/// <summary> /// Import a signing response into the designated key store. /// </summary> /// <param name="request">represents the key store and key alias to export</param> /// <param name="data">the signing response in textual format.</param> /// <exception cref="AdvanceIOException">if network connection failed</exception> /// <exception cref="AdvanceControlException">if user is not allowed to export.</exception> public void ImportSigningResponse(AdvanceKeyStoreExport request, string data) { XmlDocument req = XmlReadWrite.CreateFunctionRequest("import-signing-response", request); XmlReadWrite.AddContent(req.DocumentElement, data); this.communicator.Send(req); }
/// <summary> /// Import a private key into a designated key store. /// </summary> /// <param name="request">represents the key store and key alias to import</param> /// <param name="data">ckey in textual PEM format.</param> /// <exception cref="AdvanceIOException">if network connection failed</exception> /// <exception cref="AdvanceControlException">if user is not allowed to export.</exception> public void ImportPrivateKey(AdvanceKeyStoreExport request, string keyData, string certData) { XmlDocument req = XmlReadWrite.CreateFunctionRequest("import-private-key", request); XmlReadWrite.AddTextNode(req.DocumentElement, "private-key", keyData); XmlReadWrite.AddTextNode(req.DocumentElement, "certificate", certData); this.communicator.Send(req); }
/// <summary> /// Export a signing request of the given private key. /// </summary> /// <param name="request">represents the key store and key alias to export</param> /// <param name="data">signing request in textual format.</param> /// <exception cref="AdvanceIOException">if network connection failed</exception> /// <exception cref="AdvanceXMLException">On Xml parsing error</exception> /// <exception cref="AdvanceControlException">if user is not allowed to export.</exception> public string ExportSigningRequest(AdvanceKeyStoreExport request) { XmlNode resp = this.communicator.Query(XmlReadWrite.CreateFunctionRequest("export-signing-request", request)); return(XmlReadWrite.GetContent(resp, null)); }
/// <summary> /// Import a certificate into a designated key store. /// </summary> /// <param name="request">represents the key store and key alias to import</param> /// <param name="data">certificate in textual CER format.</param> /// <exception cref="AdvanceIOException">if network connection failed</exception> /// <exception cref="AdvanceControlException">if user is not allowed to export.</exception> public void ImportCertificate(AdvanceKeyStoreExport request, string data) { this.communicator.Send(XmlReadWrite.CreateFunctionRequest("import-certificate", data)); }