@aktivco-it/rutoken-plugin-bootstrap
Version:
Bootstraps Rutoken Plugin into the web-page
99 lines (97 loc) • 7.12 kB
JavaScript
/* eslint max-len: ["error", { "ignoreStrings": true }] */
const getErrorCodes = (errorCodes) => ({
'DEFAULT_ERROR': 'An error has occurred',
[]: 'Unknown error',
[]: 'Wrong parameters',
[]: 'Low memory',
[]: 'Device not found',
[]: 'Device error',
[]: 'Device read/write error. Device may have been removed. Try refreshing the page ',
[]: 'Invalid certificate type',
[]: 'Certificate already exists on the device',
[]: 'Certificate not found',
[]: 'Certificate hash not unique',
[]: 'Root certificates not found',
[]: 'Certificate verification error',
[]: 'PKCS#11 library load failed',
[]: 'PIN length invalid',
[]: 'Current PIN incorrect',
[]: 'PIN locked',
[]: 'PIN changed',
[]: 'Token state changed',
[]: 'Please log in to the device',
[]: 'You are already logged in',
[]: 'Attribute cannot be changed',
[]: 'No key pair found for the certificate',
[]: 'Key pair ID not unique',
[]: 'Wrong key selected',
[]: 'Key pair label not unique',
[]: 'Wrong key type',
[]: 'Licence read only',
[]: 'Data invalid',
[]: 'Operation not supported by token',
[]: 'Operation not permitted for this key type',
[]: 'Base64 data decoding error',
[]: 'PEM error',
[]: 'ASN1 structure decoding error',
[]: 'Operation rejected by user',
[]: 'Operation failed',
[]: 'Mechanism invalid',
[]: 'Attribute invalid',
[]: 'Unable to get issuer certificate',
[]: 'Unable to get CRL',
[]: 'Unable to decrypt certificate signature',
[]: 'Unable to decrypt CRL signature',
[]: 'Unable to decode issuer public key',
[]: 'Wrong certificate signature',
[]: 'Wrong CRL signature',
[]: 'Certificate not yet valid',
[]: 'CRL not yet valid',
[]: 'Certificate has expired',
[]: 'CRL has expired',
[]: 'Error in certificate \'notBefore\' field',
[]: 'Error in certificate \'notAfter\' field',
[]: 'Error in CRL \'lastUpdate\' field',
[]: 'Error in CRL \'nextUpdate\' field',
[]: 'Not enough memory',
[]: 'Untrusted self-signed certificate',
[]: 'Untrusted self-signed certificate found in chain',
[]: 'Unable to get issuer local certificate',
[]: 'Unable to verify first certificate',
[]: 'Certificate chain too long',
[]: 'Certificate revoked',
[]: 'Invalid root certificate',
[]: 'Invalid non-root certificate labelled as root certificate',
[]: 'Path length exceeded',
[]: 'Proxy path length exceeded',
[]: 'Proxy certificates not allowed',
[]: 'Invalid certificate purpose',
[]: 'Certificate untrusted',
[]: 'Certificate rejected',
[]: 'Application verification failed',
[]: 'Subject and Issuer mismatch',
[]: 'Mismatch between key identifier of the subject and trusted authority ',
[]: 'Mismatch between serial number of the subject and trusted authority ',
[]: 'Key cannot be used for certificate signature',
[]: 'Unable to get issuer CRL',
[]: 'Extension not supported',
[]: 'Key cannot be used for CRL signature',
[]: 'Key cannot be used for digital signature',
[]: 'CRL extension not supported',
[]: 'Invalid or incorrect certificate extension',
[]: 'Invalid or incorrect certificate policy extension',
[]: 'No explicit policy',
[]: 'Different CRL scope',
[]: 'Unsupported extension',
[]: 'RFC 3779 incorrect resource inheritance ',
[]: 'Wrong certificate structure',
[]: 'Wrong certificate structure',
[]: 'Wrong certificate structure',
[]: 'Wrong certificate structure',
[]: 'Wrong certificate structure',
[]: 'Wrong certificate structure',
[]: 'Wrong CRL path',
[]: 'Certificate already in use',
[]: 'Multiple signature verification with hash computation is not supported on the device',
});
export default getErrorCodes;