{"id":278881,"date":"2016-04-22T20:35:03","date_gmt":"2016-04-22T16:35:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=278881"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=278881","title":{"rendered":"\u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0432 \u043f\u0440\u043e\u043c\u0438\u0441\u0435 \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u041a\u0440\u0438\u043f\u0442\u043e\u041f\u0440\u043e browser plugin"},"content":{"rendered":"<p>       \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u041a\u0440\u0438\u043f\u0442\u043e\u041f\u0440\u043e browser plugin \u0432 \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u041a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u043a\u0430\u0442. \u041f\u0440\u043e\u0448\u0443 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0437\u0430 \u0442\u044f\u0436\u0435\u043b\u044b\u0439 \u0441\u043b\u043e\u0433<a name=\"habracut\"><\/a><br \/>  \u0422\u0430\u043a \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043c\u043e\u0435\u0433\u043e \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430 \u0431\u044b\u043b\u043e \u0441\u0443\u0436\u0434\u0435\u043d\u043e \u0441\u0442\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0438. \u0411\u0435\u0433\u043b\u044b\u043c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c \u043e\u043a\u0438\u043d\u0443\u0432 \u043c\u0430\u043d\u0443\u0430\u043b \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430 \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u043d\u0430 \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0434\u0435\u043d\u044c, \u043e\u0436\u0438\u0434\u0430\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u0437\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0447\u0430\u0441\u0430. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u0441\u0435 \u0432\u044b\u043b\u0438\u043b\u043e\u0441\u044c \u0432 \u043d\u0435\u0434\u0435\u043b\u044e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f :(.<br \/>  \u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434 \u044f \u043f\u043e\u043a\u0430 \u043d\u0435 \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u043b\u0441\u044f \u0438 javascript \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u044f \u043d\u0435 \u043f\u0440\u0438\u0434\u0430\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0443 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0437 SDK<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">function SignCreate(certSubjectName, dataToSign) {             return new Promise(function(resolve, reject){                 cadesplugin.async_spawn(function *(args) {                     try {                             var oStore = yield cadesplugin.CreateObjectAsync(&quot;CAPICOM.Store&quot;);                         yield oStore.Open(CAPICOM_CURRENT_USER_STORE, CAPICOM_MY_STORE,                             CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);                          var CertificatesObj = yield oStore.Certificates;                         var oCertificates = yield CertificatesObj.Find(                             CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME, certSubjectName);                                                  var Count = yield oCertificates.Count;                         if (Count == 0) {                             throw(&quot;Certificate not found: &quot; + args[0]);                         }                         var oCertificate = yield oCertificates.Item(1);                         var oSigner = yield cadesplugin.CreateObjectAsync(&quot;CAdESCOM.CPSigner&quot;);                         yield oSigner.propset_Certificate(oCertificate);                          var oSignedData = yield cadesplugin.CreateObjectAsync(&quot;CAdESCOM.CadesSignedData&quot;);                         yield oSignedData.propset_Content(dataToSign);                          var sSignedMessage = yield oSignedData.SignCades(oSigner, CADESCOM_CADES_BES);                                  yield oStore.Close();                          args[2](sSignedMessage);                     }                     catch (e)                     {                         args[3](&quot;Failed to create signature. Error: &quot; + GetErrorMessage(err));                     }                 }, certSubjectName, dataToSign, resolve, reject);             });         } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u042f \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u043a\u043e\u0434\u0435\u0440, \u0447\u0438\u0442\u0430\u044e\u0449\u0438\u0439 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0432 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u0434\u0430\u0445, \u043d\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u044e\u0441\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0432 \u0436\u0438\u0437\u043d\u0438 \u043d\u0435 \u043c\u043e\u0433 \u0442\u0440\u0438 \u0434\u043d\u044f \u043f\u043e\u043d\u044f\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u043e\u043a\u0438 \u043f\u043e \u043f\u0440\u043e\u043c\u0438\u0441\u0430\u043c \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u0438 \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u0441\u044f \u0432 \u043d\u0438\u0445, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e cadesplugin.async_spawn \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e done (\u043c\u043e\u0436\u0435\u0442 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u0449\u0438\u043a\u0438 \u043c\u0435\u043d\u044f \u043f\u043e\u043f\u0440\u0430\u0432\u044f\u0442 \u0438 \u044f \u0442\u0430\u043a \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0438 \u043d\u0435 \u043f\u043e\u043d\u044f\u043b).<br \/>  \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u044d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u0441\u0440\u0430\u0437\u0443, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c \u0438\u0437 javascript \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u0445:  <\/p>\n<ul>\n<li>\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0441 \u043f\u0440\u043e\u043c\u0438\u0441\u0430\u043c\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d <\/li>\n<li>\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0441 \u043f\u0440\u043e\u043c\u0438\u0441\u0430\u043c\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d <\/li>\n<li>\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0431\u0435\u0437 \u043f\u0440\u043e\u043c\u0438\u0441\u043e\u0432 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d <\/li>\n<li>\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0431\u0435\u0437 \u043f\u0440\u043e\u043c\u0438\u0441\u043e\u0432 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d (\u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u043d\u0435 \u0431\u044b\u0432\u0430\u0435\u0442)<\/li>\n<\/ul>\n<p>  \u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u043f\u043b\u0430\u0433\u0438\u043d \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439: cades_plaugin.hasOwnProperty(\u00abCreateObject\u00bb);<br \/>  \u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0441 \u043f\u0440\u043e\u043c\u0438\u0441\u0430\u043c\u0438: !!window.promise;<br \/>  \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 IE \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043b\u0438\u0431\u044b, \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b \u0434\u043b\u044f \u043f\u043e\u043b\u0438\u0444\u0438\u043b\u0430 \u043f\u0440\u043e\u043c\u0438\u0441\u043e\u0432 (\u043f\u043e\u043b\u0438\u0444\u0438\u043b\u044b \u0432\u043a\u0443\u0440\u0438\u043b \u0437\u0430\u043e\u0434\u043d\u043e \u0441 \u043f\u0440\u043e\u043c\u0438\u0441\u0430\u043c\u0438 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438:) ).<br \/>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u043d\u044f\u0442\u0430, \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0434\u0435\u043b\u043e\u043c \u0442\u0435\u0445\u043d\u0438\u043a\u0438.<br \/>  p.s. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e, \u0447\u0442\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 FireFox, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f, \u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 Crome. \u0412 \u0447\u0435\u043c \u0434\u0435\u043b\u043e \u043d\u0435 \u044f\u0441\u043d\u043e, \u044f <a href=\"https:\/\/www.cryptopro.ru\/forum2\/default.aspx?g=posts&amp;t=10275\">\u0437\u0430\u043f\u043e\u0441\u0442\u0438\u043b<\/a> \u043d\u0430 \u0444\u043e\u0440\u0443\u043c \u041a\u0440\u0438\u043f\u0442\u041f\u0440\u043e.<br \/>  \u0412\u043e\u0442 \u0432 \u0446\u0435\u043b\u043e\u043c \u0432\u0441\u0435. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043a\u043e\u043c\u0443 \u0442\u043e \u0441\u0431\u0435\u0440\u0435\u0433\u0443 \u0432\u0440\u0435\u043c\u044f \u0438 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435, \u0442.\u043a. \u0441\u0443\u0434\u044f \u043f\u043e \u0444\u043e\u0440\u0443\u043c\u0443 \u041a\u0440\u0438\u043f\u0442\u043e\u041f\u0440\u043e \u043c\u0430\u0441\u0441\u0430 \u043b\u044e\u0434\u0435\u0439 \u0441\u0442\u0440\u0430\u0434\u0430\u0435\u0442 \u0438\u0437 \u0437\u0430 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/282257\/\"> https:\/\/habrahabr.ru\/post\/282257\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u041a\u0440\u0438\u043f\u0442\u043e\u041f\u0440\u043e browser plugin \u0432 \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u041a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u043a\u0430\u0442. \u041f\u0440\u043e\u0448\u0443 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0437\u0430 \u0442\u044f\u0436\u0435\u043b\u044b\u0439 \u0441\u043b\u043e\u0433<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-278881","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=278881"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278881\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}