internal override CsdResponse DisableCsd(string certificateNumber) { CsdResponseHandler handler = new CsdResponseHandler(); try { new Validation(Url, User, Password, Token).ValidateHeaderParameters(); HttpWebRequest request = this.RequestDisableCsd(certificateNumber); return(handler.GetResponse(request)); } catch (Exception e) { return(handler.HandleException(e)); } }
internal override CsdResponse DisableCsd(string certificateNumber) { CsdResponseHandler handler = new CsdResponseHandler(); try { new Validation(Url, User, Password, Token).ValidateHeaderParameters(); var headers = GetHeaders(); var proxy = RequestHelper.ProxySettings(Proxy, ProxyPort); return(handler.GetDeleteResponse(Url, headers, "certificates/" + certificateNumber, proxy)); } catch (Exception e) { return(handler.HandleException(e)); } }
internal override CsdResponse UploadCsd(string cer, string key, string password, string certificateType, bool isActive) { CsdResponseHandler handler = new CsdResponseHandler(); try { new Validation(Url, User, Password, Token).ValidateHeaderParameters(); if (String.IsNullOrEmpty(cer) || String.IsNullOrEmpty(key)) { throw new ServicesException("El certificado o llave privada vienen vacios"); } HttpWebRequest request = this.RequestUploadCsd(cer, key, password, certificateType, isActive); return(handler.GetResponse(request)); } catch (Exception e) { return(handler.HandleException(e)); } }
internal override CsdResponse UploadCsd(string cer, string key, string password, string certificateType, bool isActive) { CsdResponseHandler handler = new CsdResponseHandler(); try { new Validation(Url, User, Password, Token).ValidateHeaderParameters(); if (String.IsNullOrEmpty(cer) || String.IsNullOrEmpty(key)) { throw new ServicesException("El certificado o llave privada vienen vacios"); } var headers = GetHeaders(); var content = RequestCsd(cer, key, password, certificateType, isActive); var proxy = RequestHelper.ProxySettings(Proxy, ProxyPort); return(handler.GetPostResponse(Url, "certificates/save", headers, content, proxy)); } catch (Exception e) { return(handler.HandleException(e)); } }
public CsdUtils(string url, string user, string password, int proxyPort = 0, string proxy = null) : base(url, user, password, proxy, proxyPort) { _handler = new CsdResponseHandler(); }
public CsdUtils(string url, string token, int proxyPort = 0, string proxy = null) : base(url, token, proxy, proxyPort) { _handler = new CsdResponseHandler(); }