🎉 Use coupon MYXERO to enjoy 20% recurring discount on any plan. View Pricing
Sign Documents with Crypto Pro
Sign Documents with Crypto Pro

Sign Documents with Crypto Pro

0/5 (0 ratings) — active installs Updated Feb 3, 2026

This plugin allows you to sign HTML DOM element content with CryptoPro GOST certificates.
Element content will be converted to PDF and signed by selected cretificate.
Plugin uses https://www.npmjs.com/package/crypto-pro-actual-cades-plugin#api-cryptopro lib

JavaScript Libraries

This plugin uses the following JavaScript libraries:

  • jsPDF v4.0.0 – https://github.com/parallax/jsPDF
    A library to generate PDFs in JavaScript

Source JavaScript files are located in the js folder. Plugin scripts are built with Vite; the configuration is in vite.config.js. Build scripts are defined in package.json. For development, use npm (e.g. npm run dev, npm run build).

Software Dependencies

This plugin requires the following software to be installed on the user’s system:

  • КриптоПро CSP – https://cryptopro.ru/products/csp
  • КриптоПро ЭЦП Browser plug-in – https://docs.cryptopro.ru/cades/plugin

For more information about КриптоПро CSP, please see the product leaflet: https://cryptopro.ru/sites/default/files/products/csp/cryptopro_csp_leaflet_a4.pdf

All rights for КриптоПро CSP and КриптоПро ЭЦП Browser plug-in are reserved by © ООО «КРИПТО-ПРО».

Recommended Browser

Browsers that do not require additional browser extension configuration after plugin installation:

  • Chromium-Gost – https://cryptopro.ru/products/chromium-gost
  • Yandex Browser for organizations – https://browser.yandex.ru/b/cryptopro_plugin

Alternative Browsers

If you plan to use a different browser, you will need to manually enable the browser extension after completing the plugin installation. Use the instruction corresponding to your browser:

  • Chromium-based browser (Chrome, Microsoft Edge) – https://docs.cryptopro.ru/cades/plugin/plugin-installation-unix?id=%d0%98%d0%bd%d1%81%d1%82%d1%80%d1%83%d0%ba%d1%86%d0%b8%d1%8f-%d0%b4%d0%bb%d1%8f-%d0%b1%d1%80%d0%b0%d1%83%d0%b7%d0%b5%d1%80%d0%be%d0%b2-%d0%bd%d0%b0-%d0%be%d1%81%d0%bd%d0%be%d0%b2%d0%b5-chromium
  • Opera browser or Yandex Browser – https://docs.cryptopro.ru/cades/plugin/plugin-installation-unix?id=%d0%98%d0%bd%d1%81%d1%82%d1%80%d1%83%d0%ba%d1%86%d0%b8%d1%8f-%d0%b4%d0%bb%d1%8f-%d0%b1%d1%80%d0%b0%d1%83%d0%b7%d0%b5%d1%80%d0%be%d0%b2-opera-%d0%b8%d0%bb%d0%b8-%d0%af%d0%bd%d0%b4%d0%b5%d0%ba%d1%81%d0%91%d1%80%d0%b0%d1%83%d0%b7%d0%b5%d1%80
  • Firefox browser – https://docs.cryptopro.ru/cades/plugin/plugin-installation-unix?id=%d0%98%d0%bd%d1%81%d1%82%d1%80%d1%83%d0%ba%d1%86%d0%b8%d1%8f-%d0%b4%d0%bb%d1%8f-%d0%b1%d1%80%d0%b0%d1%83%d0%b7%d0%b5%d1%80%d0%be%d0%b2-firefox
  • Installing browser extension from file for different browsers – https://support.cryptopro.ru/index.php?/Knowledgebase/Article/View/467

Hooks

This plugin provides several hooks to extend its functionality.

PHP Hooks

sdcp_params

Filters the shortcode parameters. You can change the DOM element id to sign

add_filter('sdcp_params', 'change_sdcp_params');
function change_sdcp_params($sdcp_params)
{
    // Your code here
    return $sdcp_params;
}

sdcp_cert_list_item

Filters the list item of the certificate. You can filter cerst by INN, owner, cn

add_filter('sdcp_cert_list_item', 'change_sdcp_cert_item_li');
function change_sdcp_cert_item_li($item)
{
    // Your code here
    return 'Signed at: ' . esc_html($item['created_at']) . ' by ' . esc_html($item['owner']);
}


sdcp_saved_sign

This action is triggered after a signature is saved. You can do anything with signed data array

add_action('sdcp_saved_sign', 'sdcp_get_datasignement', 50, 1);
function sdcp_get_datasignement($saved_data)
{
    // Your code here
}

JavaScript Hooks

You must add yur own script to WordPress at first

function sdcp_hook_javascript_footer() {
    ?>
        <script>
          // your javascript code goes here
        </script>
    <?php
}
add_action('wp_footer', 'sdcp_hook_javascript_footer');


certs

This hook is triggered after the certificates are fetched.
sdcp_ajax_object.callbacks.push({ hook: “certs”, callback: certs });
const certs = (certs) => {
console.log(certs);
return certs;
};

success

This hook is triggered after the form is submitted successfully.

sdcp_ajax_object.callbacks.push({ hook: "success", callback: success });
const success = (successData) => {
    console.log(successData);
    return successData;
};

error

This hook is triggered if an error occurs during form submission.

sdcp_ajax_object.callbacks.push({ hook: "error", callback: errors });
const errors = (errorData) => {
    console.log(errorData);
    return errorData;
};

listoptions

This hook is triggered when the certificate options are being rendered.

sdcp_ajax_object.callbacks.push({ hook: "listoptions", callback: listoptions });
const listoptions = (cert) => {
    console.log(cert);
    return Owner: ${cert.owner}, Expires: ${new Date(
        cert.validTo
      ).toLocaleDateString()}`;

};`

Verification

To verify the attached signature, you can use the CryptoPro aplication in your browser, or the Gosuslugi service.
Plugin makes the attached signature and store it in post meta field “sdcp_sign” in “sign” json field.
Plugin give you link to download the signatures as file in [sdcp_show_creation_date] shortcode. Optionaly you can use the “post_id” parameter with this short code. As example,

[sdcp_show_creation_date post_id=2]

Using Gosuslugi

  1. Go to the Gosuslugi signature verification page: https://e-trust.gosuslugi.ru/check/sign#/portal/sig-check
  2. Upload the file with the attached signature.
  3. The service will verify the signature and display the result.