WebPKI Demonstration

Sign CAdES with local signature plugin

Sign a batch of files directly in the browser. It does not depend on the server to perform any part of the subscription.

Select the files to be signed

{{ files.length }} selected files
{{ file.name }} ({{ getDisplaySize(file.length) }})
{{ file.error }}

Set the options


Choose a certificate

Do not have a certificate? Click Here to issue a test one.

> Code sample_

var file = null;
pki.showFileBrowser({
    dialogTitle: 'Select the files to be signed'
}).success(function(result) {
    if (!result.userCancelled) {
        file = result.files[0];
    }
});

pki.signCades({
    fileId: file.id,                       
    autoDetectCosign: $('cbAutoDetectCosign').val(),
    includeEncapsulatedContent: $('cbIncludeEContent').val(),
    output: {
        mode: 'autoSave',
        fileNameSuffix: '-signed',
    },
    certificateThumbprint: $('certificateSelect').val(),
    policy: 'BrazilAdrBasica',                                              
    // ICP-Brasil
    trustArbitrators: [ pki.standardTrustArbitrators.pkiBrazil ]
}).success(function(result) {
    if (result.isValid) {
        file.signatureInfo = result.signatureInfo;
    }
}).error(function(e) {
    file.error = e;
});