mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2024-11-24 00:55:00 +03:00
21 lines
580 B
JavaScript
21 lines
580 B
JavaScript
;(function () {
|
|
'use strict';
|
|
|
|
var $certs = document.querySelector('#certList');
|
|
|
|
/**
|
|
* Пример получения списка сертификатов
|
|
* */
|
|
window.CryptoPro.call('getCertsList').then(function (list) {
|
|
list.forEach(function (cert) {
|
|
var $certOption = document.createElement('option');
|
|
|
|
$certOption.textContent = cert.label;
|
|
$certOption.value = cert.thumbprint;
|
|
|
|
$certs.appendChild($certOption);
|
|
});
|
|
}, function (error) {
|
|
console.error(error);
|
|
});
|
|
}()); |