2017-01-17 15:25:57 +03:00
|
|
|
;(function () {
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var $certs = document.querySelector('#certList');
|
|
|
|
|
2017-11-29 00:14:10 +03:00
|
|
|
window.CryptoPro.call('isValidEDSSettings');
|
|
|
|
|
2017-01-17 15:25:57 +03:00
|
|
|
/**
|
|
|
|
* Пример получения списка сертификатов
|
|
|
|
* */
|
|
|
|
window.CryptoPro.call('getCertsList').then(function (list) {
|
|
|
|
list.forEach(function (cert) {
|
|
|
|
var $certOption = document.createElement('option');
|
|
|
|
|
2017-04-20 12:08:37 +03:00
|
|
|
if (typeof $certOption.textContent !== 'undefined') {
|
|
|
|
$certOption.textContent = cert.label;
|
|
|
|
} else {
|
|
|
|
$certOption.innerText = cert.label;
|
|
|
|
}
|
|
|
|
|
2017-01-17 15:25:57 +03:00
|
|
|
$certOption.value = cert.thumbprint;
|
|
|
|
|
|
|
|
$certs.appendChild($certOption);
|
|
|
|
});
|
|
|
|
}, function (error) {
|
|
|
|
console.error(error);
|
|
|
|
});
|
|
|
|
}());
|