├── .babelrc ├── .editorconfig ├── .eslintrc.yml ├── .gitattributes ├── .gitignore ├── .gitlab └── issue_templates │ ├── bug_for_API.md │ ├── feature_request.md │ └── templates_bug.md ├── .nvmrc ├── .stylelintrc ├── BUILD.md ├── CHANGES ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── __tests__ ├── __fixtures__ │ ├── certificates.ts │ ├── policy.ts │ ├── tokens.ts │ └── transactions.ts ├── actions │ └── dss.spec.ts └── reducers │ ├── certificatesDSS.spec.ts │ ├── policyDSS.spec.ts │ ├── tokens.spec.ts │ └── transactionDSS.spec.ts ├── app ├── AC │ ├── caActions.ts │ ├── cloudCspActions.ts │ ├── documentsActions.ts │ ├── documentsFiltersActions.ts │ ├── dssActions.ts │ ├── eventsActions.ts │ ├── eventsFiltersActions.ts │ ├── globalLocks.ts │ ├── index.ts │ ├── licenseActions.ts │ ├── multiOperations.ts │ ├── searchActions.ts │ ├── servicesActions.ts │ ├── settingsActions.ts │ ├── trustedIdActions.ts │ ├── trustedServicesActions.ts │ ├── urlActions.ts │ ├── urlCmdCertInfo.ts │ ├── urlCmdCertificates.ts │ ├── urlCmdDiagnostic.ts │ ├── urlCmdSignAndEncrypt.ts │ ├── urlCmdStartView.ts │ └── urlCmdUtils.ts ├── Filters │ └── SearchElement.tsx ├── app.global.css ├── app.html ├── app.tsx ├── components │ ├── About │ │ ├── AboutWindow.tsx │ │ └── DiagnosticInfo.tsx │ ├── AddressBook │ │ └── AddressBookWindow.tsx │ ├── App.tsx │ ├── BlockNotElements.tsx │ ├── BlockWithReference.tsx │ ├── CA │ │ ├── CertificateItem.tsx │ │ ├── CryptoProCASettings.tsx │ │ ├── DynamicRegistrationForm.tsx │ │ └── LoginForm.tsx │ ├── CRL │ │ ├── CRLDelete.tsx │ │ ├── CRLInfo.tsx │ │ ├── CRLListItem.tsx │ │ ├── CrlStatusIcon.tsx │ │ └── CrlTable.tsx │ ├── Certificate │ │ ├── AddCertificate.tsx │ │ ├── BestStore.tsx │ │ ├── CertificateChainInfo.tsx │ │ ├── CertificateDelete.tsx │ │ ├── CertificateExport.tsx │ │ ├── CertificateInfo.tsx │ │ ├── CertificateInfoTabs.tsx │ │ ├── CertificateList.tsx │ │ ├── CertificateListItem.tsx │ │ ├── CertificateListItemBigWidth.tsx │ │ ├── CertificateSelectionForEncrypt.tsx │ │ ├── CertificateSelectionForSignature.tsx │ │ ├── CertificateStatusIcon.tsx │ │ ├── CertificateTable.tsx │ │ ├── CertificateWindow.tsx │ │ └── NameInfo.tsx │ ├── CheckBoxWithLabel.tsx │ ├── CloudCSP │ │ ├── AuthWebView.tsx │ │ └── CloudCSP.tsx │ ├── Containers │ │ ├── ContainerDelete.tsx │ │ ├── ContainerListItem.tsx │ │ ├── ContainersList.tsx │ │ └── ContainersWindow.tsx │ ├── DSS │ │ ├── ConfirmTransaction.tsx │ │ ├── DSSConnection.tsx │ │ ├── PinCodeForDssContainer.tsx │ │ └── ReAuth.tsx │ ├── DatePicker.tsx │ ├── Diagnostic │ │ ├── Diagnostic.tsx │ │ ├── DiagnosticModal.tsx │ │ ├── Problems.tsx │ │ └── Resolve.tsx │ ├── Dialog.tsx │ ├── Documents │ │ ├── DeleteDocuments.tsx │ │ ├── DocumentItemButtons.tsx │ │ ├── DocumentsRightColumn.tsx │ │ ├── DocumentsTable.tsx │ │ ├── DocumentsWindow.tsx │ │ └── FilterDocuments.tsx │ ├── EncodingTypeSelector.tsx │ ├── Encryption │ │ └── EncryptionAlgorithmSelector.tsx │ ├── Events │ │ ├── EventTable.tsx │ │ ├── EventsWindow.tsx │ │ └── FilterEvents.tsx │ ├── Files │ │ ├── FileIcon.tsx │ │ ├── FileItemButtons.tsx │ │ ├── FileList.tsx │ │ ├── FileListItem.tsx │ │ ├── FileSelector.tsx │ │ ├── FileTable.tsx │ │ ├── FileTableSmall.tsx │ │ ├── RemoteFileListItem.tsx │ │ └── fileManager.ts │ ├── HeaderWorkspaceBlock.tsx │ ├── License │ │ ├── ButtonWithExternalLink.tsx │ │ ├── LicenseCSPSetup.tsx │ │ ├── LicenseInfo.tsx │ │ ├── LicenseInfoCSP.tsx │ │ ├── LicenseInfoField.tsx │ │ ├── LicenseOCSPSetup.tsx │ │ ├── LicenseSetupModal.tsx │ │ ├── LicenseStatus.tsx │ │ ├── LicenseTSPSetup.tsx │ │ └── LicenseWindow.tsx │ ├── MenuBar.tsx │ ├── Modal.tsx │ ├── MultiOperations │ │ ├── OperationsResultsTable.tsx │ │ ├── ResultsRightColumn.tsx │ │ └── ResultsWindow.tsx │ ├── PasswordDialog.tsx │ ├── ProgressBars.tsx │ ├── RecipientsList.tsx │ ├── Request │ │ ├── CertificateRequest.tsx │ │ ├── CertificateRequestCA.tsx │ │ ├── DynamicSubjectName.tsx │ │ ├── HeaderTabs.tsx │ │ ├── KeyParameters.tsx │ │ ├── RequestButtons.tsx │ │ ├── RequestCADelete.tsx │ │ ├── RequestCAExport.tsx │ │ ├── RequestCAInfo.tsx │ │ ├── RequestCAListItem.tsx │ │ └── SubjectNameInfo.tsx │ ├── Root.tsx │ ├── SelectFolder.tsx │ ├── Services │ │ ├── AddService.tsx │ │ ├── DeleteService.tsx │ │ ├── ServiceInfo.tsx │ │ ├── ServiceList.tsx │ │ ├── ServiceListItem.tsx │ │ ├── ServiceListItemBigWidth.tsx │ │ ├── ServiceWindow.tsx │ │ └── types.ts │ ├── Settings │ │ ├── AllSettings.tsx │ │ ├── AskSaveSetting.tsx │ │ ├── LocaleSelect.tsx │ │ ├── OcspSettings.tsx │ │ ├── Operations.tsx │ │ ├── RenameSettings.tsx │ │ ├── SaveSettings.tsx │ │ ├── SettingsSelector.tsx │ │ ├── TspSettings.tsx │ │ └── WrongCertificate.tsx │ ├── SideMenu.tsx │ ├── Signature │ │ ├── OcspInfo.tsx │ │ ├── SignatureInfoBlock.tsx │ │ ├── SignatureStandardSelector.tsx │ │ ├── SignatureStatus.tsx │ │ ├── SignatureTypeSelector.tsx │ │ ├── SignerInfo.tsx │ │ ├── TimestampInfo.tsx │ │ └── TimestampTypeSelector.tsx │ ├── SignatureAndEncrypt │ │ ├── SignatureAndEncryptRightColumn.tsx │ │ └── SignatureAndEncryptWindow.tsx │ ├── SignerCertificateInfo.tsx │ ├── Sort │ │ ├── SortDirection.ts │ │ └── SortIndicator.tsx │ ├── TrustedId │ │ └── AuthWebView.tsx │ └── TrustedServices │ │ ├── AddTrustedService.tsx │ │ ├── TrustedServiceDelete.tsx │ │ ├── TrustedServicesTable.tsx │ │ └── TrustedServicesWindow.tsx ├── constants.ts ├── decorators │ └── accordion.tsx ├── errors.ts ├── history.ts ├── i18n │ ├── EN.ts │ ├── RU.ts │ └── localize.tsx ├── index.d.ts ├── main.development.js ├── menu.js ├── middlewares │ ├── logger.ts │ └── randomId.ts ├── package-lock.json ├── package.json ├── parse-app-url.ts ├── reducer │ ├── certificates.ts │ ├── certificatesDSS.ts │ ├── certrequests.ts │ ├── certtemplate.ts │ ├── cloudCSP.ts │ ├── connections.ts │ ├── containers.ts │ ├── crls.ts │ ├── documents.ts │ ├── dssResponses.ts │ ├── events.ts │ ├── files.ts │ ├── filters.ts │ ├── globalLocks.ts │ ├── index.ts │ ├── license.ts │ ├── multiOperations.ts │ ├── passwordDSS.ts │ ├── policyDSS.ts │ ├── regrequests.ts │ ├── remoteFiles.ts │ ├── services.ts │ ├── settings.ts │ ├── signatures.ts │ ├── templates.ts │ ├── tokens.ts │ ├── transactionDSS.ts │ ├── trustedId.ts │ ├── trustedServices.ts │ ├── urlActions.ts │ ├── urlCmdCertInfo.ts │ ├── urlCmdCertificates.ts │ ├── urlCmds.ts │ └── users.ts ├── resources │ ├── agreement.html │ ├── certreq_templates │ │ └── CertReqTemplateDefault.json │ ├── cryptoarm-gost.icns │ ├── cryptoarm-gost.ico │ ├── cryptoarm-gost.png │ ├── cryptoarm-gost_1024.png │ ├── css │ │ ├── font-awesome-animation.min.css │ │ ├── materialize.css │ │ ├── materialize.min.css │ │ ├── nouislider.css │ │ └── react-virtualized.css │ ├── fonts │ │ ├── material-design-icons │ │ │ ├── MaterialIcons-Regular.eot │ │ │ ├── MaterialIcons-Regular.ijmap │ │ │ ├── MaterialIcons-Regular.svg │ │ │ ├── MaterialIcons-Regular.ttf │ │ │ ├── MaterialIcons-Regular.woff │ │ │ ├── MaterialIcons-Regular.woff2 │ │ │ ├── README.md │ │ │ ├── codepoints │ │ │ └── material-icons.css │ │ └── roboto │ │ │ ├── Roboto-Bold.eot │ │ │ ├── Roboto-Bold.ttf │ │ │ ├── Roboto-Bold.woff │ │ │ ├── Roboto-Bold.woff2 │ │ │ ├── Roboto-Light.eot │ │ │ ├── Roboto-Light.ttf │ │ │ ├── Roboto-Light.woff │ │ │ ├── Roboto-Light.woff2 │ │ │ ├── Roboto-Medium.eot │ │ │ ├── Roboto-Medium.ttf │ │ │ ├── Roboto-Medium.woff │ │ │ ├── Roboto-Medium.woff2 │ │ │ ├── Roboto-Regular.eot │ │ │ ├── Roboto-Regular.ttf │ │ │ ├── Roboto-Regular.woff │ │ │ ├── Roboto-Regular.woff2 │ │ │ ├── Roboto-Thin.eot │ │ │ ├── Roboto-Thin.ttf │ │ │ ├── Roboto-Thin.woff │ │ │ └── Roboto-Thin.woff2 │ ├── image │ │ ├── back_button.svg │ │ ├── bug.svg │ │ ├── ca │ │ │ ├── export_request.svg │ │ │ ├── new_request_to_ca.svg │ │ │ ├── request_to_ca.svg │ │ │ ├── service_ca.svg │ │ │ ├── service_status_error.svg │ │ │ ├── service_status_ok.svg │ │ │ └── service_status_unknown.svg │ │ ├── cancel_button.svg │ │ ├── cert_error_full.svg │ │ ├── cert_ok_full.svg │ │ ├── cert_status_error.svg │ │ ├── cert_status_ok.svg │ │ ├── cert_stores │ │ │ ├── container.svg │ │ │ ├── crl.svg │ │ │ ├── intermediate.svg │ │ │ ├── my.svg │ │ │ ├── other.svg │ │ │ ├── request.svg │ │ │ ├── root.svg │ │ │ └── token.svg │ │ ├── chain │ │ │ ├── chain_1.png │ │ │ ├── chain_10.png │ │ │ ├── chain_2.png │ │ │ ├── chain_3.png │ │ │ ├── chain_4.png │ │ │ ├── chain_5.png │ │ │ ├── chain_6.png │ │ │ ├── chain_7.png │ │ │ ├── chain_8.png │ │ │ └── chain_9.png │ │ ├── cloud_key_icon.svg │ │ ├── cryptoarm-gost.png │ │ ├── cryptoarm-gost.svg │ │ ├── docmenu_arhiver.svg │ │ ├── docmenu_decrypt.svg │ │ ├── docmenu_encrypt.svg │ │ ├── docmenu_remove.svg │ │ ├── docmenu_removesign.svg │ │ ├── docmenu_sign.svg │ │ ├── docmenu_verifysign.svg │ │ ├── dss │ │ │ ├── cloud_cert_error.svg │ │ │ ├── cloud_cert_ok.svg │ │ │ └── dss_key.svg │ │ ├── files │ │ │ ├── file_avi.png │ │ │ ├── file_csr.png │ │ │ ├── file_doc.png │ │ │ ├── file_docx.png │ │ │ ├── file_enc.png │ │ │ ├── file_file.png │ │ │ ├── file_jpg.png │ │ │ ├── file_pdf.png │ │ │ ├── file_pfx.png │ │ │ ├── file_ppt.png │ │ │ ├── file_sig.png │ │ │ ├── file_sig_any.png │ │ │ ├── file_sig_error.png │ │ │ ├── file_sig_ok.png │ │ │ ├── file_txt.png │ │ │ ├── file_unknown.png │ │ │ ├── file_xls.png │ │ │ └── file_zip.png │ │ ├── folder_icon.svg │ │ ├── folder_shoose_icon.svg │ │ ├── geo_gray.png │ │ ├── icon_filter_off.svg │ │ ├── icon_filter_on.svg │ │ ├── key.svg │ │ ├── key_container_icon.png │ │ ├── logo_trusted.png │ │ ├── logo_trusted.svg │ │ ├── mail_contact_icon.png │ │ ├── mail_icon.svg │ │ ├── ok_button.svg │ │ ├── operation_status_error.svg │ │ ├── operation_status_success.svg │ │ ├── operations │ │ │ ├── add_lic.svg │ │ │ ├── add_question.svg │ │ │ ├── add_setting.svg │ │ │ ├── buy_lic.svg │ │ │ ├── cert_delete.svg │ │ │ ├── clear_setting.svg │ │ │ ├── cloud_question.svg │ │ │ ├── container.svg │ │ │ ├── copy.svg │ │ │ ├── delete.svg │ │ │ ├── edit_setting.svg │ │ │ ├── export_cert.svg │ │ │ ├── export_setting.svg │ │ │ ├── import_cert.svg │ │ │ ├── import_dss_cert.svg │ │ │ ├── key_add.svg │ │ │ ├── key_delete.svg │ │ │ └── send_in_sign_and_encrypt.svg │ │ ├── password.svg │ │ ├── preloader.png │ │ ├── return-button.svg │ │ ├── service_category_cert.svg │ │ ├── service_category_connect.svg │ │ ├── setting.svg │ │ ├── setting_color.svg │ │ ├── sidemenu │ │ │ ├── about.svg │ │ │ ├── add_folder.svg │ │ │ ├── address_book.svg │ │ │ ├── application.svg │ │ │ ├── certificates.svg │ │ │ ├── documents.svg │ │ │ ├── dss.svg │ │ │ ├── exit.svg │ │ │ ├── folder.svg │ │ │ ├── help.svg │ │ │ ├── journal.svg │ │ │ ├── license.svg │ │ │ ├── services.svg │ │ │ ├── sign_and_encrypt.svg │ │ │ └── sign_operation.svg │ │ ├── status_cert_fail_icon.svg │ │ ├── status_cert_ok_icon.svg │ │ ├── status_error.svg │ │ ├── status_ok.svg │ │ ├── status_unknow.svg │ │ ├── status_wait.svg │ │ ├── tray.ico │ │ ├── tray.png │ │ ├── tray_mac.png │ │ ├── tray_nix.png │ │ └── warning.svg │ ├── index.html │ ├── js │ │ ├── hammer.min.js │ │ ├── jquery-3.2.1.min.js │ │ ├── jquery.visible.js │ │ ├── jquery.visible.min.js │ │ ├── materialize.js │ │ ├── materialize.min.js │ │ └── nouislider.js │ ├── preloader_index.html │ └── ssl │ │ ├── addCA.linux.sh │ │ ├── addCA.osx.sh │ │ └── addCA.win.bat ├── selectors │ ├── crlsSelectors.ts │ ├── documentsSelector.ts │ ├── eventsSelectors.ts │ ├── index.ts │ ├── operationsResultsSelector.ts │ ├── requestCASelector.ts │ ├── servicesSelectors.ts │ └── trustedServicesSelector.ts ├── server │ └── constants.ts ├── store │ ├── configureStore.development.ts │ ├── configureStore.production.ts │ ├── index.ts │ └── preloadedState.ts ├── table.global.css ├── trusted │ ├── encrypt.ts │ ├── jwt.ts │ ├── sign.ts │ └── store.ts ├── utils.ts ├── utils │ └── dss │ │ └── helpers.ts └── winstonLogger.ts ├── build ├── icon.icns └── icon.ico ├── demo └── cryptoarm-api │ ├── README.md │ ├── form.html │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── pki │ ├── cert.pem │ └── key.pem │ ├── public │ ├── files │ │ ├── file1.txt │ │ ├── file1.txt.sig │ │ ├── file2.txt │ │ ├── file2.txt.enc │ │ └── file4.pdf │ ├── js │ │ ├── custom-protocol-check.min.js │ │ ├── script.js │ │ ├── script.js.map │ │ └── script.ts │ └── json │ │ ├── 2c48eb32-a0a8-405c-ade9-eed130605cba.json │ │ ├── 9c7101f7-9c47-4481-b4da-a6a497abde08.json │ │ ├── cert-info │ │ └── cert-info-params.json │ │ ├── certs │ │ ├── export-cert.json │ │ ├── export-certs-stores.json │ │ ├── export-certs.json │ │ └── import-cert.json │ │ ├── diagnostics │ │ └── diagnostics-params.json │ │ ├── efac5229-0595-41e9-b1aa-7df406539b87.json │ │ ├── server-errors │ │ ├── internal-error.json │ │ ├── invalid-params.json │ │ ├── invalid-request.json │ │ ├── method-not-found.json │ │ └── parse-error.json │ │ ├── signAndEncrypt │ │ ├── sign-attached-file.json │ │ ├── sign-detached-file.json │ │ ├── sign-multiple-files.json │ │ └── verify-attached-sign.json │ │ └── start-view │ │ └── certificates-my.json │ ├── server.js │ └── tsconfig.json ├── docs ├── КриптоАРМ API.pdf ├── Руководство пользователя.pdf └── Руководство программиста.pdf ├── package-lock.json ├── package.json ├── product.json ├── setupJest.ts ├── shrinkwrap.json ├── trusted_pub_key.gpg ├── tsconfig.json ├── tslint.json ├── types ├── crypto.d.ts └── modal.d.ts ├── webpack.config.base.js ├── webpack.config.eslint.js ├── webpack.config.main.prod.js ├── webpack.config.renderer.dev.dll.js ├── webpack.config.renderer.dev.js └── webpack.config.renderer.prod.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "env", 5 | { 6 | "targets": { 7 | "node": 8 8 | }, 9 | "useBuiltIns": true 10 | } 11 | ], 12 | "stage-0", 13 | "es2015", 14 | "react" 15 | ], 16 | "plugins": [ 17 | "add-module-exports", 18 | "dynamic-import-webpack" 19 | ], 20 | "env": { 21 | "production": { 22 | "presets": [ 23 | "react-optimize" 24 | ], 25 | "plugins": [ 26 | "transform-class-properties", 27 | "transform-es2015-classes", 28 | "babel-plugin-dev-expression" 29 | ] 30 | }, 31 | "development": { 32 | "presets": [ 33 | "react-hmre" 34 | ], 35 | "plugins": [ 36 | "transform-class-properties", 37 | "transform-es2015-classes", 38 | "react-hot-loader/babel" 39 | ] 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.{json,js,jsx,ts,tsx,html,css}] 11 | indent_style = space 12 | indent_size = 2 13 | 14 | [.eslintrc] 15 | indent_style = space 16 | indent_size = 2 17 | 18 | [*.md] 19 | trim_trailing_whitespace = false 20 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | *.jpg binary 3 | *.png binary 4 | *.ico binary 5 | *.icns binary 6 | *.eot binary 7 | *.ttf binary 8 | *.woff binary 9 | *.woff2 binary 10 | *.exe binary 11 | *.dll binary 12 | *.dylib binary 13 | *.pdf binary 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Media files 2 | *.ai 3 | 4 | # Logs 5 | logs 6 | *.log 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | 13 | # Directory for instrumented libs generated by jscoverage/JSCover 14 | lib-cov 15 | 16 | # Coverage directory used by tools like istanbul 17 | coverage 18 | 19 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 20 | .grunt 21 | 22 | # node-waf configuration 23 | .lock-wscript 24 | 25 | # Compiled binary addons (http://nodejs.org/api/addons.html) 26 | build/Release 27 | .eslintcache 28 | 29 | # Dependency directory 30 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 31 | node_modules 32 | app/node_modules 33 | 34 | # OSX 35 | .DS_Store 36 | 37 | # App packaged 38 | release 39 | app/main.js 40 | app/main.js.map 41 | app/bundle.js 42 | app/bundle.js.map 43 | app/main.css 44 | app/main.css.map 45 | dist 46 | dll 47 | main.js 48 | main.js.map 49 | tmp 50 | tmp_app_build 51 | cache 52 | 53 | .idea 54 | npm-debug.log.* 55 | __snapshots__ 56 | .awcache 57 | 58 | /.vscode/ 59 | -------------------------------------------------------------------------------- /.gitlab/issue_templates/bug_for_API.md: -------------------------------------------------------------------------------- 1 | **Версия:** 2 | 3 | **Модуль:** 4 | 5 | **ОПИСАНИЕ:** 6 | 7 | ***URL запроса:*** 8 | 9 | ***Предусловие:*** 10 | 11 | ***Пример данных:*** 12 | 13 | ***Скрин запроса:*** -------------------------------------------------------------------------------- /.gitlab/issue_templates/feature_request.md: -------------------------------------------------------------------------------- 1 | **ОПИСАНИЕ:** -------------------------------------------------------------------------------- /.gitlab/issue_templates/templates_bug.md: -------------------------------------------------------------------------------- 1 | **Версия:** 2 | 3 | **Окружение:** 4 | 5 | 6 | **Модуль:** 7 | 8 | 9 | **ОПИСАНИЕ:** 10 | 11 | 12 | 13 | 14 | ***Предусловие:*** 15 | 16 | **ШАГИ:** 17 | 18 | **Фактический результат:** 19 | 20 | **Ожидаемый результат:** 21 | 22 | ***Пример данных:*** -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v6.9.5 2 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard" 3 | } 4 | -------------------------------------------------------------------------------- /BUILD.md: -------------------------------------------------------------------------------- 1 | # Сборка КриптоАРМ ГОСТ 2 | 3 | Описан процесс сборки portable версии 4 | 5 | ## Необходимое окружение 6 | 7 | - Node.js v12.n LTS 8 | 9 | ## VS code extensions 10 | 11 | Расширения нужны для единообразного форматирования кода и статического анализа кода 12 | 13 | - Name: Editor Config for VS Code (Id: chrisdias.vscodeeditorconfig) 14 | - Name: ESLint (Id: dbaeumer.vscode-eslint) 15 | - Name: TSLint (Id: ms-vscode.vscode-typescript-tslint-plugin) 16 | 17 | ## Используемые подпроекты 18 | 19 | - trusted-crypto 20 | - trusted-curl 21 | 22 | ## Сборка 23 | 24 | ```bash 25 | npm install -g typescript 26 | npm install 27 | cd app 28 | npm install 29 | cd .. 30 | npm run package 31 | ``` 32 | 33 | На windows последний шаг поменять на: npm run package-win 34 | Собранные модули trusted-crypto и trusted-curl надо скопировать в 35 | 36 | dist/-unpacked/resources/app/node_modules 37 | 38 | ## Запуск для разработки 39 | 40 | ```bash 41 | npm install -g typescript 42 | npm install 43 | cd app 44 | npm install 45 | cd .. 46 | npm run dev 47 | ``` 48 | 49 | Собранные модули trusted-crypto и trusted-curl надо скопировать в 50 | 51 | ./app/node_modules 52 | -------------------------------------------------------------------------------- /__tests__/__fixtures__/certificates.ts: -------------------------------------------------------------------------------- 1 | const CERTIFICATES = [{ 2 | CertificateType: "ServerSide", 3 | ID: 14, 4 | DName: "CN=idonly", 5 | CertificateBase64: "MIIDCDCCA ... ugFV8td4DaneG2/gno7T6Alohp6CF/yOu", 6 | Status: { 7 | Value: "ACTIVE", 8 | RevocationInfo: null, 9 | PinCode: null, 10 | ActiveCertId: 0, 11 | }, 12 | IsDefault: false, 13 | CertificateAuthorityID: 11, 14 | CspID: "e8e67f9e-7eed-4116-ad98-20582e4d766e", 15 | HashAlgorithms: ["GOST R 34.11-94"], 16 | ProviderName: null, 17 | ProviderType: 0, 18 | PrivateKeyNotBefore: null, 19 | PrivateKeyNotAfter: null, 20 | HasPin: false, 21 | FriendlyName: "", 22 | }, { 23 | CertificateType: "ServerSide", 24 | ID: 15, 25 | DName: "CN=idonly, C=RU", 26 | CertificateBase64: "MIIG+TCCBq ... dJkhC/rkJrBYhT574WAMgGdxGQb1lQ==", 27 | Status: { 28 | Value: "ACTIVE", 29 | RevocationInfo: null, 30 | PinCode: null, 31 | ActiveCertId: 0, 32 | }, 33 | IsDefault: false, 34 | CertificateAuthorityID: 6, 35 | CspID: "e8e67f9e-7eed-4116-ad98-20582e4d766e", 36 | HashAlgorithms: ["GOST R 34.11-94"], 37 | ProviderName: null, 38 | ProviderType: 0, 39 | PrivateKeyNotBefore: null, 40 | PrivateKeyNotAfter: null, 41 | HasPin: false, 42 | FriendlyName: "", 43 | }, 44 | ]; 45 | 46 | const hcertificates: any[] = []; 47 | for (const certificate of CERTIFICATES) { 48 | hcertificates.push({ id: certificate.ID, ...certificate }); 49 | } 50 | 51 | export const certificateMap = hcertificates; 52 | 53 | export default CERTIFICATES; 54 | -------------------------------------------------------------------------------- /__tests__/__fixtures__/tokens.ts: -------------------------------------------------------------------------------- 1 | const TOKEN = "correct_token"; 2 | 3 | export default TOKEN; 4 | export const INCORRECT_TOKEN = "incorrect_token"; 5 | -------------------------------------------------------------------------------- /__tests__/__fixtures__/transactions.ts: -------------------------------------------------------------------------------- 1 | const TRANSACTION = { 2 | OperationCode: 2, 3 | Parameters: 4 | [ 5 | { Name: "SignatureType", Value: "CMS" }, 6 | { Name: "CertificateID", Value: "13" }, 7 | { Name: "DocumentInfo", Value: "testPdf.pdf" }, 8 | { Name: "DocumentType", Value: "pdf" }, 9 | { Name: "IsDetached", Value: "false" }, 10 | { Name: "CADESType", Value: "BES" }, 11 | ], 12 | Document: "JVBERi0xLjUNCiW1tbW14Kfu", 13 | }; 14 | 15 | export default TRANSACTION; 16 | export const TRANSACTION_ID = "1"; 17 | -------------------------------------------------------------------------------- /__tests__/reducers/certificatesDSS.spec.ts: -------------------------------------------------------------------------------- 1 | import { CERTIFICATES_DSS_JSON, GET_CERTIFICATES_DSS, START, SUCCESS } from "../../app/constants"; 2 | import certificatesDSS, { CertificateDSSModel, DefaultReducerState } from "../../app/reducer/certificatesDSS"; 3 | import { arrayToMap, mapToArr } from "../../app/utils"; 4 | import CERTIFICATES, { certificateMap } from "../__fixtures__/certificates"; 5 | 6 | const ACTION = { 7 | payload: { 8 | certificateMap, 9 | }, 10 | type: GET_CERTIFICATES_DSS + SUCCESS, 11 | }; 12 | 13 | describe("reducers", () => { 14 | describe("certificates DSS", () => { 15 | it("should return the initial state", () => { 16 | expect(certificatesDSS(undefined, {})).toEqual(new DefaultReducerState()); 17 | }); 18 | 19 | it("POST_AUTHORIZATION_USER_DSS + SUCCESS", () => { 20 | expect(certificatesDSS(undefined, ACTION)).toEqual(new DefaultReducerState() 21 | .update("entities", (entities) => 22 | entities.merge(arrayToMap(ACTION.payload.certificateMap, CertificateDSSModel)))); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /__tests__/reducers/policyDSS.spec.ts: -------------------------------------------------------------------------------- 1 | import { GET_POLICY_DSS, POLICY_DSS_JSON, SUCCESS } from "../../app/constants"; 2 | import policyDSS, { DefaultReducerState, PolicyDSSModel } from "../../app/reducer/policyDSS"; 3 | import { arrayToMap, mapToArr } from "../../app/utils"; 4 | import POLICY, { NORMALIZE_POLICY, UID } from "../__fixtures__/policy"; 5 | 6 | const ACTION = { 7 | payload: { 8 | id: UID, 9 | policy: NORMALIZE_POLICY, 10 | }, 11 | type: GET_POLICY_DSS + SUCCESS, 12 | }; 13 | 14 | describe("reducers", () => { 15 | describe("policy DSS", () => { 16 | it("should return the initial state", () => { 17 | expect(policyDSS(undefined, {})).toEqual(new DefaultReducerState()); 18 | }); 19 | 20 | it("GET_POLICY_DSS + SUCCESS", () => { 21 | expect(policyDSS(undefined, ACTION)).toEqual(new DefaultReducerState() 22 | .setIn(["entities", ACTION.payload.id], new PolicyDSSModel(ACTION.payload))); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /__tests__/reducers/tokens.spec.ts: -------------------------------------------------------------------------------- 1 | import { DSS_TOKENS_JSON, POST_AUTHORIZATION_USER_DSS, SUCCESS } from "../../app/constants"; 2 | import tokens, { DefaultReducerState, TokenDSSModel } from "../../app/reducer/tokens"; 3 | import TOKEN from "../__fixtures__/tokens"; 4 | 5 | const ACTION = { 6 | payload: { 7 | access_token: TOKEN, 8 | expires_in: 300, 9 | id: "051fbf41-3bc5-8c69-9f59-a80e11a5157b", 10 | token_type: "Bearer", 11 | }, 12 | type: POST_AUTHORIZATION_USER_DSS + SUCCESS, 13 | }; 14 | 15 | describe("reducers", () => { 16 | describe("dss tokens", () => { 17 | it("should return the initial state", () => { 18 | expect(tokens(undefined, {})).toEqual(new DefaultReducerState()); 19 | }); 20 | 21 | it("POST_AUTHORIZATION_USER_DSS + SUCCESS", () => { 22 | expect(tokens(undefined, ACTION)).toEqual(new DefaultReducerState().setIn(["entities", ACTION.payload.id], new TokenDSSModel({ 23 | access_token: ACTION.payload.access_token, 24 | expires_in: ACTION.payload.expires_in, 25 | id: ACTION.payload.id, 26 | token_type: ACTION.payload.token_type, 27 | }))); 28 | }); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /__tests__/reducers/transactionDSS.spec.ts: -------------------------------------------------------------------------------- 1 | import { POST_TRANSACTION_DSS, START, SUCCESS } from "../../app/constants"; 2 | import transactionDSS, { DefaultReducerState, TransactionDSSModel } from "../../app/reducer/transactionDSS"; 3 | import TOKEN from "../__fixtures__/tokens"; 4 | import TRANSACTION from "../__fixtures__/transactions"; 5 | 6 | const ACTION = { 7 | payload: { 8 | id: TOKEN, 9 | }, 10 | type: POST_TRANSACTION_DSS + SUCCESS, 11 | }; 12 | 13 | describe("reducers", () => { 14 | describe("policy DSS", () => { 15 | it("should return the initial state", () => { 16 | expect(transactionDSS(undefined, {})).toEqual(new DefaultReducerState()); 17 | }); 18 | 19 | it("GET_POLICY_DSS + SUCCESS", () => { 20 | expect(transactionDSS(undefined, ACTION)).toEqual(new DefaultReducerState() 21 | .setIn(["entities", ACTION.payload.id], new TransactionDSSModel(ACTION.payload))); 22 | }); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /app/AC/documentsFiltersActions.ts: -------------------------------------------------------------------------------- 1 | import { APPLY_DOCUMENTS_FILTERS, RESET_DOCUMENTS_FILTERS } from "../constants"; 2 | 3 | export function applyDocumentsFilters(filters: any) { 4 | return { 5 | payload: { filters }, 6 | type: APPLY_DOCUMENTS_FILTERS, 7 | }; 8 | } 9 | 10 | export function resetDocumentsFilters() { 11 | return { 12 | type: RESET_DOCUMENTS_FILTERS, 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /app/AC/eventsFiltersActions.ts: -------------------------------------------------------------------------------- 1 | import { 2 | APPLY_EVENTS_FILTERS, EVENTS_CHANGE_FILTER_DATE_FROM, EVENTS_CHANGE_FILTER_DATE_TO, 3 | EVENTS_CHANGE_FILTER_IN_OPERATION_OBJECT, EVENTS_CHANGE_FILTER_LEVEL, EVENTS_CHANGE_FILTER_OPERATION_TYPE, 4 | EVENTS_CHANGE_FILTER_OUT_OPERATION_OBJECT, EVENTS_CHANGE_FILTER_USER_NAME, RESET_EVENTS_FILTERS, 5 | } from "../constants"; 6 | 7 | export function changeFilterUserName(userName: string) { 8 | return { 9 | payload: { userName }, 10 | type: EVENTS_CHANGE_FILTER_USER_NAME, 11 | }; 12 | } 13 | 14 | export function changeFilterInObject(operationObjectIn: string) { 15 | return { 16 | payload: { operationObjectIn }, 17 | type: EVENTS_CHANGE_FILTER_IN_OPERATION_OBJECT, 18 | }; 19 | } 20 | 21 | export function changeFilterOutObject(operationObjectOut: string) { 22 | return { 23 | payload: { operationObjectOut }, 24 | type: EVENTS_CHANGE_FILTER_OUT_OPERATION_OBJECT, 25 | }; 26 | } 27 | 28 | export function changeFilterDateFrom(dateFrom: Date | undefined) { 29 | return { 30 | payload: { dateFrom }, 31 | type: EVENTS_CHANGE_FILTER_DATE_FROM, 32 | }; 33 | } 34 | 35 | export function changeFilterDateTo(dateTo: Date | undefined) { 36 | return { 37 | payload: { dateTo }, 38 | type: EVENTS_CHANGE_FILTER_DATE_TO, 39 | }; 40 | } 41 | 42 | export function changeFilterOperationsType(type: string, value: boolean) { 43 | return { 44 | payload: { type, value }, 45 | type: EVENTS_CHANGE_FILTER_OPERATION_TYPE, 46 | }; 47 | } 48 | 49 | export function changeFilterLevel(level: string) { 50 | return { 51 | payload: { level }, 52 | type: EVENTS_CHANGE_FILTER_LEVEL, 53 | }; 54 | } 55 | 56 | export function applyEventsFilters(filters: any) { 57 | return { 58 | payload: { filters }, 59 | type: APPLY_EVENTS_FILTERS, 60 | }; 61 | } 62 | 63 | export function resetEventsFilters() { 64 | return { 65 | type: RESET_EVENTS_FILTERS, 66 | }; 67 | } 68 | -------------------------------------------------------------------------------- /app/AC/globalLocks.ts: -------------------------------------------------------------------------------- 1 | import { 2 | GLOBAL_LOCKS_NAVIGATION_LOCK, GLOBAL_LOCKS_NAVIGATION_UNLOCK, 3 | } from "../constants"; 4 | import store from "../store"; 5 | 6 | export function navigationLock() { 7 | store.dispatch({type: GLOBAL_LOCKS_NAVIGATION_LOCK}); 8 | } 9 | 10 | export function navigationUnlock() { 11 | store.dispatch({type: GLOBAL_LOCKS_NAVIGATION_UNLOCK}); 12 | } 13 | -------------------------------------------------------------------------------- /app/AC/searchActions.ts: -------------------------------------------------------------------------------- 1 | import { CHANGE_SEARCH_VALUE, REMOVE_SEARCH_VALUE } from "../constants"; 2 | import store from "../store" 3 | 4 | export function changeSearchValue(searchValue: string) { 5 | return { 6 | payload: { searchValue }, 7 | type: CHANGE_SEARCH_VALUE, 8 | }; 9 | } 10 | 11 | export function removeSearchValue() { 12 | store.dispatch({ 13 | type: REMOVE_SEARCH_VALUE, 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /app/AC/servicesActions.ts: -------------------------------------------------------------------------------- 1 | import { IService } from "../components/Services/types"; 2 | import { 3 | ADD_SERVICE, CHANGE_SERVICE_NAME, 4 | CHANGE_SERVICE_SETTINGS, DELETE_SERVICE, 5 | } from "../constants"; 6 | 7 | export function addService(service: IService) { 8 | return { 9 | payload: { 10 | service, 11 | }, 12 | type: ADD_SERVICE, 13 | }; 14 | } 15 | 16 | export function deleteService(id: string) { 17 | return { 18 | payload: { 19 | id, 20 | }, 21 | type: DELETE_SERVICE, 22 | }; 23 | } 24 | 25 | export function changeServiceSettings(id: string, settings: any) { 26 | return { 27 | payload: { 28 | id, 29 | settings, 30 | }, 31 | type: CHANGE_SERVICE_SETTINGS, 32 | }; 33 | } 34 | 35 | export function changeServiceName(id: string, name: string) { 36 | return { 37 | payload: { 38 | id, 39 | name, 40 | }, 41 | type: CHANGE_SERVICE_NAME, 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /app/AC/trustedIdActions.ts: -------------------------------------------------------------------------------- 1 | import { SERVICE_REST } from "../constants"; 2 | import store from "../store"; 3 | 4 | export const getApplicationsFetch = () => { 5 | const token = window.localStorage.getItem("access_token"); 6 | 7 | if (token) { 8 | store.dispatch(fetchApplicationsPending()); 9 | return fetch(SERVICE_REST + "/app/list/v2", { 10 | headers: { 11 | Authorization: "Bearer " + token, 12 | }, 13 | method: "GET", 14 | }) 15 | .then((resp) => resp.json()) 16 | .then((data) => { 17 | if (data.code && data.code !== 200) { 18 | store.dispatch(fetchApplicationsError(data.message)); 19 | 20 | window.localStorage.removeItem("access_token"); 21 | } else { 22 | // tslint:disable-next-line: no-console 23 | console.log("data", data); 24 | 25 | store.dispatch(fetchApplicationsSuccess(data.data)); 26 | } 27 | }); 28 | } 29 | }; 30 | 31 | const fetchApplicationsPending = () => ({ 32 | type: "FETCH_APPLICATIONS_PENDING", 33 | }); 34 | 35 | const fetchApplicationsError = (error: string) => ({ 36 | error, 37 | type: "FETCH_APPLICATIONS_ERROR", 38 | }); 39 | 40 | const fetchApplicationsSuccess = (applications: any) => ({ 41 | payload: applications, 42 | type: "FETCH_APPLICATIONS_SUCCESS", 43 | }); 44 | -------------------------------------------------------------------------------- /app/AC/urlCmdStartView.ts: -------------------------------------------------------------------------------- 1 | import { LOCATION_CERTIFICATES, LOCATION_MAIN, MY, SHOW_DIAGNOSTIC_MODAL_NO_CERT } from "../constants"; 2 | import { IUrlCommandApiV4Type } from "../parse-app-url"; 3 | import { openWindow, paramsRequest, postRequest, removeWarningMessage } from "./urlCmdUtils"; 4 | import { showDiagnosticModalNoCert } from "./trustedServicesActions"; 5 | 6 | export interface IStartViewParameters { 7 | uiView: string; 8 | description: string; 9 | } 10 | 11 | function paramsRequestDiag(id: string) { 12 | return JSON.stringify(paramsRequest("startView.parameters", id, false)); 13 | } 14 | 15 | export function handleUrlCommandStartView(command: IUrlCommandApiV4Type) { 16 | postRequest(command.url, paramsRequestDiag(command.id)).then( 17 | (data: any) => { 18 | const uiView = data.result.uiView; 19 | if (!uiView || !uiView.length) { 20 | // tslint:disable-next-line: no-console 21 | console.log("Error! Empty operation list."); 22 | return; 23 | } 24 | 25 | switch (uiView) { 26 | case "CERTIFICATES_MY": 27 | openWindow(LOCATION_CERTIFICATES, MY); 28 | break; 29 | 30 | case "DIAGNOSTIC_PROBLEM_PERSONAL_CERTIFICATES": 31 | showDiagnosticModalNoCert(); 32 | break; 33 | 34 | default: 35 | // tslint:disable-next-line: no-console 36 | console.error("Error! View " + uiView + " is not supported"); 37 | break; 38 | } 39 | }, 40 | (error) => { 41 | // tslint:disable-next-line: no-console 42 | console.log( 43 | "Error recieving parameters of start view command with id " + 44 | command.id + 45 | ". Error description: " + 46 | error, 47 | ); 48 | }, 49 | ); 50 | } 51 | -------------------------------------------------------------------------------- /app/Filters/SearchElement.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { connect } from "react-redux"; 3 | import { changeSearchValue } from "../AC/searchActions"; 4 | 5 | interface ISearchElementState { 6 | open: boolean; 7 | } 8 | 9 | interface ISearchElementProps { 10 | changeSearchValue: (ev: any) => void; 11 | searchValue: string; 12 | } 13 | 14 | class SearchElement extends React.Component { 15 | constructor(props: ISearchElementProps) { 16 | super(props); 17 | 18 | this.state = ({ 19 | open: false, 20 | }); 21 | } 22 | 23 | handleOpen() { 24 | this.setState({ 25 | open: true, 26 | }); 27 | } 28 | 29 | handleClose() { 30 | // tslint:disable-next-line:no-shadowed-variable 31 | const { changeSearchValue } = this.props; 32 | 33 | changeSearchValue(""); 34 | 35 | this.setState({ 36 | open: false, 37 | }); 38 | } 39 | 40 | handleValueChange = (ev: any) => { 41 | // tslint:disable-next-line:no-shadowed-variable 42 | const { changeSearchValue } = this.props; 43 | changeSearchValue(ev.target.value); 44 | } 45 | 46 | render() { 47 | const { searchValue } = this.props; 48 | 49 | let mainClassName: string; 50 | 51 | this.state.open || searchValue.length ? mainClassName = "active" : mainClassName = ""; 52 | 53 | return ( 54 |
55 | 56 | search 57 | 58 |
59 | 60 | 61 | close 62 | 63 |
64 |
65 | ); 66 | } 67 | } 68 | 69 | export default connect((state) => ({ 70 | searchValue: state.filters.searchValue, 71 | }), { changeSearchValue })(SearchElement); 72 | -------------------------------------------------------------------------------- /app/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello Electron React! 6 | 17 | 18 | 19 |
20 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /app/app.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import "./app.global.css"; 4 | import Root from "./components/Root"; 5 | import store from "./store/index"; 6 | 7 | ReactDOM.render(, document.getElementById("container")); 8 | -------------------------------------------------------------------------------- /app/components/BlockNotElements.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface IBlockNotElementsProps { 4 | name: string; 5 | title: string; 6 | } 7 | 8 | class BlockNotElements extends React.Component { 9 | render() { 10 | const { name, title } = this.props; 11 | return ( 12 |
13 |
{title}
14 | block 15 |
16 | ); 17 | } 18 | } 19 | 20 | export default BlockNotElements; 21 | -------------------------------------------------------------------------------- /app/components/BlockWithReference.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface IBlockWithReferenceProps { 4 | name: string; 5 | title: string; 6 | icon: string; 7 | reference: string; 8 | titleRef: string; 9 | onBtnClick: () => void; 10 | } 11 | 12 | class BlockWithReference extends React.Component { 13 | render() { 14 | const { name, title, icon, onBtnClick, reference, titleRef } = this.props; 15 | 16 | return ( 17 |
18 | {icon} 19 |
{title}
20 | {titleRef} 21 |
22 | ); 23 | } 24 | } 25 | 26 | export default BlockWithReference; 27 | -------------------------------------------------------------------------------- /app/components/CA/CertificateItem.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { connect } from "react-redux"; 3 | import { verifyCertificate } from "../../AC"; 4 | 5 | interface ICertificateInfoProps { 6 | certificate: any; 7 | style?: any; 8 | verifyCertificate: (id: any) => void; 9 | } 10 | 11 | class CertificateInfo extends React.Component { 12 | render() { 13 | // tslint:disable-next-line:no-shadowed-variable 14 | const { certificate, verifyCertificate } = this.props; 15 | 16 | if (!certificate) { 17 | return null; 18 | } 19 | 20 | const status = certificate.status; 21 | let curStatusStyle; 22 | 23 | if (status) { 24 | curStatusStyle = certificate.dssUserID ? "cloud_cert_status_ok" : "cert_status_ok"; 25 | } else { 26 | curStatusStyle = certificate.dssUserID ? "cloud_cert_status_error" : "cert_status_error"; 27 | } 28 | 29 | if (certificate && !certificate.verified) { 30 | verifyCertificate(certificate.id); 31 | } 32 | 33 | return ( 34 | 35 |
36 |
37 |
38 |
39 |
40 |
{certificate.subjectFriendlyName}
41 |
{certificate.issuerFriendlyName}
42 |
43 |
44 | 45 | ); 46 | } 47 | } 48 | 49 | export default connect((state) => { 50 | return {}; 51 | }, { verifyCertificate })(CertificateInfo); 52 | -------------------------------------------------------------------------------- /app/components/CRL/CRLListItem.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | 4 | const rectangleValidStyle = { 5 | background: "#4caf50", 6 | }; 7 | 8 | const rectangleUnvalidStyle = { 9 | background: "#bf3817", 10 | }; 11 | 12 | interface ICertificateListItemProps { 13 | chooseCert: () => void; 14 | operation: string; 15 | isOpen: boolean; 16 | toggleOpen: () => void; 17 | crl: any; 18 | } 19 | 20 | class CRLListItem extends React.Component { 21 | static contextTypes = { 22 | locale: PropTypes.string, 23 | localize: PropTypes.func, 24 | }; 25 | 26 | shouldComponentUpdate(nextProps: ICertificateListItemProps) { 27 | return nextProps.isOpen !== this.props.isOpen; 28 | } 29 | 30 | handleClick = () => { 31 | const { chooseCert, toggleOpen } = this.props; 32 | 33 | chooseCert(); 34 | toggleOpen(); 35 | } 36 | 37 | render() { 38 | const { crl, isOpen } = this.props; 39 | let active = ""; 40 | let rectangleStyle; 41 | 42 | const status = this.checkCRL(crl); 43 | 44 | if (status) { 45 | rectangleStyle = rectangleValidStyle; 46 | } else { 47 | rectangleStyle = rectangleUnvalidStyle; 48 | } 49 | 50 | if (isOpen) { 51 | active = "active"; 52 | } 53 | 54 | return ( 55 |
56 |
57 |
58 |
59 |
{crl.issuerFriendlyName}
60 |
{crl.issuerFriendlyName}
61 |
62 |
63 |
64 | ); 65 | } 66 | 67 | checkCRL = (crl: any) => { 68 | const currentDate = new Date(); 69 | 70 | if (((new Date(crl.nextUpdate)).getTime() >= currentDate.getTime()) && 71 | ((new Date(crl.lastUpdate)).getTime() <= currentDate.getTime())) { 72 | return true; 73 | } else { 74 | // 75 | } 76 | 77 | return false; 78 | } 79 | } 80 | 81 | export default CRLListItem; 82 | -------------------------------------------------------------------------------- /app/components/CRL/CrlStatusIcon.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { connect } from "react-redux"; 3 | import { verifyCRL } from "../../AC"; 4 | 5 | interface ICrlStatusIconProps { 6 | crl: any; 7 | verifyCRL: (id: string) => void; 8 | } 9 | 10 | class CrlStatusIcon extends React.Component { 11 | timerHandle: NodeJS.Timer | null; 12 | 13 | componentDidMount() { 14 | // tslint:disable-next-line: no-shadowed-variable 15 | const { crl, verifyCRL } = this.props; 16 | 17 | this.timerHandle = setTimeout(() => { 18 | if (!crl.verified) { 19 | verifyCRL(crl.id); 20 | } 21 | 22 | this.timerHandle = null; 23 | }, 2000); 24 | } 25 | 26 | componentWillUnmount() { 27 | if (this.timerHandle) { 28 | clearTimeout(this.timerHandle); 29 | this.timerHandle = null; 30 | } 31 | } 32 | 33 | render() { 34 | const { crl } = this.props; 35 | 36 | if (!crl) { 37 | return null; 38 | } 39 | 40 | let curStatusStyle; 41 | 42 | if (crl && crl.status) { 43 | curStatusStyle = "cert_status_ok"; 44 | } else { 45 | curStatusStyle = "cert_status_error"; 46 | } 47 | 48 | return ( 49 |
50 | ); 51 | } 52 | } 53 | 54 | export default connect((state, ownProps: any) => { 55 | return { 56 | crl: ownProps.crl ? state.crls.getIn(["entities", ownProps.crl.id]) : undefined, 57 | }; 58 | }, { verifyCRL })(CrlStatusIcon); 59 | -------------------------------------------------------------------------------- /app/components/Certificate/CertificateInfoTabs.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | 4 | interface ICertificateInfoTabsProps { 5 | activeCertInfoTab: (active: boolean) => void; 6 | } 7 | 8 | class CertificateInfoTabs extends React.Component { 9 | static contextTypes = { 10 | locale: PropTypes.string, 11 | localize: PropTypes.func, 12 | }; 13 | 14 | componentDidMount() { 15 | $(document).ready(function () { 16 | $("ul.tabs").tabs(); 17 | }); 18 | 19 | $(document).ready(function () { 20 | $("ul.tabs").tabs("select_tab", "tab_id"); 21 | }); 22 | } 23 | 24 | render() { 25 | const { localize, locale } = this.context; 26 | const { activeCertInfoTab } = this.props; 27 | 28 | return ( 29 | 43 | ); 44 | } 45 | } 46 | 47 | export default CertificateInfoTabs; 48 | -------------------------------------------------------------------------------- /app/components/Certificate/NameInfo.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | 4 | interface INameInfoProps { 5 | name: string; 6 | } 7 | 8 | interface INameInfoState { 9 | properties: string[]; 10 | } 11 | 12 | export default class NameInfo extends React.Component { 13 | static contextTypes = { 14 | locale: PropTypes.string, 15 | localize: PropTypes.func, 16 | }; 17 | 18 | constructor(props: INameInfoProps) { 19 | super(props); 20 | 21 | if (props && props.name) { 22 | this.state = ({ 23 | properties: props.name.split("\r\n").reverse(), 24 | }); 25 | } else { 26 | this.state = ({ 27 | properties: [], 28 | }); 29 | } 30 | } 31 | 32 | componentDidUpdate(prevProps: INameInfoProps) { 33 | if (this.props.name && this.props.name !== prevProps.name) { 34 | this.setState({ 35 | properties: this.props.name.split("\r\n").reverse(), 36 | }); 37 | } 38 | } 39 | 40 | render() { 41 | return ( 42 |
43 | {this.getElements()} 44 |
45 | ); 46 | } 47 | 48 | getElements = () => { 49 | const { localize, locale } = this.context; 50 | const { properties } = this.state; 51 | 52 | return properties.map((propertie: string) => { 53 | const name = propertie.substring(0, propertie.indexOf("=")); 54 | const localizedName = localize(`NamePropertie.${name}`, locale); 55 | const value = propertie.substring(propertie.indexOf("=") + 1); 56 | 57 | return
58 | {`${localizedName ? localizedName : name} = ${value}`} 59 |
; 60 | }); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/components/CheckBoxWithLabel.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface ICheckBoxWithLabelProps { 4 | disabled?: boolean; 5 | onClickCheckBox: (event: any) => void; 6 | isChecked: boolean; 7 | elementId: string; 8 | title: string; 9 | } 10 | 11 | class CheckBoxWithLabel extends React.Component { 12 | render() { 13 | const { disabled, isChecked, onClickCheckBox, elementId, title } = this.props; 14 | 15 | const classDisabled = disabled ? "disabled" : ""; 16 | 17 | return
18 | 26 | 27 | 28 |
; 29 | } 30 | } 31 | 32 | export default CheckBoxWithLabel; 33 | -------------------------------------------------------------------------------- /app/components/CloudCSP/AuthWebView.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | import ProgressBars from "../ProgressBars"; 4 | 5 | interface IAuthWebViewProps { 6 | auth: string; 7 | onCancel: () => void; 8 | onTokenGet: (token: string) => void; 9 | } 10 | 11 | interface IAuthWebViewState { 12 | isLoading: boolean; 13 | url: string; 14 | } 15 | 16 | class AuthWebView extends React.PureComponent { 17 | constructor(props: IAuthWebViewProps) { 18 | super(props); 19 | this.state = { 20 | isLoading: false, 21 | // tslint:disable-next-line:max-line-length 22 | url: `${this.props.auth}/authorize?client_id=cryptoarm&response_type=token&scope=dss&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob%3Aauto&resource=https%3A%2F%2Fdss.cryptopro.ru%2FSignServer%2Frest%2Fapi%2Fcertificates`, 23 | }; 24 | } 25 | 26 | componentDidMount() { 27 | const webview = document.getElementById("webview"); 28 | 29 | if (webview) { 30 | webview.addEventListener("did-start-loading", this.loadStart); 31 | webview.addEventListener("did-stop-loading", this.loadStop); 32 | webview.addEventListener("did-get-redirect-request", (details) => this.redirect(details)); 33 | } 34 | } 35 | 36 | render() { 37 | const { isLoading } = this.state; 38 | 39 | return ( 40 | 41 | { 42 | isLoading ? : null 43 | } 44 | 45 | 46 | ); 47 | } 48 | 49 | loadStart = () => { 50 | this.setState({ isLoading: true }); 51 | } 52 | 53 | loadStop = () => { 54 | this.setState({ isLoading: false }); 55 | } 56 | 57 | redirect = (details) => { 58 | const regex = /urn:ietf:wg:oauth:2\.0:oob:auto\?access_token=([^&]*)/; 59 | const mathes = regex.exec(details.newURL); 60 | if (mathes) { 61 | const token = mathes[1]; 62 | 63 | if (token && token.length) { 64 | this.props.onTokenGet(token); 65 | } 66 | 67 | this.props.onCancel(); 68 | } 69 | } 70 | } 71 | 72 | export default AuthWebView; 73 | -------------------------------------------------------------------------------- /app/components/Containers/ContainerListItem.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | 4 | class ContainerListItem extends React.Component { 5 | static contextTypes = { 6 | locale: PropTypes.string, 7 | localize: PropTypes.func, 8 | }; 9 | 10 | shouldComponentUpdate(nextProps: { isOpen: boolean; }) { 11 | return nextProps.isOpen !== this.props.isOpen; 12 | } 13 | 14 | handleClick = () => { 15 | const { activeContainer } = this.props; 16 | 17 | activeContainer(); 18 | } 19 | 20 | render() { 21 | const { container, isOpen } = this.props; 22 | let active = ""; 23 | 24 | if (isOpen) { 25 | active = "active"; 26 | } 27 | 28 | return ( 29 | 30 |
31 |
32 |
33 | 34 |
35 |
36 |
{container.friendlyName}
37 |
{container.reader}
38 |
39 |
40 |
41 |
42 | ); 43 | } 44 | } 45 | 46 | export default ContainerListItem; 47 | -------------------------------------------------------------------------------- /app/components/Diagnostic/DiagnosticModal.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | import HeaderWorkspaceBlock from "../HeaderWorkspaceBlock"; 4 | 5 | interface IDiagnosticModalProps { 6 | isOpen: boolean; 7 | header: string; 8 | onClose?: () => void; 9 | } 10 | 11 | class DiagnosticModal extends React.Component { 12 | static contextTypes = { 13 | locale: PropTypes.string, 14 | localize: PropTypes.func, 15 | }; 16 | 17 | componentWillReceiveProps(newProps: IDiagnosticModalProps) { 18 | const { isOpen } = newProps; 19 | 20 | if (!this.props.isOpen && !isOpen) { 21 | return; 22 | } 23 | } 24 | 25 | componentDidMount() { 26 | const { isOpen } = this.props; 27 | 28 | if (isOpen) { 29 | $("#modal-window-diagnostic").openModal({ dismissible: false }); 30 | } 31 | } 32 | 33 | handleCloseModal = () => { 34 | const { onClose } = this.props; 35 | 36 | if (onClose) { 37 | onClose(); 38 | } 39 | 40 | $("#modal-window-diagnostic").closeModal(); 41 | } 42 | 43 | render() { 44 | const { isOpen, header } = this.props; 45 | 46 | if (!isOpen) { 47 | return null; 48 | } 49 | 50 | return ( 51 | 64 | ); 65 | } 66 | } 67 | 68 | export default DiagnosticModal; 69 | -------------------------------------------------------------------------------- /app/components/Documents/DeleteDocuments.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | import { USER_NAME } from "../../constants"; 4 | import logger from "../../winstonLogger"; 5 | 6 | interface IDeleteDocumentsProps { 7 | onCancel?: () => void; 8 | removeDocuments: () => void; 9 | } 10 | 11 | class DeleteDocuments extends React.Component { 12 | static contextTypes = { 13 | locale: PropTypes.string, 14 | localize: PropTypes.func, 15 | }; 16 | 17 | componentWillUnmount() { 18 | this.handelCancel(); 19 | } 20 | 21 | render() { 22 | const { removeDocuments } = this.props; 23 | const { localize, locale } = this.context; 24 | 25 | return ( 26 | 27 |
28 |
29 |
30 |
31 | 32 | {localize("Documents.realy_delete_documents", locale)} 33 | 34 |
35 |
36 |
37 |
38 | 39 |
40 | 41 |
42 | 50 |
51 | 52 | ); 53 | } 54 | 55 | handelCancel = () => { 56 | const { onCancel } = this.props; 57 | 58 | if (onCancel) { 59 | onCancel(); 60 | } 61 | } 62 | } 63 | 64 | export default DeleteDocuments; 65 | -------------------------------------------------------------------------------- /app/components/EncodingTypeSelector.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | import ReactDOM from "react-dom"; 4 | 5 | interface IEncodingTypeSelectorProps { 6 | EncodingValue: string; 7 | disabled?: boolean; 8 | handleChange: (encoding: string) => void; 9 | } 10 | 11 | class EncodingTypeSelector extends React.Component { 12 | static contextTypes = { 13 | locale: PropTypes.string, 14 | localize: PropTypes.func, 15 | }; 16 | 17 | /** 18 | * https://github.com/facebook/react/issues/3667 19 | */ 20 | componentDidMount() { 21 | $(document).ready(() => { 22 | $("select").material_select(); 23 | }); 24 | $(ReactDOM.findDOMNode(this.refs.encoding)).on("change", this.changeEncoding); 25 | } 26 | 27 | componentDidUpdate() { 28 | $(document).ready(() => { 29 | $("select").material_select(); 30 | }); 31 | } 32 | changeEncoding = (ev: any) => { 33 | this.props.handleChange(ev.target.value); 34 | } 35 | 36 | render() { 37 | const { localize, locale } = this.context; 38 | const classDisabled = this.props.disabled ? "disabled" : ""; 39 | 40 | return ( 41 |
42 |
43 | 52 | 55 |
56 |
57 | ); 58 | } 59 | } 60 | 61 | export default EncodingTypeSelector; 62 | -------------------------------------------------------------------------------- /app/components/HeaderWorkspaceBlock.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface IHeaderWorkspaceBlockProps { 4 | text: string; 5 | second_text?: string; 6 | onСlickBtn?: () => void; 7 | icon?: string; 8 | new_class?: string; 9 | } 10 | 11 | class HeaderWorkspaceBlock extends React.Component { 12 | getButtons() { 13 | const { icon, onСlickBtn } = this.props; 14 | 15 | if (icon && onСlickBtn) { 16 | return (
  • 17 | 18 | {icon} 19 | 20 |
  • ); 21 | } else { 22 | return null; 23 | } 24 | } 25 | 26 | render() { 27 | const { text, second_text, new_class } = this.props; 28 | const name = new_class ? new_class : ""; 29 | 30 | let element: any; 31 | if (second_text) { 32 | element =
    33 |
    {text}
    34 |
    {second_text}
    35 |
    ; 36 | } else { 37 | element = {text}; 38 | } 39 | 40 | return ( 41 | 49 | ); 50 | } 51 | } 52 | 53 | export default HeaderWorkspaceBlock; 54 | -------------------------------------------------------------------------------- /app/components/License/ButtonWithExternalLink.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | 4 | interface IButtonWithExternalLinkProps { 5 | externalLink: string; 6 | externalName: string; 7 | } 8 | 9 | class ButtonWithExternalLink extends React.Component { 10 | render() { 11 | const { externalName, externalLink } = this.props; 12 | return ( 13 | 14 | this.gotoLink(externalLink)}> 15 | {externalName} 16 | 17 | 18 | ); 19 | } 20 | 21 | gotoLink = (address: string) => { 22 | window.electron.shell.openExternal(address); 23 | } 24 | } 25 | 26 | export default ButtonWithExternalLink; 27 | -------------------------------------------------------------------------------- /app/components/License/LicenseInfoField.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface ILicenseInfoField { 4 | title: string; 5 | info: string; 6 | style: any; 7 | } 8 | 9 | export default function LicenseInfoField({ title, info, style }: ILicenseInfoField) { 10 | return ( 11 | 12 |
    {title}
    13 |
    {info}
    14 |
    15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /app/components/License/LicenseWindow.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | 4 | import LicenseInfo from "./LicenseInfo"; 5 | import LicenseInfoCSP from "./LicenseInfoCSP"; 6 | import LicenseSetupModal from "./LicenseSetupModal"; 7 | import LicenseStatus from "./LicenseStatus"; 8 | 9 | class LicenseWindow extends React.Component<{}, {}> { 10 | static contextTypes = { 11 | locale: PropTypes.string, 12 | localize: PropTypes.func, 13 | }; 14 | 15 | componentDidMount() { 16 | $(".add-licence-modal-btn").leanModal(); 17 | } 18 | 19 | render() { 20 | const { localize, locale } = this.context; 21 | 22 | return ( 23 |
    24 |
    25 | 26 |
    27 | 28 |
    29 |
    30 | 31 |
    32 | 35 |
    36 | ); 37 | } 38 | } 39 | 40 | export default LicenseWindow; 41 | -------------------------------------------------------------------------------- /app/components/Modal.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | import HeaderWorkspaceBlock from "./HeaderWorkspaceBlock"; 4 | 5 | interface IModalProps { 6 | isOpen: boolean; 7 | header: string; 8 | onClose?: () => void; 9 | style?: any; 10 | } 11 | 12 | class Modal extends React.Component { 13 | static contextTypes = { 14 | locale: PropTypes.string, 15 | localize: PropTypes.func, 16 | }; 17 | 18 | componentWillReceiveProps(newProps: IModalProps) { 19 | const { isOpen } = newProps; 20 | 21 | if (!this.props.isOpen && !isOpen) { 22 | return; 23 | } 24 | } 25 | 26 | componentDidMount() { 27 | const { isOpen } = this.props; 28 | 29 | if (isOpen) { 30 | $("#modal-window").openModal({ dismissible: false }); 31 | } 32 | } 33 | 34 | componentWillUnmount() { 35 | $("#modal-window").closeModal(); 36 | } 37 | 38 | handleCloseModal = () => { 39 | const { onClose } = this.props; 40 | 41 | if (onClose) { 42 | onClose(); 43 | } 44 | 45 | $("#modal-window").closeModal(); 46 | } 47 | 48 | render() { 49 | const { isOpen, header } = this.props; 50 | 51 | if (!isOpen) { 52 | return null; 53 | } 54 | 55 | return ( 56 | 69 | ); 70 | } 71 | } 72 | 73 | export default Modal; 74 | -------------------------------------------------------------------------------- /app/components/ProgressBars.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | 4 | export default function ProgressBars({ }, context: { localize: (str: string, locale: string) => string; locale: string; }) { 5 | const { localize, locale } = context; 6 | 7 | return ( 8 |
    9 |
    10 |
    11 |
    12 |
    13 |
    14 |
    15 |
    16 |
    17 |
    18 |
    19 |
    20 |
    21 |
    22 |
    {localize("Settings.wait", locale)}
    23 |
    24 | ); 25 | } 26 | 27 | ProgressBars.contextTypes = { 28 | locale: PropTypes.string, 29 | localize: PropTypes.func, 30 | }; 31 | -------------------------------------------------------------------------------- /app/components/Request/HeaderTabs.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | 4 | interface IHeaderTabsProps { 5 | activeSubjectNameInfoTab: (active: boolean) => void; 6 | } 7 | 8 | class HeaderTabs extends React.Component { 9 | static contextTypes = { 10 | locale: PropTypes.string, 11 | localize: PropTypes.func, 12 | }; 13 | 14 | componentDidMount() { 15 | $(document).ready(() => { 16 | $("ul.tabs").tabs(); 17 | }); 18 | } 19 | 20 | render() { 21 | const { localize, locale } = this.context; 22 | const { activeSubjectNameInfoTab } = this.props; 23 | 24 | return ( 25 | 39 | ); 40 | } 41 | } 42 | 43 | export default HeaderTabs; 44 | -------------------------------------------------------------------------------- /app/components/Request/RequestButtons.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | 4 | interface IRequestButtonsProps { 5 | onCopy: () => void; 6 | } 7 | 8 | class RequestButtons extends React.Component { 9 | static contextTypes = { 10 | locale: PropTypes.string, 11 | localize: PropTypes.func, 12 | }; 13 | 14 | render() { 15 | const { localize, locale } = this.context; 16 | 17 | return ( 18 | 23 | ); 24 | 25 | } 26 | } 27 | 28 | export default RequestButtons; 29 | -------------------------------------------------------------------------------- /app/components/Root.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import {hot} from "react-hot-loader/root"; 3 | import { Provider } from "react-redux"; 4 | import App from "./App"; 5 | 6 | class Root extends React.Component { 7 | render() { 8 | return ( 9 | 10 | 11 | 12 | ); 13 | } 14 | } 15 | 16 | export default hot(Root); 17 | -------------------------------------------------------------------------------- /app/components/SelectFolder.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | 4 | interface ISelectFolderProps { 5 | disabled?: boolean; 6 | directory: string; 7 | viewDirect: (event: any) => void; 8 | openDirect: () => void; 9 | } 10 | 11 | class SelectFolder extends React.Component { 12 | static contextTypes = { 13 | locale: PropTypes.string, 14 | localize: PropTypes.func, 15 | }; 16 | 17 | render() { 18 | const { localize, locale } = this.context; 19 | const { disabled } = this.props; 20 | 21 | const classDisabled = disabled ? "disabled" : ""; 22 | 23 | return ( 24 |
    25 |
    26 | node && node.setAttribute("nwdirectory", "")} id="choose-folder" onChange={this.props.viewDirect} disabled={disabled} /> 27 | 29 |
    30 | 35 |
    36 | ); 37 | } 38 | } 39 | 40 | export default SelectFolder; 41 | -------------------------------------------------------------------------------- /app/components/Services/ServiceListItem.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | import { REQUEST_STATUS } from "../../constants"; 4 | 5 | interface IServiceListItemProps { 6 | chooseCert: () => void; 7 | isOpen: boolean; 8 | toggleOpen: () => void; 9 | regRequest: any; 10 | service: any; 11 | } 12 | 13 | class ServiceListItem extends React.Component { 14 | static contextTypes = { 15 | locale: PropTypes.string, 16 | localize: PropTypes.func, 17 | }; 18 | 19 | render() { 20 | const { service, isOpen, regRequest } = this.props; 21 | 22 | let active = ""; 23 | let status = "ca_service_status "; 24 | 25 | if (regRequest) { 26 | switch (regRequest.Status) { 27 | case REQUEST_STATUS.Q: 28 | case REQUEST_STATUS.P: 29 | status = status + "unknown"; 30 | break; 31 | case REQUEST_STATUS.D: 32 | case REQUEST_STATUS.R: 33 | case REQUEST_STATUS.E: 34 | status = status + "error"; 35 | break; 36 | case REQUEST_STATUS.A: 37 | case REQUEST_STATUS.C: 38 | case REQUEST_STATUS.K: 39 | status = status + "ok"; 40 | break; 41 | default: 42 | status = status + "unknown"; 43 | } 44 | } else { 45 | status = status + "unknown"; 46 | } 47 | 48 | if (isOpen) { 49 | active = "active"; 50 | } 51 | 52 | return ( 53 |
    54 |
    55 |
    56 |
    57 |
    58 |
    59 |
    60 |
    {service.name}
    61 |
    {service.settings.url}
    62 |
    63 |
    64 |
    65 |
    66 | ); 67 | } 68 | 69 | handleClick = () => { 70 | const { chooseCert, toggleOpen } = this.props; 71 | 72 | chooseCert(); 73 | toggleOpen(); 74 | } 75 | } 76 | export default (ServiceListItem); 77 | -------------------------------------------------------------------------------- /app/components/Services/types.ts: -------------------------------------------------------------------------------- 1 | export interface IMegafonSettings { 2 | mobileNumber: string; 3 | } 4 | 5 | export interface ICryptoProSettings { 6 | authURL: string; 7 | restURL: string; 8 | } 9 | 10 | export interface ICryptoProSVSSettings { 11 | hostName: string; 12 | applicationName: string; 13 | } 14 | 15 | export interface ICAServiceSettings { 16 | url: string; 17 | } 18 | 19 | export interface IService { 20 | id: string; 21 | type: "CA_SERVICE"; 22 | settings: ICAServiceSettings; 23 | name: string; 24 | } 25 | 26 | export interface ICertificateRequestCA { 27 | subject: any; 28 | certificate: string; 29 | certRequestId: string; 30 | certificateReq: string; 31 | id: string; 32 | status: string; 33 | serviceId: string; 34 | } 35 | 36 | export interface IRegRequest { 37 | Comment: string; 38 | Description: string; 39 | Email: string; 40 | KeyPhrase: string; 41 | Password: string; 42 | RDN: any; 43 | RegRequestId: string; 44 | Status: string; 45 | Token: string; 46 | id: string; 47 | serviceId: string; 48 | certThumbprint: string; 49 | } 50 | -------------------------------------------------------------------------------- /app/components/Settings/LocaleSelect.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { connect } from "react-redux"; 3 | import { changeLocale } from "../../AC/settingsActions"; 4 | import { EN, RU } from "../../constants"; 5 | 6 | interface ILocaleSelectProps { 7 | changeLocale: (locale: string) => void; 8 | locale: string; 9 | } 10 | 11 | class LocaleSelect extends React.Component { 12 | handleChange = () => { 13 | // tslint:disable-next-line:no-shadowed-variable 14 | const { locale, changeLocale } = this.props; 15 | 16 | locale === RU ? changeLocale(EN) : changeLocale(RU); 17 | window.locale = locale === RU ? EN : RU; 18 | } 19 | 20 | render() { 21 | const { locale } = this.props; 22 | 23 | return ( 24 |
    25 | {locale} 26 |
    27 | ); 28 | } 29 | } 30 | 31 | export default connect((state) => ({ 32 | locale: state.settings.getIn(["entities", state.settings.default]).locale, 33 | }), { changeLocale })(LocaleSelect); 34 | -------------------------------------------------------------------------------- /app/components/Settings/WrongCertificate.tsx: -------------------------------------------------------------------------------- 1 | import PropTypes from "prop-types"; 2 | import React from "react"; 3 | 4 | interface IWrongCertificateProps { 5 | onCancel?: () => void; 6 | onContinue: () => void; 7 | message: any; 8 | } 9 | 10 | const remote = window.electron.remote; 11 | 12 | class WrongCertificate extends React.Component { 13 | static contextTypes = { 14 | locale: PropTypes.string, 15 | localize: PropTypes.func, 16 | }; 17 | 18 | componentWillUnmount() { 19 | const { onCancel } = this.props; 20 | 21 | if (onCancel) { 22 | onCancel(); 23 | } 24 | } 25 | 26 | render() { 27 | const { localize, locale } = this.context; 28 | const { message } = this.props; 29 | 30 | return ( 31 | 32 |
    33 |
    34 |
    35 |
    36 | 37 | { 38 | message 39 | } 40 | 41 |
    42 |
    43 |
    44 |
    45 | 46 |
    47 | 48 | 60 | 61 | ); 62 | } 63 | 64 | handelCancel = () => { 65 | const { onCancel } = this.props; 66 | if (onCancel) { 67 | onCancel(); 68 | } 69 | } 70 | 71 | handelContinue = () => { 72 | this.props.onContinue(); 73 | } 74 | } 75 | 76 | export default WrongCertificate; 77 | -------------------------------------------------------------------------------- /app/components/Sort/SortDirection.ts: -------------------------------------------------------------------------------- 1 | interface ISortDirection { 2 | ASC: "ASC"; 3 | DESC: "DESC"; 4 | } 5 | 6 | const SortDirection: ISortDirection = { 7 | /** 8 | * Sort items in ascending order. 9 | */ 10 | ASC: "ASC", 11 | 12 | /** 13 | * Sort items in descending order. 14 | */ 15 | DESC: "DESC", 16 | }; 17 | 18 | export default SortDirection; 19 | -------------------------------------------------------------------------------- /app/components/Sort/SortIndicator.tsx: -------------------------------------------------------------------------------- 1 | import cn from "classnames"; 2 | import React from "react"; 3 | import SortDirection from "./SortDirection"; 4 | 5 | type TSortDirection = "ASC" | "DESC" | undefined; 6 | 7 | /** 8 | * Displayed beside a header to indicate that a Table is currently sorted by this column. 9 | */ 10 | export default function SortIndicator({ sortDirection }: { sortDirection: TSortDirection }) { 11 | const classNames = cn("ReactVirtualized__Table__sortableHeaderIcon", { 12 | "ReactVirtualized__Table__sortableHeaderIcon--ASC": 13 | sortDirection === SortDirection.ASC, 14 | "ReactVirtualized__Table__sortableHeaderIcon--DESC": 15 | sortDirection === SortDirection.DESC, 16 | }); 17 | 18 | return ( 19 | 20 | { 21 | sortDirection === SortDirection.ASC ? ( 22 | 23 | ) : ( 24 | 25 | ) 26 | } 27 | 28 | 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /app/decorators/accordion.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export default (CustomComponent: any) => class AccordionDecorator extends React.Component { 4 | constructor(props: any) { 5 | super(props); 6 | this.state = { 7 | openItemId: null, 8 | }; 9 | } 10 | 11 | toggleOpenItem = (openItemId: any) => (ev: any) => { 12 | if (ev && ev.preventDefault) { 13 | ev.preventDefault(); 14 | } 15 | 16 | this.setState({ 17 | openItemId: this.isItemOpened(openItemId) ? null : openItemId, 18 | }); 19 | } 20 | 21 | isItemOpened = (id: number) => id === this.state.openItemId; 22 | 23 | render() { 24 | return ; 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /app/errors.ts: -------------------------------------------------------------------------------- 1 | export const ERROR_LOAD_TRUSTED_CRYPTO = "ERROR_LOAD_TRUSTED_CRYPTO"; 2 | export const ERROR_LOAD_TRUSTED_CURL = "ERROR_LOAD_TRUSTED_CURL"; 3 | export const NOT_INSTALLED_CSP = "NOT_INSTALLED_CSP"; 4 | export const ERROR_CHECK_CSP_LICENSE = "ERROR_CHECK_CSP_LICENSE"; 5 | export const NO_GOST_2001 = "NO_GOST_2001"; 6 | export const NO_GOST_2012 = "NO_GOST_2012"; 7 | export const NO_TSP_OCSP_ENABLED = "NO_TSP_OCSP_ENABLED"; 8 | export const ERROR_CHECK_CSP_PARAMS = "ERROR_CHECK_CSP_PARAMS"; 9 | export const NO_CRYPTOARM_LICENSE = "NO_CRYPTOARM_LICENSE"; 10 | export const NO_CORRECT_CRYPTOARM_LICENSE = "NO_CORRECT_CRYPTOARM_LICENSE"; 11 | export const NO_HAVE_CERTIFICATES_WITH_KEY = "NO_HAVE_CERTIFICATES_WITH_KEY"; 12 | 13 | export const WARNING = "WARNING"; 14 | export const BUG = "BUG"; 15 | -------------------------------------------------------------------------------- /app/history.ts: -------------------------------------------------------------------------------- 1 | import { createHashHistory } from "history"; 2 | 3 | const history = createHashHistory(); 4 | 5 | export default history; 6 | -------------------------------------------------------------------------------- /app/middlewares/logger.ts: -------------------------------------------------------------------------------- 1 | export default store => next => action => { 2 | console.log('---', 'before', store.getState()); 3 | console.log('---', 'dispatching', action); 4 | next(action); 5 | console.log('---', 'after', store.getState()); 6 | }; 7 | -------------------------------------------------------------------------------- /app/middlewares/randomId.ts: -------------------------------------------------------------------------------- 1 | export default store => next => action => { 2 | if (!action.generateId) { 3 | return next(action); 4 | } 5 | 6 | next({ 7 | ...action, 8 | randomId: Date.now() + Math.random() 9 | }); 10 | }; 11 | -------------------------------------------------------------------------------- /app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Cifrovye tekhnologii LLC", 3 | "description": "CryptoARM GOST", 4 | "name": "cryptoarm-gost", 5 | "version": "2.5.12", 6 | "main": "./main.js", 7 | "license": "Apache-2.0", 8 | "dependencies": { 9 | "archiver": "^3.0.0", 10 | "chardet": "^1.0.0", 11 | "history": "^4.6.3", 12 | "iconv-lite": "^0.5.1", 13 | "immutable": "^3.8.1", 14 | "node-fetch": "^2.6.0", 15 | "request": "^2.88.0", 16 | "reselect": "^3.0.1", 17 | "sudo-prompt": "^8.2.3", 18 | "tslib": "^1.10.0", 19 | "unzipper": "^0.10.11", 20 | "winston": "^3.0.0" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/reducer/certtemplate.ts: -------------------------------------------------------------------------------- 1 | import * as fs from "fs"; 2 | import { OrderedMap, Record } from "immutable"; 3 | import { CA_REGREGUESTS_JSON, FAIL, GET_CA_REGREQUEST, POST_CA_REGREQUEST, START, SUCCESS, CA_CERTTEMPLATE_JSON } from "../constants"; 4 | import { mapToArr } from "../utils"; 5 | 6 | export const CertTemplateModel = Record({ 7 | id: null, 8 | serviceId: null, 9 | template: null, 10 | }); 11 | 12 | export const DefaultReducerState = Record({ 13 | entities: OrderedMap({}), 14 | }); 15 | 16 | export default (certtemplate = new DefaultReducerState(), action) => { 17 | const { type, payload } = action; 18 | 19 | switch (type) { 20 | case POST_CA_REGREQUEST + SUCCESS: 21 | case GET_CA_REGREQUEST + SUCCESS: 22 | certtemplate = certtemplate.setIn(["entities", payload.id], new CertTemplateModel({ 23 | id: payload.id, 24 | serviceId: payload.serviceId, 25 | template: payload.template, 26 | })); 27 | break; 28 | } 29 | 30 | if (type === POST_CA_REGREQUEST + SUCCESS || type === GET_CA_REGREQUEST + SUCCESS) { 31 | const state = { 32 | certtemplate: mapToArr(certtemplate.entities), 33 | }; 34 | 35 | const sstate = JSON.stringify(state, null, 4); 36 | 37 | fs.writeFile(CA_CERTTEMPLATE_JSON, sstate, (err: any) => { 38 | if (err) { 39 | // tslint:disable-next-line:no-console 40 | console.log("------- error write to ", CA_CERTTEMPLATE_JSON); 41 | } 42 | }); 43 | } 44 | 45 | return certtemplate; 46 | }; 47 | -------------------------------------------------------------------------------- /app/reducer/cloudCSP.ts: -------------------------------------------------------------------------------- 1 | import { FAIL, GET_CERTIFICATES_FROM_DSS, RESET_CLOUD_CSP, START, SUCCESS } from "../constants"; 2 | 3 | const DefaultReducerState = { 4 | certificates: [], 5 | error: null, 6 | loaded: false, 7 | loading: false, 8 | statusCode: null, 9 | }; 10 | 11 | export default (clouCSPState = DefaultReducerState, action) => { 12 | const { type, payload } = action; 13 | 14 | switch (type) { 15 | case GET_CERTIFICATES_FROM_DSS + START: 16 | return clouCSPState = { ...clouCSPState, ...DefaultReducerState, loading: true }; 17 | 18 | case GET_CERTIFICATES_FROM_DSS + SUCCESS: 19 | return clouCSPState = { 20 | ...clouCSPState, 21 | certificates: payload.certificates, 22 | loaded: true, 23 | loading: false, 24 | statusCode: payload.statusCode, 25 | }; 26 | 27 | case GET_CERTIFICATES_FROM_DSS + FAIL: 28 | return clouCSPState = { 29 | ...clouCSPState, 30 | error: payload ? payload.error : "", 31 | loaded: true, 32 | loading: false, 33 | statusCode: payload.statusCode, 34 | }; 35 | 36 | case RESET_CLOUD_CSP: 37 | return clouCSPState = { 38 | ...clouCSPState, ...DefaultReducerState, 39 | }; 40 | } 41 | 42 | return clouCSPState; 43 | }; 44 | -------------------------------------------------------------------------------- /app/reducer/connections.ts: -------------------------------------------------------------------------------- 1 | import { OrderedMap, Record } from "immutable"; 2 | import { ADD_CONNECTION, ADD_LICENSE, DELETE_ALL_TEMPORY_LICENSES, REMOVE_CONNECTION, SET_CONNECTED, SET_DISCONNECTED } from "../constants"; 3 | 4 | const ConnectionModel = Record({ 5 | connected: false, 6 | id: null, 7 | }); 8 | 9 | const LicenseModel = Record({ 10 | id: null, 11 | license: null, 12 | }); 13 | 14 | const DefaultReducerState = Record({ 15 | entities: OrderedMap({}), 16 | licenses: OrderedMap({}), 17 | }); 18 | 19 | export default (connections = new DefaultReducerState(), action) => { 20 | const { type, payload } = action; 21 | 22 | switch (type) { 23 | case ADD_CONNECTION: 24 | return connections.setIn(["entities", payload.id], new ConnectionModel({ 25 | id: payload.id, 26 | })); 27 | 28 | case ADD_LICENSE: 29 | return connections.setIn(["licenses", payload.id], new LicenseModel({ 30 | id: payload.id, 31 | license: payload.license, 32 | })); 33 | 34 | case DELETE_ALL_TEMPORY_LICENSES: 35 | return connections.setIn(["licenses"], OrderedMap({})); 36 | 37 | case REMOVE_CONNECTION: 38 | return connections.deleteIn(["entities", payload.id]); 39 | 40 | case SET_CONNECTED: 41 | return connections.setIn(["entities", payload.id, "connected"], true); 42 | 43 | case SET_DISCONNECTED: 44 | return connections.setIn(["entities", payload.id, "connected"], false); 45 | } 46 | 47 | return connections; 48 | }; 49 | -------------------------------------------------------------------------------- /app/reducer/containers.ts: -------------------------------------------------------------------------------- 1 | import { OrderedMap, Record } from "immutable"; 2 | import { 3 | ACTIVE_CONTAINER, FAIL, GET_CERTIFICATE_FROM_CONTAINER, 4 | LOAD_ALL_CONTAINERS, REMOVE_ALL_CONTAINERS, START, SUCCESS, 5 | } from "../constants"; 6 | import { arrayToMap } from "../utils"; 7 | 8 | const ContainerModel = Record({ 9 | certificate: null, 10 | certificateItem: null, 11 | certificateLoaded: false, 12 | certificateLoading: false, 13 | friendlyName: null, 14 | id: null, 15 | name: null, 16 | reader: null, 17 | }); 18 | 19 | const DefaultReducerState = Record({ 20 | active: null, 21 | entities: OrderedMap({}), 22 | loaded: false, 23 | loading: false, 24 | }); 25 | 26 | export default (sContainers = new DefaultReducerState(), action) => { 27 | const { type, containers, payload } = action; 28 | switch (type) { 29 | case ACTIVE_CONTAINER: 30 | return sContainers.set("active", payload.container); 31 | 32 | case LOAD_ALL_CONTAINERS + START: 33 | return sContainers.set("loading", true); 34 | 35 | case LOAD_ALL_CONTAINERS + SUCCESS: 36 | return sContainers 37 | .set("entities", arrayToMap(containers, ContainerModel)) 38 | .set("loading", false) 39 | .set("loaded", true); 40 | 41 | case GET_CERTIFICATE_FROM_CONTAINER + START: 42 | return sContainers.setIn(["entities", payload.container, "certificateLoading"], true); 43 | 44 | case GET_CERTIFICATE_FROM_CONTAINER + SUCCESS: 45 | return sContainers 46 | .setIn(["entities", payload.container, "certificate"], payload.certificate) 47 | .setIn(["entities", payload.container, "certificateItem"], payload.certificateItem) 48 | .setIn(["entities", payload.container, "certificateLoading"], false) 49 | .setIn(["entities", payload.container, "certificateLoaded"], true); 50 | 51 | case GET_CERTIFICATE_FROM_CONTAINER + FAIL: 52 | return sContainers 53 | .setIn(["entities", payload.container, "certificateLoading"], false) 54 | .setIn(["entities", payload.container, "certificateLoaded"], true); 55 | 56 | case REMOVE_ALL_CONTAINERS: 57 | return sContainers = new DefaultReducerState(); 58 | } 59 | 60 | return sContainers; 61 | }; 62 | -------------------------------------------------------------------------------- /app/reducer/crls.ts: -------------------------------------------------------------------------------- 1 | import { OrderedMap, Record } from "immutable"; 2 | import { 3 | LOAD_ALL_CERTIFICATES, REMOVE_ALL_CERTIFICATES, 4 | START, SUCCESS, VERIFY_CERTIFICATE, VERIFY_CRL 5 | } from "../constants"; 6 | import { arrayToMap } from "../utils"; 7 | 8 | const CRLModel = Record({ 9 | active: false, 10 | authorityKeyid: null, 11 | category: null, 12 | crlNumber: null, 13 | format: null, 14 | hash: null, 15 | id: null, 16 | issuerFriendlyName: null, 17 | issuerName: null, 18 | lastUpdate: null, 19 | nextUpdate: null, 20 | provider: null, 21 | signatureAlgorithm: null, 22 | signatureDigestAlgorithm: null, 23 | status: false, 24 | type: null, 25 | uri: null, 26 | verified: false, 27 | }); 28 | 29 | const DefaultReducerState = Record({ 30 | entities: OrderedMap({}), 31 | loaded: false, 32 | loading: false, 33 | }); 34 | 35 | export default (CRLs = new DefaultReducerState(), action) => { 36 | const { type, crls, payload } = action; 37 | switch (type) { 38 | case LOAD_ALL_CERTIFICATES + START: 39 | return CRLs.set("loading", true); 40 | 41 | case LOAD_ALL_CERTIFICATES + SUCCESS: 42 | return CRLs 43 | .update("entities", (entities) => arrayToMap(crls, CRLModel).merge(entities)) 44 | .set("loading", false) 45 | .set("loaded", true); 46 | 47 | case VERIFY_CRL: 48 | return CRLs 49 | .setIn(["entities", payload.crlId, "status"], payload.crlStatus) 50 | .setIn(["entities", payload.crlId, "verified"], true); 51 | 52 | case REMOVE_ALL_CERTIFICATES: 53 | return CRLs = new DefaultReducerState(); 54 | } 55 | 56 | return CRLs; 57 | }; 58 | -------------------------------------------------------------------------------- /app/reducer/dssResponses.ts: -------------------------------------------------------------------------------- 1 | import { OrderedMap, Record } from "immutable"; 2 | import { 3 | FAIL, POST_AUTHORIZATION_USER_DSS, POST_OPERATION_CONFIRMATION, 4 | RESPONSE, START, SUCCESS, 5 | } from "../constants"; 6 | 7 | const ResponseModel = Record({ 8 | Headerfield: [], 9 | Image: "", 10 | Label: "", 11 | RefID: "", 12 | Title: "", 13 | id: null, 14 | }); 15 | 16 | const DefaultReducerState = Record({ 17 | entities: OrderedMap({}), 18 | }); 19 | 20 | export default (responses = new DefaultReducerState(), action) => { 21 | const { type, payload } = action; 22 | 23 | switch (type) { 24 | case POST_AUTHORIZATION_USER_DSS + START: 25 | return new DefaultReducerState(); 26 | 27 | case POST_OPERATION_CONFIRMATION + RESPONSE: 28 | case POST_AUTHORIZATION_USER_DSS + RESPONSE: 29 | return responses.setIn(["entities", payload.RefID], new ResponseModel({ 30 | Headerfield: payload.Headerfield.slice(), 31 | Image: payload.Image, 32 | Label: payload.Label, 33 | RefID: payload.RefID, 34 | Title: payload.Title, 35 | id: payload.RefID, 36 | })); 37 | 38 | case POST_OPERATION_CONFIRMATION + RESPONSE + SUCCESS: 39 | case POST_OPERATION_CONFIRMATION + RESPONSE + FAIL: 40 | case POST_AUTHORIZATION_USER_DSS + RESPONSE + SUCCESS: 41 | case POST_AUTHORIZATION_USER_DSS + RESPONSE + FAIL: 42 | if (payload && payload.RefID) { 43 | return responses.deleteIn(["entities", payload.RefID]); 44 | } 45 | } 46 | 47 | return responses; 48 | }; 49 | -------------------------------------------------------------------------------- /app/reducer/events.ts: -------------------------------------------------------------------------------- 1 | import { OrderedMap, Record } from "immutable"; 2 | import { LOAD_ALL_EVENTS, REMOVE_ALL_EVENTS, START, SUCCESS } from "../constants"; 3 | import { arrayToMap } from "../utils"; 4 | 5 | const EventModel = Record({ 6 | certificate: null, 7 | operationObject: null, 8 | id: null, 9 | level: null, 10 | message: null, 11 | operation: null, 12 | timestamp: null, 13 | userName: null, 14 | }); 15 | 16 | const DefaultReducerState = Record({ 17 | dateFrom: null, 18 | dateTo: null, 19 | entities: OrderedMap({}), 20 | isArchive: false, 21 | loaded: false, 22 | loading: false, 23 | }); 24 | 25 | export default (events = new DefaultReducerState(), action) => { 26 | const { type, payload } = action; 27 | 28 | switch (type) { 29 | case LOAD_ALL_EVENTS + START: 30 | return events.set("loading", true); 31 | 32 | case LOAD_ALL_EVENTS + SUCCESS: 33 | return events 34 | .update("entities", (entities) => arrayToMap(payload.events, EventModel).merge(entities)) 35 | .set("loading", false) 36 | .set("loaded", true) 37 | .set("dateFrom", payload.events && payload.events[0] ? payload.events[0].timestamp : null) 38 | .set("dateTo", payload.events && payload.events[payload.events.length - 1] ? payload.events[payload.events.length - 1].timestamp : null) 39 | .set("isArchive", payload.isArchive); 40 | 41 | case REMOVE_ALL_EVENTS: 42 | return events = new DefaultReducerState(); 43 | } 44 | 45 | return events; 46 | }; 47 | -------------------------------------------------------------------------------- /app/reducer/globalLocks.ts: -------------------------------------------------------------------------------- 1 | import { Record } from "immutable"; 2 | import { 3 | GLOBAL_LOCKS_NAVIGATION_LOCK, GLOBAL_LOCKS_NAVIGATION_UNLOCK, 4 | } from "../constants"; 5 | 6 | export const DefaultReducerState = Record({ 7 | lockNavigation: false, 8 | // isLockedForOperation: false, 9 | // currentOpration: "", 10 | }); 11 | 12 | export default (globalLocks = new DefaultReducerState(), action: any) => { 13 | const { type, payload } = action; 14 | switch (type) { 15 | case GLOBAL_LOCKS_NAVIGATION_LOCK: 16 | globalLocks = DefaultReducerState() 17 | .set("lockNavigation", true); 18 | break; 19 | 20 | case GLOBAL_LOCKS_NAVIGATION_UNLOCK: 21 | globalLocks = DefaultReducerState() 22 | .set("lockNavigation", false); 23 | break; 24 | 25 | default: 26 | break; 27 | } 28 | 29 | return globalLocks; 30 | }; 31 | -------------------------------------------------------------------------------- /app/reducer/index.ts: -------------------------------------------------------------------------------- 1 | import {routerReducer as router} from "react-router-redux"; 2 | import {combineReducers} from "redux"; 3 | import certificates from "./certificates"; 4 | import certificatesDSS from "./certificatesDSS"; 5 | import certrequests from "./certrequests"; 6 | import certtemplate from "./certtemplate"; 7 | import cloudCSP from "./cloudCSP"; 8 | import connections from "./connections"; 9 | import containers from "./containers"; 10 | import crls from "./crls"; 11 | import documents from "./documents"; 12 | import dssResponses from "./dssResponses"; 13 | import events from "./events"; 14 | import files from "./files"; 15 | import filters from "./filters"; 16 | import globalLocks from "./globalLocks"; 17 | import license from "./license"; 18 | import multiOperations from "./multiOperations"; 19 | import passwordDSS from "./passwordDSS"; 20 | import policyDSS from "./policyDSS"; 21 | import regrequests from "./regrequests"; 22 | import remoteFiles from "./remoteFiles"; 23 | import services from "./services"; 24 | import settings from "./settings"; 25 | import signatures from "./signatures"; 26 | import templates from "./templates"; 27 | import tokens from "./tokens"; 28 | import transactionDSS from "./transactionDSS"; 29 | import trustedId from "./trustedId"; 30 | import trustedServices from "./trustedServices"; 31 | import urlActions from "./urlActions"; 32 | import urlCmdCertificates from "./urlCmdCertificates"; 33 | import urlCmdCertInfo from "./urlCmdCertInfo"; 34 | import urlCmds from "./urlCmds"; 35 | import users from "./users"; 36 | 37 | export default combineReducers({ 38 | router, 39 | certificates, 40 | cloudCSP, 41 | connections, 42 | containers, 43 | crls, 44 | documents, 45 | dssResponses, 46 | certificatesDSS, 47 | passwordDSS, 48 | policyDSS, 49 | transactionDSS, 50 | events, 51 | files, 52 | filters, 53 | license, 54 | multiOperations, 55 | remoteFiles, 56 | certrequests, 57 | certtemplate, 58 | settings, 59 | regrequests, 60 | services, 61 | signatures, 62 | templates, 63 | tokens, 64 | trustedId, 65 | trustedServices, 66 | urlActions, 67 | users, 68 | urlCmdCertificates, 69 | urlCmds, 70 | globalLocks, 71 | urlCmdCertInfo, 72 | }); 73 | -------------------------------------------------------------------------------- /app/reducer/license.ts: -------------------------------------------------------------------------------- 1 | import { Record } from "immutable"; 2 | import { 3 | FAIL, LOAD_LICENSE, 4 | START, SUCCESS, VERIFY_LICENSE, 5 | } from "../constants"; 6 | 7 | const LicenseModel = Record({ 8 | aud: "-", 9 | exp: null, 10 | iat: null, 11 | iss: "-", 12 | jti: "-", 13 | sub: "-", 14 | }); 15 | 16 | const DefaultReducerState = Record({ 17 | data: null, 18 | info: new LicenseModel(), 19 | lic_error: null, 20 | lic_format: null, 21 | loaded: false, 22 | loading: false, 23 | status: false, 24 | verified: false, 25 | }); 26 | 27 | export default (license = new DefaultReducerState(), action) => { 28 | const { type, payload } = action; 29 | 30 | switch (type) { 31 | case LOAD_LICENSE + START: 32 | return license 33 | .set("loading", true) 34 | .set("loaded", false); 35 | 36 | case LOAD_LICENSE + SUCCESS: 37 | return license 38 | .set("info", new LicenseModel(payload.lic)) 39 | .set("data", payload.data) 40 | .set("loading", false) 41 | .set("loaded", true) 42 | .set("verified", true) 43 | .set("lic_format", payload.lic_format) 44 | .set("lic_error", payload.lic_error) 45 | .set("status", payload.licenseStatus); 46 | 47 | case LOAD_LICENSE + FAIL: 48 | return license 49 | .set("loading", false) 50 | .set("loaded", false) 51 | .set("status", false) 52 | .set("verified", true) 53 | .set("lic_error", payload.lic_error) 54 | .set("lic_format", payload.lic_format) 55 | .set("data", payload.data); 56 | 57 | case VERIFY_LICENSE: 58 | return license 59 | .set("status", payload.licenseStatus) 60 | .set("verified", true) 61 | .set("lic_format", payload.lic_format); 62 | } 63 | 64 | return license; 65 | }; 66 | -------------------------------------------------------------------------------- /app/reducer/passwordDSS.ts: -------------------------------------------------------------------------------- 1 | import { OrderedMap, Record } from "immutable"; 2 | import { DELETE_PASSWORD_DSS, REMEMBER_PASSWORD_DSS } from "../constants"; 3 | 4 | export const PasswordDSSModel = Record({ 5 | id: null, 6 | password: null, 7 | }); 8 | 9 | export const DefaultReducerState = Record({ 10 | entities: OrderedMap({}), 11 | }); 12 | 13 | export default (passwordDSS = new DefaultReducerState(), action) => { 14 | const { type, payload } = action; 15 | switch (type) { 16 | case REMEMBER_PASSWORD_DSS: 17 | passwordDSS = passwordDSS.setIn(["entities", payload.id], new PasswordDSSModel(payload)); 18 | break; 19 | 20 | case DELETE_PASSWORD_DSS: 21 | return passwordDSS.deleteIn(["entities", payload.id]); 22 | } 23 | 24 | return passwordDSS; 25 | }; 26 | -------------------------------------------------------------------------------- /app/reducer/policyDSS.ts: -------------------------------------------------------------------------------- 1 | import * as fs from "fs"; 2 | import { OrderedMap, Record } from "immutable"; 3 | import { GET_POLICY_DSS, POLICY_DSS_JSON, SUCCESS } from "../constants"; 4 | import { arrayToMap, mapToArr } from "../utils"; 5 | 6 | export const PolicyDSSModel = Record({ 7 | id: null, 8 | policy: null, 9 | }); 10 | 11 | export const DefaultReducerState = Record({ 12 | entities: OrderedMap({}), 13 | }); 14 | 15 | export default (policyDSS = new DefaultReducerState(), action) => { 16 | const { type, payload } = action; 17 | switch (type) { 18 | case GET_POLICY_DSS + SUCCESS: 19 | policyDSS = policyDSS 20 | .setIn(["entities", payload.id], new PolicyDSSModel(payload)); 21 | break; 22 | } 23 | 24 | return policyDSS; 25 | }; 26 | -------------------------------------------------------------------------------- /app/reducer/remoteFiles.ts: -------------------------------------------------------------------------------- 1 | import { OrderedMap, Record } from "immutable"; 2 | import { ADD_REMOTE_FILE, DOWNLOAD_REMOTE_FILE, REMOVE_ALL_REMOTE_FILES, SET_REMOTE_FILES_PARAMS, START, SUCCESS, UPLOAD_FILE, DOWNLOAD_REMOTE } from "../constants"; 3 | 4 | export interface IRemoteFile { 5 | extra: any; 6 | id: number; 7 | loaded: boolean; 8 | loading: boolean; 9 | name: string; 10 | totalSize: number; 11 | url: string; 12 | } 13 | 14 | const FileModel = Record({ 15 | extra: null, 16 | id: null, 17 | loaded: false, 18 | loading: false, 19 | name: null, 20 | totalSize: null, 21 | url: null, 22 | }); 23 | 24 | const DefaultReducerState = Record({ 25 | entities: OrderedMap({}), 26 | method: null, 27 | token: null, 28 | uploader: null, 29 | }); 30 | 31 | export default (files = new DefaultReducerState(), action) => { 32 | const { type, payload } = action; 33 | 34 | switch (type) { 35 | case ADD_REMOTE_FILE: 36 | return files.setIn(["entities", payload.id], new FileModel({ 37 | id: payload.id, 38 | ...payload.file, 39 | })); 40 | 41 | case SET_REMOTE_FILES_PARAMS: 42 | return files 43 | .set("method", payload.method) 44 | .set("token", payload.token) 45 | .set("uploader", payload.uploader); 46 | 47 | case DOWNLOAD_REMOTE_FILE + START: 48 | return files 49 | .setIn(["entities", payload.id, "totalSize"], payload.totalSize) 50 | .setIn(["entities", payload.id, "loading"], true); 51 | 52 | case DOWNLOAD_REMOTE_FILE + SUCCESS: 53 | return files 54 | .setIn(["entities", payload.id, "loading"], false) 55 | .setIn(["entities", payload.id, "loaded"], true); 56 | 57 | case REMOVE_ALL_REMOTE_FILES: 58 | return files = new DefaultReducerState(); 59 | } 60 | 61 | return files; 62 | }; 63 | -------------------------------------------------------------------------------- /app/reducer/templates.ts: -------------------------------------------------------------------------------- 1 | import { OrderedSet, Record } from "immutable"; 2 | 3 | export const TemplateModel = Record({ 4 | Description: null, 5 | Extensions: null, 6 | FriendlyName: null, 7 | MarkExportable: null, 8 | RDN: null, 9 | }); 10 | 11 | export const DefaultReducerState = Record({ 12 | entities: new OrderedSet([]), 13 | }); 14 | 15 | export default (templates = new DefaultReducerState(), action) => { 16 | return templates; 17 | }; 18 | -------------------------------------------------------------------------------- /app/reducer/tokens.ts: -------------------------------------------------------------------------------- 1 | import * as fs from "fs"; 2 | import { OrderedMap, Record } from "immutable"; 3 | import { DSS_TOKENS_JSON, POST_AUTHORIZATION_USER_DSS, SUCCESS, POST_OPERATION_CONFIRMATION } from "../constants"; 4 | import { mapToArr } from "../utils"; 5 | 6 | export const TokenDSSModel = Record({ 7 | access_token: null, 8 | expires_in: null, 9 | id: null, 10 | time: null, 11 | token_type: null, 12 | }); 13 | 14 | export const DefaultReducerState = Record({ 15 | tokensAuth: OrderedMap({}), 16 | tokensDss: OrderedMap({}), 17 | }); 18 | 19 | export default (tokens = new DefaultReducerState(), action) => { 20 | const { type, payload } = action; 21 | 22 | switch (type) { 23 | case POST_AUTHORIZATION_USER_DSS + SUCCESS: 24 | tokens = tokens.setIn(["tokensAuth", payload.id], new TokenDSSModel({ 25 | access_token: payload.access_token, 26 | expires_in: payload.expires_in, 27 | id: payload.id, 28 | time: new Date().getTime(), 29 | token_type: payload.token_type, 30 | })); 31 | break; 32 | case POST_OPERATION_CONFIRMATION + SUCCESS: 33 | tokens = tokens.setIn(["tokensDss", payload.id], new TokenDSSModel({ 34 | access_token: payload.access_token, 35 | expires_in: payload.expires_in, 36 | id: payload.id, 37 | time: new Date().getTime(), 38 | token_type: payload.token_type, 39 | })); 40 | break; 41 | } 42 | return tokens; 43 | }; 44 | -------------------------------------------------------------------------------- /app/reducer/transactionDSS.ts: -------------------------------------------------------------------------------- 1 | import * as fs from "fs"; 2 | import { OrderedMap, Record } from "immutable"; 3 | import { POST_TRANSACTION_DSS, START, SUCCESS } from "../constants"; 4 | 5 | export const TransactionDSSModel = Record({ 6 | fileId: null, 7 | id: null, 8 | }); 9 | 10 | export const DefaultReducerState = Record({ 11 | entities: OrderedMap({}), 12 | }); 13 | 14 | export default (transactionDSS = new DefaultReducerState(), action) => { 15 | const { type, payload } = action; 16 | switch (type) { 17 | case POST_TRANSACTION_DSS + SUCCESS: 18 | transactionDSS = transactionDSS 19 | .setIn(["entities", payload.id], new TransactionDSSModel(payload)); 20 | break; 21 | } 22 | return transactionDSS; 23 | }; 24 | -------------------------------------------------------------------------------- /app/reducer/trustedId.ts: -------------------------------------------------------------------------------- 1 | const initialState = { 2 | pending: false, 3 | products: [], 4 | error: null, 5 | }; 6 | 7 | export default (state = initialState, action) => { 8 | switch (action.type) { 9 | case "FETCH_APPLICATIONS_PENDING": 10 | return { 11 | ...state, 12 | pending: true, 13 | }; 14 | case "FETCH_APPLICATIONS_SUCCESS": 15 | return { 16 | ...state, 17 | pending: false, 18 | products: action.payload, 19 | }; 20 | case "FETCH_APPLICATIONS_ERROR": 21 | return { 22 | ...state, 23 | pending: false, 24 | error: action.error, 25 | }; 26 | default: 27 | return state; 28 | } 29 | }; 30 | 31 | export const getProducts = state => state.products; 32 | export const getProductsPending = state => state.pending; 33 | export const getProductsError = state => state.error; 34 | -------------------------------------------------------------------------------- /app/reducer/urlActions.ts: -------------------------------------------------------------------------------- 1 | import { OrderedMap, OrderedSet, Record } from "immutable"; 2 | import { 3 | FAIL, PACKAGE_SIGN, REMOVE_URL_ACTION, 4 | SIGN_DOCUMENTS_FROM_URL, START, SUCCESS, VERIFY_DOCUMENTS_FROM_URL, 5 | } from "../constants"; 6 | 7 | export const ActionModel = Record({ 8 | id: null, 9 | command: null, 10 | isDetachedSign: null, 11 | json: null, 12 | name: null, 13 | url: null, 14 | }); 15 | 16 | export const DefaultReducerState = Record({ 17 | action: null, 18 | performed: false, 19 | performing: false, 20 | }); 21 | 22 | export default (urlAction = new DefaultReducerState(), action) => { 23 | const { type, payload } = action; 24 | switch (type) { 25 | case SIGN_DOCUMENTS_FROM_URL + START: 26 | case VERIFY_DOCUMENTS_FROM_URL + START: 27 | return urlAction 28 | .set("performed", false) 29 | .set("performing", true); 30 | 31 | case SIGN_DOCUMENTS_FROM_URL + SUCCESS: 32 | case VERIFY_DOCUMENTS_FROM_URL + SUCCESS: 33 | urlAction = urlAction 34 | .set("performed", true) 35 | .set("performing", false) 36 | .set("action", new ActionModel(payload)); 37 | 38 | if (payload.json && payload.json.extra && payload.json.extra.signType == 1) { 39 | urlAction = urlAction.setIn(["action", "isDetachedSign"], true); 40 | } else { 41 | urlAction = urlAction.setIn(["action", "isDetachedSign"], false); 42 | } 43 | break; 44 | 45 | case SIGN_DOCUMENTS_FROM_URL + FAIL: 46 | case VERIFY_DOCUMENTS_FROM_URL + FAIL: 47 | return urlAction 48 | .set("performed", true) 49 | .set("performing", false); 50 | 51 | case PACKAGE_SIGN + SUCCESS: 52 | case PACKAGE_SIGN + FAIL: 53 | case REMOVE_URL_ACTION: 54 | urlAction = new DefaultReducerState(); 55 | } 56 | 57 | return urlAction; 58 | }; 59 | -------------------------------------------------------------------------------- /app/reducer/urlCmdCertInfo.ts: -------------------------------------------------------------------------------- 1 | import { Record } from "immutable"; 2 | import { 3 | FAIL, START, SUCCESS, URL_CMD_CERT_INFO, 4 | } from "../constants"; 5 | 6 | export interface IUrlCmdCertInfo { 7 | certToProcess: trusted.pki.Certificate; 8 | certToProcessPkiItemInfo: any; 9 | done: boolean; 10 | id: string; 11 | pkiItem: any; 12 | url: string; 13 | } 14 | 15 | export const DefaultReducerState = Record({ 16 | certToProcess: null, 17 | certToProcessPkiItemInfo: null, 18 | done: true, 19 | id: "", 20 | pkiItem: null, 21 | url: "", 22 | }); 23 | 24 | export default (urlCmdCertInfo = new DefaultReducerState(), action: any) => { 25 | const { type, payload } = action; 26 | switch (type) { 27 | case URL_CMD_CERT_INFO + START: 28 | if (!urlCmdCertInfo) { 29 | urlCmdCertInfo = DefaultReducerState(); 30 | } 31 | urlCmdCertInfo = DefaultReducerState() 32 | .set("done", false) 33 | .set("id", payload.id) 34 | .set("url", payload.url) 35 | .set("certToProcess", payload.certToProcess) 36 | .set("certToProcessPkiItemInfo", payload.certToProcessPkiItemInfo); 37 | break; 38 | 39 | case URL_CMD_CERT_INFO + SUCCESS: 40 | case URL_CMD_CERT_INFO + FAIL: 41 | urlCmdCertInfo = DefaultReducerState(); 42 | break; 43 | 44 | default: 45 | break; 46 | } 47 | 48 | return urlCmdCertInfo; 49 | }; 50 | -------------------------------------------------------------------------------- /app/reducer/urlCmds.ts: -------------------------------------------------------------------------------- 1 | import { 2 | FAIL, START, SUCCESS, URL_CMD, 3 | } from "../constants"; 4 | 5 | const defaultCmd = { 6 | command: "", 7 | id: "", 8 | url: "", 9 | }; 10 | 11 | export default (urlCmds = defaultCmd, action: any) => { 12 | const { type, payload } = action; 13 | 14 | switch (type) { 15 | case URL_CMD + START: 16 | return { 17 | ...urlCmds, 18 | ...payload.urlCommand, 19 | }; 20 | 21 | case URL_CMD + SUCCESS: 22 | case URL_CMD + FAIL: 23 | return { 24 | command: "", 25 | id: "", 26 | url: "", 27 | }; 28 | } 29 | 30 | return urlCmds; 31 | }; 32 | -------------------------------------------------------------------------------- /app/reducer/users.ts: -------------------------------------------------------------------------------- 1 | import * as fs from "fs"; 2 | import { OrderedMap, Record } from "immutable"; 3 | import { CREATE_TEMP_USER_DSS, DSS_USERS_JSON, POST_AUTHORIZATION_USER_DSS, START, SUCCESS } from "../constants"; 4 | import { mapToArr } from "../utils"; 5 | 6 | export const UsersDSSModel = Record({ 7 | authUrl: null, 8 | dssUrl: null, 9 | id: null, 10 | login: null, 11 | confApiVersion: null, 12 | }); 13 | 14 | export const DefaultReducerState = Record({ 15 | entities: OrderedMap({}), 16 | temp: OrderedMap({}), 17 | }); 18 | 19 | export default (users = new DefaultReducerState(), action) => { 20 | const { type, payload } = action; 21 | 22 | switch (type) { 23 | case CREATE_TEMP_USER_DSS + START: 24 | users = users.setIn(["temp", payload.id], new UsersDSSModel({ 25 | authUrl: payload.authUrl, 26 | dssUrl: payload.dssUrl, 27 | id: payload.id, 28 | login: payload.login, 29 | confApiVersion: payload.confApiVersion, 30 | })); 31 | break; 32 | case POST_AUTHORIZATION_USER_DSS + SUCCESS: 33 | users = users.setIn(["entities", payload.id], users.getIn(["temp", payload.id])); 34 | break; 35 | } 36 | 37 | if (type === POST_AUTHORIZATION_USER_DSS + SUCCESS) { 38 | const state = { 39 | users: mapToArr(users.entities), 40 | }; 41 | 42 | const sstate = JSON.stringify(state, null, 4); 43 | 44 | if (DSS_USERS_JSON) { 45 | fs.writeFile(DSS_USERS_JSON, sstate, (err: any) => { 46 | if (err) { 47 | // tslint:disable-next-line:no-console 48 | console.log("------- error write to ", DSS_USERS_JSON); 49 | } 50 | }); 51 | } 52 | } 53 | 54 | return users; 55 | }; 56 | -------------------------------------------------------------------------------- /app/resources/cryptoarm-gost.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/cryptoarm-gost.icns -------------------------------------------------------------------------------- /app/resources/cryptoarm-gost.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/cryptoarm-gost.ico -------------------------------------------------------------------------------- /app/resources/cryptoarm-gost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/cryptoarm-gost.png -------------------------------------------------------------------------------- /app/resources/cryptoarm-gost_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/cryptoarm-gost_1024.png -------------------------------------------------------------------------------- /app/resources/fonts/material-design-icons/MaterialIcons-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/material-design-icons/MaterialIcons-Regular.eot -------------------------------------------------------------------------------- /app/resources/fonts/material-design-icons/MaterialIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/material-design-icons/MaterialIcons-Regular.ttf -------------------------------------------------------------------------------- /app/resources/fonts/material-design-icons/MaterialIcons-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/material-design-icons/MaterialIcons-Regular.woff -------------------------------------------------------------------------------- /app/resources/fonts/material-design-icons/MaterialIcons-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/material-design-icons/MaterialIcons-Regular.woff2 -------------------------------------------------------------------------------- /app/resources/fonts/material-design-icons/README.md: -------------------------------------------------------------------------------- 1 | The recommended way to use the Material Icons font is by linking to the web font hosted on Google Fonts: 2 | 3 | ```html 4 | 6 | ``` 7 | 8 | Read more in our full usage guide: 9 | http://google.github.io/material-design-icons/#icon-font-for-the-web 10 | -------------------------------------------------------------------------------- /app/resources/fonts/material-design-icons/material-icons.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Material Icons'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: url(MaterialIcons-Regular.eot); /* For IE6-8 */ 6 | src: local('Material Icons'), 7 | local('MaterialIcons-Regular'), 8 | url(MaterialIcons-Regular.woff2) format('woff2'), 9 | url(MaterialIcons-Regular.woff) format('woff'), 10 | url(MaterialIcons-Regular.ttf) format('truetype'); 11 | } 12 | 13 | .material-icons { 14 | font-family: 'Material Icons'; 15 | font-weight: normal; 16 | font-style: normal; 17 | font-size: 24px; /* Preferred icon size */ 18 | display: inline-block; 19 | line-height: 1; 20 | text-transform: none; 21 | letter-spacing: normal; 22 | word-wrap: normal; 23 | white-space: nowrap; 24 | direction: ltr; 25 | 26 | /* Support for all WebKit browsers. */ 27 | -webkit-font-smoothing: antialiased; 28 | /* Support for Safari and Chrome. */ 29 | text-rendering: optimizeLegibility; 30 | 31 | /* Support for Firefox. */ 32 | -moz-osx-font-smoothing: grayscale; 33 | 34 | /* Support for IE. */ 35 | font-feature-settings: 'liga'; 36 | } 37 | -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Bold.eot -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Bold.ttf -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Bold.woff -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Bold.woff2 -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Light.eot -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Light.ttf -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Light.woff -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Light.woff2 -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Medium.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Medium.eot -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Medium.ttf -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Medium.woff -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Medium.woff2 -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Regular.eot -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Regular.ttf -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Regular.woff -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Regular.woff2 -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Thin.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Thin.eot -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Thin.ttf -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Thin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Thin.woff -------------------------------------------------------------------------------- /app/resources/fonts/roboto/Roboto-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/fonts/roboto/Roboto-Thin.woff2 -------------------------------------------------------------------------------- /app/resources/image/back_button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /app/resources/image/ca/export_request.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 18 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/resources/image/ca/service_ca.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 12 | 13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/resources/image/ca/service_status_error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 11 | 16 | 17 | 18 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/resources/image/ca/service_status_ok.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | 13 | 14 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/resources/image/ca/service_status_unknown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 11 | 12 | 14 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/resources/image/cancel_button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/resources/image/cert_status_error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 16 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/resources/image/cert_status_ok.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 16 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/resources/image/cert_stores/token.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/resources/image/chain/chain_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/chain/chain_1.png -------------------------------------------------------------------------------- /app/resources/image/chain/chain_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/chain/chain_10.png -------------------------------------------------------------------------------- /app/resources/image/chain/chain_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/chain/chain_2.png -------------------------------------------------------------------------------- /app/resources/image/chain/chain_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/chain/chain_3.png -------------------------------------------------------------------------------- /app/resources/image/chain/chain_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/chain/chain_4.png -------------------------------------------------------------------------------- /app/resources/image/chain/chain_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/chain/chain_5.png -------------------------------------------------------------------------------- /app/resources/image/chain/chain_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/chain/chain_6.png -------------------------------------------------------------------------------- /app/resources/image/chain/chain_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/chain/chain_7.png -------------------------------------------------------------------------------- /app/resources/image/chain/chain_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/chain/chain_8.png -------------------------------------------------------------------------------- /app/resources/image/chain/chain_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/chain/chain_9.png -------------------------------------------------------------------------------- /app/resources/image/cryptoarm-gost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/cryptoarm-gost.png -------------------------------------------------------------------------------- /app/resources/image/cryptoarm-gost.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 13 | 15 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/resources/image/docmenu_arhiver.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 17 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/resources/image/docmenu_decrypt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/resources/image/docmenu_encrypt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/resources/image/docmenu_remove.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 14 | 16 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/resources/image/dss/dss_key.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 12 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/resources/image/files/file_avi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_avi.png -------------------------------------------------------------------------------- /app/resources/image/files/file_csr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_csr.png -------------------------------------------------------------------------------- /app/resources/image/files/file_doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_doc.png -------------------------------------------------------------------------------- /app/resources/image/files/file_docx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_docx.png -------------------------------------------------------------------------------- /app/resources/image/files/file_enc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_enc.png -------------------------------------------------------------------------------- /app/resources/image/files/file_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_file.png -------------------------------------------------------------------------------- /app/resources/image/files/file_jpg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_jpg.png -------------------------------------------------------------------------------- /app/resources/image/files/file_pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_pdf.png -------------------------------------------------------------------------------- /app/resources/image/files/file_pfx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_pfx.png -------------------------------------------------------------------------------- /app/resources/image/files/file_ppt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_ppt.png -------------------------------------------------------------------------------- /app/resources/image/files/file_sig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_sig.png -------------------------------------------------------------------------------- /app/resources/image/files/file_sig_any.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_sig_any.png -------------------------------------------------------------------------------- /app/resources/image/files/file_sig_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_sig_error.png -------------------------------------------------------------------------------- /app/resources/image/files/file_sig_ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_sig_ok.png -------------------------------------------------------------------------------- /app/resources/image/files/file_txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_txt.png -------------------------------------------------------------------------------- /app/resources/image/files/file_unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_unknown.png -------------------------------------------------------------------------------- /app/resources/image/files/file_xls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_xls.png -------------------------------------------------------------------------------- /app/resources/image/files/file_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/files/file_zip.png -------------------------------------------------------------------------------- /app/resources/image/folder_shoose_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/resources/image/geo_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/geo_gray.png -------------------------------------------------------------------------------- /app/resources/image/icon_filter_off.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/resources/image/icon_filter_on.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 11 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/resources/image/key.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 13 | 14 | -------------------------------------------------------------------------------- /app/resources/image/key_container_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/key_container_icon.png -------------------------------------------------------------------------------- /app/resources/image/logo_trusted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/logo_trusted.png -------------------------------------------------------------------------------- /app/resources/image/logo_trusted.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 11 | 16 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/resources/image/mail_contact_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/mail_contact_icon.png -------------------------------------------------------------------------------- /app/resources/image/ok_button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/resources/image/operation_status_error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/resources/image/operation_status_success.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/resources/image/preloader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/preloader.png -------------------------------------------------------------------------------- /app/resources/image/return-button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /app/resources/image/service_category_cert.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 16 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/resources/image/service_category_connect.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 12 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/resources/image/sidemenu/add_folder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 14 | 15 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/resources/image/sidemenu/help.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/resources/image/sidemenu/license.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/resources/image/status_cert_fail_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/resources/image/status_cert_ok_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/resources/image/tray.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/tray.ico -------------------------------------------------------------------------------- /app/resources/image/tray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/tray.png -------------------------------------------------------------------------------- /app/resources/image/tray_mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/tray_mac.png -------------------------------------------------------------------------------- /app/resources/image/tray_nix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/app/resources/image/tray_nix.png -------------------------------------------------------------------------------- /app/resources/image/warning.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/resources/js/jquery.visible.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | 3 | /** 4 | * Copyright 2012, Digital Fusion 5 | * Licensed under the MIT license. 6 | * http://teamdf.com/jquery-plugins/license/ 7 | * 8 | * @author Sam Sehnert 9 | * @desc A small plugin that checks whether elements are within 10 | * the user visible viewport of a web browser. 11 | * only accounts for vertical position, not horizontal. 12 | */ 13 | $.fn.visible = function(partial,hidden){ 14 | 15 | var $t = $(this).eq(0), 16 | t = $t.get(0), 17 | $w = $(window), 18 | viewTop = $w.scrollTop(), 19 | viewBottom = viewTop + $w.height(), 20 | _top = $t.offset().top, 21 | _bottom = _top + $t.height(), 22 | compareTop = partial === true ? _bottom : _top, 23 | compareBottom = partial === true ? _top : _bottom, 24 | clientSize = hidden === true ? t.offsetWidth * t.offsetHeight : true; 25 | 26 | return !!clientSize && ((compareBottom <= viewBottom) && (compareTop >= viewTop)); 27 | }; 28 | 29 | })(jQuery); -------------------------------------------------------------------------------- /app/resources/js/jquery.visible.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery visible 1.0.0 teamdf.com/jquery-plugins | teamdf.com/jquery-plugins/license */ 2 | (function(d){d.fn.visible=function(e,i){var a=d(this).eq(0),f=a.get(0),c=d(window),g=c.scrollTop();c=g+c.height();var b=a.offset().top,h=b+a.height();a=e===true?h:b;b=e===true?b:h;return!!(i===true?f.offsetWidth*f.offsetHeight:true)&&b<=c&&a>=g}})(jQuery); 3 | -------------------------------------------------------------------------------- /app/resources/preloader_index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CryptoARM GOST 7 | 8 | 9 | 10 | 11 | 12 |
    13 | 14 |
    15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/resources/ssl/addCA.linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #Add directory for license 3 | #mkdir "/etc/opt/Trusted" 4 | mkdir -p "/etc/opt/Trusted/CryptoARM GOST" 5 | chmod 777 "/etc/opt/Trusted/CryptoARM GOST" 6 | -------------------------------------------------------------------------------- /app/resources/ssl/addCA.osx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #Add directory for license 3 | #mkdir "/etc/opt/Trusted" 4 | mkdir -p "/etc/opt/Trusted/CryptoARM GOST" 5 | chmod 777 "/etc/opt/Trusted/CryptoARM GOST" 6 | -------------------------------------------------------------------------------- /app/resources/ssl/addCA.win.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if not exist "%UserProfile%\AppData\Local\Trusted\CryptoARM GOST" mkdir "%UserProfile%\AppData\Local\Trusted\CryptoARM GOST" 4 | 5 | 6 | REM #### eof 7 | exit /B 0 8 | -------------------------------------------------------------------------------- /app/selectors/crlsSelectors.ts: -------------------------------------------------------------------------------- 1 | import { createSelector } from "reselect"; 2 | 3 | export const crlsGetter = (state: any) => state.crls.entities; 4 | export const filtersGetter = (state: any) => state.filters; 5 | 6 | export const filteredCrlsSelector = createSelector(crlsGetter, filtersGetter, (crls, filters) => { 7 | const { searchValue } = filters; 8 | const search = searchValue.toLowerCase(); 9 | const arrCrls = crls; 10 | 11 | return arrCrls.filter((crl: any) => { 12 | try { 13 | return ( 14 | crl.hash.toLowerCase().match(search) || 15 | crl.issuerFriendlyName.toLowerCase().match(search) || 16 | crl.lastUpdate.toLowerCase().match(search) || 17 | crl.nextUpdate.toLowerCase().match(search) || 18 | crl.signatureAlgorithm.toLowerCase().match(search) 19 | ); 20 | } catch (e) { 21 | return true; 22 | } 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /app/selectors/documentsSelector.ts: -------------------------------------------------------------------------------- 1 | import { notEqual } from "assert"; 2 | import { createSelector } from "reselect"; 3 | import { 4 | ALL, ENCRYPTED, SIGNED, ARCHIVED, 5 | } from "../constants"; 6 | 7 | export const documentsGetter = (state) => state.documents.entities; 8 | export const filtersGetter = (state) => state.filters; 9 | 10 | export const filteredDocumentsSelector = createSelector(documentsGetter, filtersGetter, (documents, filters) => { 11 | const { dateFrom, dateTo, filename, sizeFrom, sizeTo, types } = filters.documents; 12 | 13 | return documents.filter((document: any) => { 14 | return document.fullpath.toLowerCase().match(filename.toLowerCase()) && 15 | (sizeFrom ? document.filesize >= sizeFrom : true) && 16 | (sizeTo ? document.filesize <= sizeTo : true) && 17 | (dateFrom ? (new Date(document.mtime)).getTime() >= (new Date(dateFrom)).getTime() : true) && 18 | (dateTo ? (new Date(document.mtime)).getTime() <= (new Date(dateTo.setHours(23, 59, 59, 999))).getTime() : true) && 19 | ( 20 | types[ENCRYPTED] && document.extension === "enc" || 21 | types[SIGNED] && document.extension === "sig" || 22 | types[ARCHIVED] && document.extension === "zip" || 23 | ( 24 | !types[ENCRYPTED] && !types[SIGNED] && !types[ARCHIVED] 25 | ) 26 | ); 27 | }); 28 | }); 29 | 30 | export const stateSelector = (state: any) => state.documents; 31 | export const entitiesSelector = createSelector(stateSelector, (state) => state.entities); 32 | export const selectionSelector = createSelector(stateSelector, (state) => state.selected.toArray()); 33 | export const selectedDocumentsSelector = createSelector(entitiesSelector, selectionSelector, (entities, selection) => 34 | selection.map((uid: any) => entities.get(uid)), 35 | ); 36 | export const selectedFiltredDocumentsSelector = createSelector( 37 | filteredDocumentsSelector, selectionSelector, (filter, selection) => 38 | filter.filter((entries: any) => { 39 | return selection.some((selectionFilter: any) => { 40 | return entries.id === selectionFilter; 41 | }); 42 | })); 43 | -------------------------------------------------------------------------------- /app/selectors/operationsResultsSelector.ts: -------------------------------------------------------------------------------- 1 | import { createSelector } from "reselect"; 2 | import { 3 | ALL, ARCHIVED, ENCRYPTED, SIGNED, 4 | } from "../constants"; 5 | 6 | export const documentsGetter = (state) => state.multiOperations.entities; 7 | export const filtersGetter = (state) => state.filters; 8 | 9 | export const filteredOperationsResultsSelector = createSelector(documentsGetter, filtersGetter, (documents, filters) => { 10 | const { dateFrom, dateTo, filename, sizeFrom, sizeTo, types } = filters.documents; 11 | 12 | return documents.filter((document: any) => { 13 | return document.fullpath.toLowerCase().match(filename.toLowerCase()) && 14 | (sizeFrom ? document.filesize >= sizeFrom : true) && 15 | (sizeTo ? document.filesize <= sizeTo : true) && 16 | (dateFrom ? (new Date(document.mtime)).getTime() >= (new Date(dateFrom)).getTime() : true) && 17 | (dateTo ? (new Date(document.mtime)).getTime() <= (new Date(dateTo.setHours(23, 59, 59, 999))).getTime() : true) && 18 | ( 19 | types[ENCRYPTED] && document.extension === "enc" || 20 | types[SIGNED] && document.extension === "sig" || 21 | types[ARCHIVED] && document.extension === "zip" || 22 | ( 23 | !types[ENCRYPTED] && !types[SIGNED] && !types[ARCHIVED] 24 | ) 25 | ); 26 | }); 27 | }); 28 | 29 | export const stateSelector = (state: any) => state.multiOperations; 30 | export const entitiesSelector = createSelector(stateSelector, (state) => state.entities); 31 | export const selectionSelector = createSelector(stateSelector, (state) => state.selected.toArray()); 32 | export const selectedOperationsResultsSelector = createSelector(entitiesSelector, selectionSelector, (entities, selection) => 33 | selection.map((uid: any) => entities.get(uid)), 34 | ); 35 | 36 | export const originalSelector = createSelector(stateSelector, (state) => state.files.map((file: any) => file.original)); 37 | 38 | export const selectedFiltredResultsSelector = createSelector( 39 | filteredOperationsResultsSelector, selectionSelector, (filter, selection) => 40 | filter.filter((entries: any) => { 41 | return selection.some((selectionFilter: any) => { 42 | return entries.id === selectionFilter; 43 | }); 44 | })); 45 | -------------------------------------------------------------------------------- /app/selectors/requestCASelector.ts: -------------------------------------------------------------------------------- 1 | import { createSelector } from "reselect"; 2 | import { mapToArr } from "../utils"; 3 | 4 | export const requestsGetter = (state: any) => state.certrequests.entities; 5 | export const filtersGetter = (state: any) => state.filters; 6 | 7 | export const filteredRequestCASelector = createSelector(requestsGetter, filtersGetter, (requests, filters) => { 8 | const { searchValue } = filters; 9 | const search = searchValue.toLowerCase(); 10 | const arrRequests = mapToArr(requests); 11 | 12 | return arrRequests.filter((request: any) => { 13 | try { 14 | return ( 15 | request.status.toLowerCase().match(search) || 16 | request.certRequestId.toLowerCase().match(search) 17 | ); 18 | } catch (e) { 19 | return true; 20 | } 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /app/selectors/servicesSelectors.ts: -------------------------------------------------------------------------------- 1 | import { createSelector } from "reselect"; 2 | import { CA_SERVICE } from "../constants"; 3 | 4 | export const servicesGetter = (state: any) => state.services.entities; 5 | export const filtersGetter = (state: any) => state.filters; 6 | export const typeGetter = (state, props) => props.type; 7 | 8 | export const filteredServicesSelector = createSelector(servicesGetter, filtersGetter, (services, filters) => { 9 | const { searchValue } = filters; 10 | const search = searchValue.toLowerCase(); 11 | 12 | return services.filter((service: any) => { 13 | try { 14 | return ( 15 | service.type === CA_SERVICE && ( 16 | service.name.toLowerCase().match(search) || 17 | (service.settings && service.settings.url ? service.settings.url.toLowerCase().match(search) : false) 18 | ) 19 | ); 20 | } catch (e) { 21 | return true; 22 | } 23 | }); 24 | }); 25 | 26 | export const filteredServicesByType = createSelector(servicesGetter, typeGetter, (services, type) => { 27 | return services.filter((service: any) => { 28 | try { 29 | return service.type === type; 30 | } catch (e) { 31 | return true; 32 | } 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /app/selectors/trustedServicesSelector.ts: -------------------------------------------------------------------------------- 1 | import { Map} from "immutable"; 2 | import { createSelector } from "reselect"; 3 | 4 | export const trustedServicesGetter = (state: any) => state.trustedServices.entities; 5 | export const filtersGetter = (state: any) => state.filters; 6 | 7 | export const filteredTrustedServicesSelector = createSelector(trustedServicesGetter, filtersGetter, (trustedServices, filters) => { 8 | const { searchValue } = filters; 9 | const search = searchValue.toLowerCase(); 10 | 11 | const filtered = trustedServices.filter((service: any) => { 12 | try { 13 | return ( 14 | service.url.toLowerCase().match(search) || 15 | service.cert.notAfter.toString().toLowerCase().match(search) || 16 | service.cert.issuerFriendlyName.toLowerCase().match(search) || 17 | service.cert.subjectFriendlyName.toLowerCase().match(search) 18 | ); 19 | } catch (e) { 20 | return true; 21 | } 22 | }); 23 | 24 | const normalized = {}; 25 | 26 | filtered.map((item) => { 27 | let cert; 28 | 29 | // Если сервис добавили в список и сразу идем в просмотр, то сертификат это immutable объект и надо преобразовать в Object 30 | // После открытия прораммы сертификат хранится уже в виде объекта. 31 | try { 32 | cert = item.cert.toJS(); 33 | } catch (e) { 34 | cert = item.cert; 35 | } 36 | 37 | normalized[item.url] = {...cert, url: item.url}; 38 | }); 39 | 40 | return new Map(normalized); 41 | }); 42 | -------------------------------------------------------------------------------- /app/server/constants.ts: -------------------------------------------------------------------------------- 1 | export const CONNECTION = "connection"; 2 | export const CONNECT = "connect"; 3 | export const DISCONNECT = "disconnect"; 4 | 5 | export const SIGN = "sign"; 6 | export const VERIFY = "verify"; 7 | export const ENCRYPT = "encrypt"; 8 | export const DECRYPT = "decrypt"; 9 | 10 | export const SIGNED = "signed"; 11 | export const VERIFIED = "verified"; 12 | export const ENCRYPTED = "encrypted"; 13 | export const DECRYPTED = "decrypted"; 14 | 15 | export const UPLOADED = "uploaded"; 16 | 17 | export const CANCELLED = "cancelled"; 18 | export const UNAVAILABLE = "unavailable"; 19 | export const ERROR = "error"; 20 | -------------------------------------------------------------------------------- /app/store/configureStore.development.ts: -------------------------------------------------------------------------------- 1 | import { routerMiddleware } from "react-router-redux"; 2 | import { applyMiddleware, compose, createStore } from "redux"; 3 | import { createLogger } from "redux-logger"; 4 | import thunk from "redux-thunk"; 5 | import history from "../history"; 6 | import randomId from "../middlewares/randomId"; 7 | import reducer from "../reducer/index"; 8 | import preloadedState from "./preloadedState"; 9 | 10 | const router = routerMiddleware(history); 11 | 12 | const composeEnhancers = 13 | typeof window === "object" && 14 | window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? 15 | window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ 16 | // Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize... 17 | }) : compose 18 | 19 | const logger = createLogger({ 20 | level: "info", 21 | collapsed: true, 22 | }); 23 | 24 | const enhancer = composeEnhancers( 25 | applyMiddleware(logger, thunk, router, randomId), 26 | ); 27 | 28 | const store = createStore(reducer, preloadedState, enhancer); 29 | 30 | if (module.hot) { 31 | module.hot.accept("../reducer", () => 32 | store.replaceReducer(require("../reducer")), // eslint-disable-line global-require 33 | ); 34 | } 35 | 36 | export default store; 37 | -------------------------------------------------------------------------------- /app/store/configureStore.production.ts: -------------------------------------------------------------------------------- 1 | import { routerMiddleware } from "react-router-redux"; 2 | import { applyMiddleware, createStore } from "redux"; 3 | import thunk from "redux-thunk"; 4 | import history from "../history"; 5 | import randomId from "../middlewares/randomId"; 6 | import reducer from "../reducer/index"; 7 | import preloadedState from "./preloadedState"; 8 | 9 | const router = routerMiddleware(history); 10 | const enhancer = applyMiddleware(thunk, router, randomId); 11 | 12 | const store = createStore(reducer, preloadedState, enhancer); 13 | 14 | export default store; 15 | -------------------------------------------------------------------------------- /app/store/index.ts: -------------------------------------------------------------------------------- 1 | import developmentConfigureStore from "./configureStore.development"; 2 | import productionConfigureStore from "./configureStore.production"; 3 | 4 | export default ( 5 | process.env.NODE_ENV === "production" 6 | ? productionConfigureStore 7 | : developmentConfigureStore 8 | ); 9 | -------------------------------------------------------------------------------- /app/table.global.css: -------------------------------------------------------------------------------- 1 | .Table { 2 | width: 100%; 3 | margin-top: 15px; 4 | } 5 | .headerRow { 6 | border-bottom: 1px solid lightgrey; 7 | font-size: 1rem; 8 | } 9 | .evenRow, 10 | .oddRow { 11 | border-bottom: 1px solid lightgrey; 12 | font-size: 0.9rem; 13 | } 14 | .oddRow { 15 | background-color: #fafafa; 16 | } 17 | .foundAndSelectedEvent { 18 | background-color: #ebeae6; 19 | } 20 | .foundEvent { 21 | background-color: PapayaWhip; 22 | } 23 | .selectedRow { 24 | background-color: #CEE2FF; 25 | } 26 | .lastSelectedRow { 27 | border: 1px solid #334294; 28 | } 29 | .hoverRow { 30 | box-shadow: inset 0 -1px 0 0 grey; 31 | } 32 | .headerColumn { 33 | text-transform: none; 34 | } 35 | .exampleColumn { 36 | white-space: nowrap; 37 | overflow: hidden; 38 | text-overflow: ellipsis; 39 | } 40 | 41 | .checkboxLabel { 42 | margin-left: .5rem; 43 | } 44 | .checkboxLabel:first-of-type { 45 | margin-left: 0; 46 | } 47 | 48 | .noRows { 49 | position: absolute; 50 | top: 0; 51 | bottom: 0; 52 | left: 0; 53 | right: 0; 54 | display: flex; 55 | align-items: center; 56 | justify-content: center; 57 | font-size: 1em; 58 | color: #bdbdbd; 59 | } 60 | 61 | .navigationToolbar { 62 | bottom: 20px !important; 63 | right: 460px; 64 | position: fixed !important; 65 | padding: 10px !important; 66 | background-color: rgba(255,255,255,0.8) !important; 67 | z-index: 1000 !important; 68 | } 69 | 70 | .ReactVirtualized__Grid, .ReactVirtualized__Masonry, .ReactVirtualized__Table__headerColumn, .ReactVirtualized__Table__row { 71 | outline: none; 72 | } 73 | .diag_table_resolve .diag_table_resolve_tr .diag_table_resolve_td { 74 | border: 1px solid lightgrey; 75 | height: 40%; 76 | width: 85%; 77 | cursor: pointer; 78 | padding: 3px; 79 | margin-left: 30px; 80 | } -------------------------------------------------------------------------------- /app/trusted/jwt.ts: -------------------------------------------------------------------------------- 1 | import { LicenseManager } from "../constants"; 2 | 3 | const CTLICENSE_R_NO_ERROR: number = 900; 4 | const CTLICENSE_R_ERROR_INTERNAL: number = 901; 5 | const CTLICENSE_R_ERROR_LOAD_LICENSE: number = 902; 6 | const CTLICENSE_R_ERROR_TOKEN_FORMAT: number = 903; 7 | const CTLICENSE_R_ERROR_SIGN: number = 904; 8 | const CTLICENSE_R_ERROR_PARSING: number = 905; 9 | const CTLICENSE_R_ERROR_STUCTURE: number = 906; 10 | const CTLICENSE_R_ERROR_PRODUCT: number = 907; 11 | const CTLICENSE_R_ERROR_EXPIRED_TIME: number = 908; 12 | const CTLICENSE_R_ERROR_NOT_STARTED: number = 909; 13 | const CTLICENSE_R_ERROR_OPERATION_BLOCK: number = 910; 14 | const CTLICENSE_R_ERROR_NO_LICENSE_IN_STORE: number = 911; 15 | const CTLICENSE_R_ERROR_STORE_IS_LOCKED: number = 912; 16 | 17 | export function checkLicense(key?: string): boolean { 18 | try { 19 | const res = key ? JSON.parse(LicenseManager.checkLicense(key)).verify : LicenseManager.accessOperations(); 20 | return res; 21 | } catch (err) { 22 | return false; 23 | } 24 | } 25 | 26 | export function getErrorMessage(errCode: number): string { 27 | switch (errCode) { 28 | case CTLICENSE_R_ERROR_INTERNAL: 29 | return "License.jwtErrorInternal"; 30 | case CTLICENSE_R_ERROR_LOAD_LICENSE: 31 | return "License.jwtErrorLoad"; 32 | case CTLICENSE_R_ERROR_TOKEN_FORMAT: 33 | return "License.jwtErrorTokenFormat"; 34 | case CTLICENSE_R_ERROR_SIGN: 35 | return "License.jwtErrorSign"; 36 | case CTLICENSE_R_ERROR_PARSING: 37 | return "License.jwtErrorParsing"; 38 | case CTLICENSE_R_ERROR_STUCTURE: 39 | return "License.jwtErrorStructure"; 40 | case CTLICENSE_R_ERROR_PRODUCT: 41 | return "License.jwtErrorProduct"; 42 | case CTLICENSE_R_ERROR_EXPIRED_TIME: 43 | return "License.jwtErrorExpired"; 44 | case CTLICENSE_R_ERROR_NOT_STARTED: 45 | return "License.jwtErrorStarted"; 46 | case CTLICENSE_R_ERROR_OPERATION_BLOCK: 47 | return "License.jwtErrorOperation"; 48 | case CTLICENSE_R_ERROR_NO_LICENSE_IN_STORE: 49 | return "License.jwtErrorNoLicenseInStore"; 50 | case CTLICENSE_R_ERROR_STORE_IS_LOCKED: 51 | return "License.jwtErrorStoreIsLocked"; 52 | default: 53 | return "License.jwtErrorCode"; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/winstonLogger.ts: -------------------------------------------------------------------------------- 1 | import * as winston from "winston"; 2 | import { APP_LOG_FILE } from "./constants"; 3 | 4 | const logger = winston.createLogger({ 5 | format: winston.format.combine( 6 | winston.format.timestamp(), 7 | winston.format.json(), 8 | ), 9 | level: "debug", 10 | transports: [ 11 | new winston.transports.File({ 12 | filename: APP_LOG_FILE, 13 | maxsize: 16 * 4096, 14 | }), 15 | ], 16 | }); 17 | 18 | if (process.env.NODE_ENV !== "production") { 19 | logger.add(new winston.transports.Console({ 20 | format: winston.format.simple(), 21 | })); 22 | } 23 | 24 | export default logger; 25 | -------------------------------------------------------------------------------- /build/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/build/icon.icns -------------------------------------------------------------------------------- /build/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/build/icon.ico -------------------------------------------------------------------------------- /demo/cryptoarm-api/README.md: -------------------------------------------------------------------------------- 1 | # КриптоАРМ ГОСТ - API 2 | # Оглавление 3 | * [Работа с готовым примером](#demo-app) 4 | * [Сборка](#build-demo-app) 5 | * [Использование](#run-demo-app) 6 | * [Обратная связь](#support) 7 | 8 | # Работа с готовым примером 9 | ## Сборка 10 | ``` 11 | $ npm install 12 | $ node server 13 | ``` 14 | 15 | # Обратная связь 16 | Если у вас есть вопросы по технической поддержке, то напишите нам на support@trusted.ru или откройте обращение на странице [GitHub Issues](https://github.com/TrustedRu/CryptoARMGOST/issues) -------------------------------------------------------------------------------- /demo/cryptoarm-api/form.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
    5 | 6 | 7 |
    8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cryptoarm-api", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "dependencies": { 7 | "@babel/plugin-transform-modules-commonjs": "^7.10.1", 8 | "custom-protocol-check": "^1.1.0", 9 | "express": "^4.17.1", 10 | "express-fileupload": "^1.1.6", 11 | "morgan": "^1.9.1" 12 | }, 13 | "devDependencies": {}, 14 | "author": "", 15 | "license": "ISC" 16 | } 17 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/pki/cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIF1jCCA74CCQD0zbGODQtymzANBgkqhkiG9w0BAQsFADCBrDELMAkGA1UEBhMC 3 | VVMxFDASBgNVBAgMC1JhbmRvbVN0YXRlMRMwEQYDVQQHDApSYW5kb21DaXR5MRsw 4 | GQYDVQQKDBJSYW5kb21Pcmdhbml6YXRpb24xHzAdBgNVBAsMFlJhbmRvbU9yZ2Fu 5 | aXphdGlvblVuaXQxIDAeBgkqhkiG9w0BCQEWEWhlbGxvQGV4YW1wbGUuY29tMRIw 6 | EAYDVQQDDAlsb2NhbGhvc3QwHhcNMjAxMDI4MTQ0OTA5WhcNMjMwMTMxMTQ0OTA5 7 | WjCBrDELMAkGA1UEBhMCVVMxFDASBgNVBAgMC1JhbmRvbVN0YXRlMRMwEQYDVQQH 8 | DApSYW5kb21DaXR5MRswGQYDVQQKDBJSYW5kb21Pcmdhbml6YXRpb24xHzAdBgNV 9 | BAsMFlJhbmRvbU9yZ2FuaXphdGlvblVuaXQxIDAeBgkqhkiG9w0BCQEWEWhlbGxv 10 | QGV4YW1wbGUuY29tMRIwEAYDVQQDDAlsb2NhbGhvc3QwggIiMA0GCSqGSIb3DQEB 11 | AQUAA4ICDwAwggIKAoICAQDbvklso0LUnp/tgJzK8WSOb9fhLOxbXFZT6IG1L3zT 12 | Ufd9ADBRYthUz+ExlYf4b0iMOLlaLrj9S9/b3Cugom6at6+68cKnI5dfjiccV+ww 13 | SOMqqgs0YST7I8cQgXoimShCkFqF0CfJ1TAHsTXATdMkwdiB6CF9nT+q4vOrThRY 14 | xd12VmFUI/GXAoyXyzVuaLKEPf1yp+GSCEYkiXYE0wpyWXftnSFyzBrmUqYisXYW 15 | 3oNVPxHQ2H5tsOwK/+TC+PTOfZfc1mEns5OfLd5m1wFF/kb0EJVQsURcdjVzG9EW 16 | 0egm8tNzYLfXkP5hW/s7NuwzFrIrEj38LDE32M/DHPf9pRhVrIScCS1PF7EBVJyH 17 | +wd6Asrlot6G83H92dZ5qjdgJs4OjdAJzg+PjM601ZA+ep0lWrof65OlXDw2eapT 18 | GWY1d9mUrPz6vo0l3tRIAFtvohMhnusQjVSsnuNHuHu/cH25HNk8soZOMfufaf3S 19 | msPT4CZQRGmflus1OoDSmxjuW3ZhQL+W0qCPfYKBTi6bAGO6VBWiVetEA/TPhgng 20 | MQ/PAM1d9LacY6YEIwE6mZQItvl0RagCfXDl2ZguIIazf9Uk/ubpy42nNDATbxUp 21 | xVcVc5qNVmYokg1qLToO89+NIo2gEJTydR+Nk95QdP2gY2XYgj9GcVgoYAj/Z/Qj 22 | kQIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQDSEsX7pnRK6W/2lEBg5KEKKr8vNoQQ 23 | h7AnMLdyKKHNMBN/A9imoNzdEgsiP9RJ5bpV1HgwkH8DJvc9/jmgstnKtKa9AOBW 24 | 0d9b1siVqIkfWK3tFBR3zFBHzowHWtxkK9APZfcL/jv609ZFGIXv7xZD5QqGkhF9 25 | SWxu8EhbeS2Hp3fLM+UbLqiObyXYsXgPnwDAQjj/fadCjplXKBa2q7CkDbat0/Pu 26 | i62YwfYxaZ/lY1bnrBUEv23RVGUPmZu1fEZxX6UmcHn68MJjHW7d3to0TU6wJPmp 27 | 6UeUQ5xlRqWYCHInmJ/ibzQpVhwS8NrJy/DfMBRcBwj8HHhU9hnjd7i7ESOn5Ncz 28 | KDEyX19yuoAqGs6nLJB68Ho1mizAoVXAaLaxtl0HvBSdIQSPJ1PbKcfsOJvPZxVT 29 | wZjdC7TT+nRRvRNxBuYXkoy/fBt5hFxCH9fBKMZNXPG9qSjTkZNupqKadYucvhQs 30 | HmdU+33GByT0qee9v32TI4jTFZqS8NAhqP9m+UZugX/dyiWnGWnUi2njZk5u/sgh 31 | yxwI+4KhD6OlBjNftP3jVli1gxvp+2vIoEPJFbxtqGI6/Yhg5Kth5INEfyl64jnS 32 | ZuSMEd8AZfY0LpEgx23dM4OhMpUUUG5pSijbCaX7a/sjZlUGtgUugqv9U4eym0+2 33 | Fzdp9hcPhC3htQ== 34 | -----END CERTIFICATE----- 35 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/files/file1.txt: -------------------------------------------------------------------------------- 1 | test тест 2 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/files/file2.txt: -------------------------------------------------------------------------------- 1 | test тест 2 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/files/file2.txt.enc: -------------------------------------------------------------------------------- 1 | -----BEGIN CMS----- 2 | MIAGCSqGSIb3DQEHA6CAMIACAQAxggH+MIIB+gIBADCCASMwggEKMRgwFgYFKoUD 3 | ZAESDTEyMzQ1Njc4OTAxMjMxGjAYBggqhQMDgQMBARIMMDAxMjM0NTY3ODkwMS8w 4 | LQYDVQQJDCbRg9C7LiDQodGD0YnRkdCy0YHQutC40Lkg0LLQsNC7INC0LiAxODEL 5 | MAkGA1UEBhMCUlUxGTAXBgNVBAgMENCzLiDQnNC+0YHQutCy0LAxFTATBgNVBAcM 6 | DNCc0L7RgdC60LLQsDElMCMGA1UECgwc0J7QntCeICLQmtCg0JjQn9Ci0J4t0J/Q 7 | oNCeIjE7MDkGA1UEAwwy0KLQtdGB0YLQvtCy0YvQuSDQo9CmINCe0J7QniAi0JrQ 8 | oNCY0J/QotCeLdCf0KDQniICE3wAALkRPe9EnTb7vyUAAQAAuREwHwYIKoUDBwEB 9 | AQEwEwYHKoUDAgIkAAYIKoUDBwEBAgIEgawwgakwKAQgTx5t4/usqxOsXWBKo30q 10 | FG6s8IUvAc9zyd5EZfI3yOgEBD2QBDagfQYJKoUDBwECBQEBoGYwHwYIKoUDBwEB 11 | AQEwEwYHKoUDAgIkAAYIKoUDBwEBAgIDQwAEQOQVkhQpVUvWo7uU6CIjxWj18sH3 12 | pdq1NDpeQqfKK24z0iSkmqZ9G49qYq/fpkMBREOhNqYAdZosZIG+e3CcSwcECLvM 13 | 8sHjV7ZWMIAGCSqGSIb3DQEHATAdBgYqhQMCAhUwEwQIXeaT8wuCAvsGByqFAwIC 14 | HwGggAQPUMyh95rhPfAG1zGeAq1rAAAAAAAAAAAAAA== 15 | -----END CMS----- 16 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/files/file4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/demo/cryptoarm-api/public/files/file4.pdf -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/js/script.js: -------------------------------------------------------------------------------- 1 | (function (factory) { 2 | if (typeof module === "object" && typeof module.exports === "object") { 3 | var v = factory(require, exports); 4 | if (v !== undefined) module.exports = v; 5 | } 6 | else if (typeof define === "function" && define.amd) { 7 | define(["require", "exports", "custom-protocol-check"], factory); 8 | } 9 | })(function (require, exports) { 10 | "use strict"; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | var custom_protocol_check_1 = require("custom-protocol-check"); 13 | function someProtocol() { 14 | custom_protocol_check_1.default("cryptoarm://params", function () { 15 | alert("Custom protocol not found."); 16 | }, function () { 17 | alert("Custom protocol found and opened the file successfully."); 18 | }, 5000, function () { 19 | alert("Browser is not supported."); 20 | })(); 21 | return true; 22 | } 23 | exports.default = someProtocol(); 24 | }); 25 | //# sourceMappingURL=script.js.map -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/js/script.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"script.js","sourceRoot":"","sources":["script.ts"],"names":[],"mappings":";;;;;;;;;;;IACA,+DAAwD;IAExD,SAAS,YAAY;QACjB,+BAAmB,CACf,oBAAoB,EACpB;YACI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACxC,CAAC,EACD;YACI,KAAK,CAAC,yDAAyD,CAAC,CAAC;QACrE,CAAC,EACD,IAAI,EACJ;YACI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACvC,CAAC,CACJ,EAAE,CAAC;QACJ,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kBAAe,YAAY,EAAE,CAAC"} -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/js/script.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore 2 | import customProtocolCheck from "custom-protocol-check"; 3 | 4 | function someProtocol() { 5 | customProtocolCheck( 6 | "cryptoarm://params", 7 | () => { 8 | alert("Custom protocol not found."); 9 | }, 10 | () => { 11 | alert("Custom protocol found and opened the file successfully."); 12 | }, 13 | 5000, 14 | () => { 15 | alert("Browser is not supported."); 16 | }, 17 | )(); 18 | return true; 19 | } 20 | 21 | export default someProtocol(); 22 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/2c48eb32-a0a8-405c-ade9-eed130605cba.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "method": "sign", 4 | "params": { 5 | "license": "", 6 | "token": "", 7 | "files": [ 8 | { 9 | "name": "file1.txt", 10 | "url": "http://localhost:8080/public/files/file1.txt", 11 | "id": 1, 12 | "urlSign": "" 13 | }, 14 | { 15 | "name": "file2.txt", 16 | "url": "http://localhost:8080/public/files/file2.txt", 17 | "id": 2, 18 | "urlSign": "" 19 | }, 20 | { 21 | "name": "file4.pdf", 22 | "url": "http://localhost:8080/public/files/file4.pdf", 23 | "id": 4, 24 | "urlSign": "" 25 | } 26 | ], 27 | "extra": { 28 | "token": "9c7101f7-9c47-4481-b4da-a6a497abde08", 29 | "signType": "1", 30 | "signStandart": "1" 31 | }, 32 | "uploader": "https://localhost:4040/upload" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/9c7101f7-9c47-4481-b4da-a6a497abde08.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc":"2.0", 3 | "method":"verify", 4 | "params":{ 5 | "license":"", 6 | "token":"", 7 | "files":[ 8 | { 9 | "name":"file1.txt.sig", 10 | "url":"https://localhost:4040/public/files/file1.txt.sig", 11 | "id":2, 12 | "urlSign":"" 13 | } 14 | ], 15 | "extra":{ 16 | "token":"9c7101f7-9c47-4481-b4da-a6a497abde08", 17 | "signType":"1", 18 | "signStandart":"1" 19 | }, 20 | "uploader":"https://localhost:4040/upload" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/certs/export-cert.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc":"2.0", 3 | "result": { 4 | "operation": "export", 5 | "props": { 6 | "store": ["MY"], 7 | "multy": false 8 | } 9 | }, 10 | "id": "70505a39-3267-4c0f-99a9-02d43165f4f3" 11 | } 12 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/certs/export-certs-stores.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc":"2.0", 3 | "result": { 4 | "operation": "export", 5 | "props": { 6 | "store": ["AddressBook", "ROOT"], 7 | "multy": true 8 | } 9 | }, 10 | "id": "9b5e6a0b-489d-4812-8866-0b9afce648e1" 11 | } 12 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/certs/export-certs.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc":"2.0", 3 | "result": { 4 | "operation": "export", 5 | "props": { 6 | "store": ["MY"], 7 | "multy": true 8 | } 9 | }, 10 | "id": "0a94fab1-eb68-4257-a9da-1399ad208445" 11 | } 12 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/diagnostics/diagnostics-params.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc":"2.0", 3 | "result": { 4 | "operation": [ 5 | "SYSTEMINFORMATION", 6 | "CSP_ENABLED", 7 | "CADES_ENABLED", 8 | "VERSIONS", 9 | "PROVIDERS", 10 | "LICENSES", 11 | "PERSONALCERTIFICATES" 12 | ], 13 | "props": { 14 | "headerText": "Диагностика cryptoarm demo", 15 | "descriptionText": "Выполняется диагностика рабочего места для демонстрационного проекта" 16 | } 17 | }, 18 | "id": "dd528a4f-da00-40fe-b807-76d9bf7eb535" 19 | } 20 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/efac5229-0595-41e9-b1aa-7df406539b87.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc":"2.0", 3 | "method":"sign", 4 | "params":{ 5 | "license":"", 6 | "token":"", 7 | "files":[ 8 | { 9 | "name":"file1.txt", 10 | "url":"https://localhost:4040/public/files/file1.txt", 11 | "id":1, 12 | "urlSign":"" 13 | } 14 | ], 15 | "extra":{ 16 | "token":"efac5229-0595-41e9-b1aa-7df406539b87", 17 | "signType":"1", 18 | "signStandart":"1" 19 | }, 20 | "uploader":"https://localhost:4040/upload" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/server-errors/internal-error.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "error": { 4 | "code": -32603, 5 | "message": "Internal error", 6 | "data": "Some internal error info" 7 | }, 8 | "id": "c1e334d3-378a-45ac-842b-b823d2702722" 9 | } 10 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/server-errors/invalid-params.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "error": { 4 | "code": -32602, 5 | "message": "Invalid params" 6 | }, 7 | "id": "d53032c9-fc0d-42a7-bdfd-b45bec7b8ab9" 8 | } 9 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/server-errors/invalid-request.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "error": { 4 | "code": -32600, 5 | "message": "Invalid Request" 6 | }, 7 | "id": "90dc17c9-4df9-420a-9e25-53b8df4f709f" 8 | } 9 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/server-errors/method-not-found.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "error": { 4 | "code": -32601, 5 | "message": "Method not found" 6 | }, 7 | "id": "d2056bc4-c8c7-41ee-bdf8-aaa306cdec2f" 8 | } 9 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/server-errors/parse-error.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "error": { 4 | "code": -32700, 5 | "message": "Parse error" 6 | }, 7 | "id": "14a52a48-dac7-4b21-8836-744e453a82d2" 8 | } 9 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/signAndEncrypt/sign-attached-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "result": { 4 | "operation": [ 5 | "SIGN" 6 | ], 7 | "props": { 8 | "license": "", 9 | "files": [ 10 | { 11 | "name": "file1.txt", 12 | "url": "http://localhost:8080/public/files/file1.txt", 13 | "id": 1, 14 | "urlDetached": "" 15 | } 16 | ], 17 | "extra": { 18 | "token": "9c7101f7-9c47-4481-b4da-a6a497abde08", 19 | "signType": 0, 20 | "signStandart": 0, 21 | "signEncoding": 0 22 | }, 23 | "uploader": "https://localhost:4040/json" 24 | } 25 | }, 26 | "id": "71407d37-ae12-4a60-9c38-a77664c31f27" 27 | } 28 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/signAndEncrypt/sign-detached-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "result": { 4 | "operation": [ 5 | "SIGN" 6 | ], 7 | "props": { 8 | "license": "", 9 | "files": [ 10 | { 11 | "name": "file1.txt", 12 | "url": "http://localhost:8080/public/files/file1.txt", 13 | "id": 1, 14 | "urlDetached": "" 15 | } 16 | ], 17 | "extra": { 18 | "token": "9c7101f7-9c47-4481-b4da-a6a497abde08", 19 | "signType": 1, 20 | "signStandart": 0, 21 | "signEncoding": 0 22 | }, 23 | "uploader": "https://localhost:4040/json" 24 | } 25 | }, 26 | "id": "3a2fca10-fb2c-45eb-a61e-2e0da2a92bf0" 27 | } 28 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/signAndEncrypt/sign-multiple-files.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "result": { 4 | "operation": [ 5 | "SIGN" 6 | ], 7 | "props": { 8 | "license": "", 9 | "files": [ 10 | { 11 | "name": "file1.txt", 12 | "url": "http://localhost:8080/public/files/file1.txt", 13 | "id": 1, 14 | "urlSign": "" 15 | }, 16 | { 17 | "name": "file2.txt", 18 | "url": "http://localhost:8080/public/files/file2.txt", 19 | "id": 2, 20 | "urlSign": "" 21 | } 22 | ], 23 | "extra": { 24 | "token": "9c7101f7-9c47-4481-b4da-a6a497abde08", 25 | "signType": 0, 26 | "signStandart": 0, 27 | "signEncoding": 0 28 | }, 29 | "uploader": "https://localhost:4040/json" 30 | } 31 | }, 32 | "id": "6afd40d9-4ef2-4d88-a9cc-3f15e4b0a3c0" 33 | } 34 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/signAndEncrypt/verify-attached-sign.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc": "2.0", 3 | "result": { 4 | "operation": [ 5 | "VERIFYSIGN" 6 | ], 7 | "props": { 8 | "license": "", 9 | "files": [ 10 | { 11 | "name": "file1.txt.sig", 12 | "url": "http://localhost:8080/public/files/file1.txt.sig", 13 | "id": 2, 14 | "urlDetached": "" 15 | } 16 | ], 17 | "extra": { 18 | "token": "9c7101f7-9c47-4481-b4da-a6a497abde08" 19 | } 20 | } 21 | }, 22 | "id": "1b9e26e0-0524-402c-b255-b17dd49ef49b" 23 | } 24 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/public/json/start-view/certificates-my.json: -------------------------------------------------------------------------------- 1 | { 2 | "jsonrpc":"2.0", 3 | "result": { 4 | "uiView": "CERTIFICATES_MY", 5 | "description": "Личные сертификаты" 6 | }, 7 | "id": "7d8df97a-abc6-42b8-bc2a-f7a354600fd2" 8 | } 9 | -------------------------------------------------------------------------------- /demo/cryptoarm-api/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "umd", 5 | "moduleResolution": "node", 6 | "sourceMap": true, 7 | "emitDecoratorMetadata": true, 8 | "experimentalDecorators": true, 9 | "lib": [ "es2015", "dom" ], 10 | "noImplicitAny": true, 11 | "removeComments": true, 12 | "preserveConstEnums": true, 13 | "allowUnreachableCode": true 14 | }, 15 | "exclude": [ 16 | "node_modules" 17 | ] 18 | } -------------------------------------------------------------------------------- /docs/КриптоАРМ API.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/docs/КриптоАРМ API.pdf -------------------------------------------------------------------------------- /docs/Руководство пользователя.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/docs/Руководство пользователя.pdf -------------------------------------------------------------------------------- /docs/Руководство программиста.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/docs/Руководство программиста.pdf -------------------------------------------------------------------------------- /product.json: -------------------------------------------------------------------------------- 1 | { 2 | "nameShort": "CryptoARM GOST", 3 | "nameLong": "CryptoARM GOST", 4 | "applicationName": "cryptoarm-gost" 5 | } 6 | -------------------------------------------------------------------------------- /setupJest.ts: -------------------------------------------------------------------------------- 1 | import {GlobalWithFetchMock} from "jest-fetch-mock"; 2 | 3 | const customGlobal: GlobalWithFetchMock = global as GlobalWithFetchMock; 4 | customGlobal.fetch = require('jest-fetch-mock'); 5 | customGlobal.fetchMock = customGlobal.fetch; 6 | -------------------------------------------------------------------------------- /trusted_pub_key.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryptoARM/CryptoARMGOST/9aabec6ff6adaf506d7b15879e4c97937bc0ccb4/trusted_pub_key.gpg -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { "*": ["types/*"] }, 5 | "jsx": "react", 6 | "target": "ES6", 7 | "allowSyntheticDefaultImports": true, 8 | "module": "commonjs", 9 | //"noEmitOnError": true, 10 | "strict": true, 11 | "allowJs": true, 12 | "pretty": true, 13 | "sourceMap": false, 14 | "noImplicitAny": true, 15 | "moduleResolution": "node", 16 | "typeRoots": [ 17 | "node_modules/@types" 18 | ], 19 | "types": ["@types/materialize-css"], 20 | "rootDir": "app", 21 | "outDir": "tmp" 22 | }, 23 | "exclude": [ 24 | "node_modules", 25 | "app/node_modules" 26 | ], 27 | "externalTranspiler": { 28 | "name": "babel", 29 | "options": { 30 | "presets": [ 31 | ["env", { 32 | "targets": { "node": 8 }, 33 | "useBuiltIns": true 34 | }], 35 | "es2015", 36 | "stage-0", 37 | "react", 38 | "react-hmre" 39 | ], 40 | "plugins": ["add-module-exports", "dynamic-import-webpack"], 41 | "env": { 42 | "production": { 43 | "presets": ["react-optimize"], 44 | "plugins": ["babel-plugin-dev-expression"] 45 | }, 46 | "development": { 47 | "plugins": [ 48 | "transform-class-properties", 49 | "transform-es2015-classes", 50 | "react-hot-loader/babel" 51 | ] 52 | } 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:recommended", 3 | "rules": { 4 | "no-reference": false, 5 | "member-access": false, 6 | "only-arrow-functions": [ 7 | false 8 | ], 9 | "max-line-length": [ 10 | true, 11 | 220 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /types/modal.d.ts: -------------------------------------------------------------------------------- 1 | interface JQuery { 2 | closeModal(): void; 3 | leanModal(): void; 4 | openModal(complete?: any, dismissible?: boolean): void; 5 | } 6 | -------------------------------------------------------------------------------- /webpack.config.base.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Base webpack config used across other specific configs 3 | */ 4 | 5 | import path from 'path'; 6 | import webpack from 'webpack'; 7 | import { dependencies as externals } from './app/package.json'; 8 | 9 | export default { 10 | externals: Object.keys(externals || {}), 11 | 12 | module: { 13 | rules: [{ 14 | test: /\.tsx?$/, 15 | exclude: /node_modules/, 16 | use: { 17 | loader: 'babel-loader' 18 | } 19 | // @TODO: Waiting until awesome-typescript-loader can throw 20 | // warnings instead of errors. This makes sure that the dev 21 | // build will work even with typescript errors 22 | // use: { 23 | // loader: 'awesome-typescript-loader', 24 | // options: { 25 | // silent: true, 26 | // useBabel: true, 27 | // useCache: true 28 | // } 29 | // } 30 | }] 31 | }, 32 | 33 | output: { 34 | path: path.join(__dirname, 'app'), 35 | filename: 'bundle.js', 36 | // https://github.com/webpack/webpack/issues/1114 37 | libraryTarget: 'commonjs2' 38 | }, 39 | 40 | /** 41 | * Determine the array of extensions that should be used to resolve modules. 42 | */ 43 | resolve: { 44 | extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'], 45 | modules: [ 46 | path.join(__dirname, 'app'), 47 | 'node_modules', 48 | ], 49 | }, 50 | 51 | plugins: [ 52 | new webpack.NamedModulesPlugin(), 53 | ], 54 | }; 55 | -------------------------------------------------------------------------------- /webpack.config.eslint.js: -------------------------------------------------------------------------------- 1 | require('babel-register'); 2 | 3 | module.exports = require('./webpack.config.renderer.dev'); 4 | -------------------------------------------------------------------------------- /webpack.config.main.prod.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Webpack config for production electron main process 3 | */ 4 | 5 | import webpack from 'webpack'; 6 | import merge from 'webpack-merge'; 7 | import BabiliPlugin from 'babili-webpack-plugin'; 8 | import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; 9 | import baseConfig from './webpack.config.base'; 10 | 11 | export default merge.smart(baseConfig, { 12 | devtool: process.env.NODE_ENV === "development" ? "source-map" : "none", 13 | 14 | target: 'electron-main', 15 | 16 | entry: ['babel-polyfill', './app/main.development'], 17 | 18 | // 'main.js' in root 19 | output: { 20 | path: __dirname, 21 | filename: './app/main.js' 22 | }, 23 | 24 | plugins: [ 25 | /** 26 | * Babli is an ES6+ aware minifier based on the Babel toolchain (beta) 27 | */ 28 | new BabiliPlugin(), 29 | 30 | new BundleAnalyzerPlugin({ 31 | analyzerMode: process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled', 32 | openAnalyzer: process.env.OPEN_ANALYZER === 'true' 33 | }), 34 | 35 | /** 36 | * Create global constants which can be configured at compile time. 37 | * 38 | * Useful for allowing different behaviour between development builds and 39 | * release builds 40 | * 41 | * NODE_ENV should be production so that modules do not perform certain 42 | * development checks 43 | */ 44 | new webpack.DefinePlugin({ 45 | 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'), 46 | 'process.env.DEBUG_PROD': JSON.stringify(process.env.DEBUG_PROD || 'false') 47 | }) 48 | ], 49 | 50 | /** 51 | * Disables webpack processing of __dirname and __filename. 52 | * If you run the bundle in node.js it falls back to these values of node.js. 53 | * https://github.com/webpack/webpack/issues/2010 54 | */ 55 | node: { 56 | __dirname: false, 57 | __filename: false 58 | }, 59 | }); 60 | --------------------------------------------------------------------------------