/// <summary> /// 1. adım: verilen CSR'ın içindeki bilgileri döndüren method /// </summary> /// <param name="req">CSR kodu ile doldurulmuş ReqDecodeCSR</param> public ResDecodeCSR DecodeCSR(ReqDecodeCSR req) { // Javascript csr kodunu gönderirken + sembollerini boşluk olarak gönderdiğinden burada eski haline çeviriyorum req.csr = req.csr.Replace(" ", "+"); return(ComodoDecodeCSR(req)); }
/// <summary> /// CSR kodunu çözümler ve bilgileri okumamızı sağlar /// </summary> private ResDecodeCSR ComodoDecodeCSR(ReqDecodeCSR req) { ResDecodeCSR res = new ResDecodeCSR(); NameValueCollection resp = ComodoSendCommand("https://secure.comodo.net/products/!DecodeCSR", req); foreach (rfl.PropertyInfo pi in res.GetType().GetProperties()) { pi.SetValue(res, resp.Get(pi.Name)); } if (Convert.ToInt32(resp.Get("errorCode")) < 0) { throw GetComodoErrorException(resp.Get("errorCode"), resp.Get("errorMessage"), "", "DecodeCSR"); } return(res); }
/// <summary> /// Verilen CSR'ı çözerek okunabilir hale getirir /// </summary> /// <param name="req"></param> /// <returns></returns> public ResDecodeCSR DecodeCSR(ReqDecodeCSR req) { return(Call <ResDecodeCSR, ReqDecodeCSR>(req, MethodBase.GetCurrentMethod().Name)); }