Thanks to ALT Linux team for the initial idea how to build it without proprietary libcapi libraries from CryptoPro.