mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
* Bump lodash from 4.17.15 to 4.17.19 (#52) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amruta Kawade <65217380+AmrutaKawade@users.noreply.github.com> * Bump @actions/core from 1.1.3 to 1.2.6 (#60) Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.1.3 to 1.2.6. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amruta Kawade <65217380+AmrutaKawade@users.noreply.github.com> * updating node_nodules * updated package-lock Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
85 lines
2.7 KiB
JavaScript
85 lines
2.7 KiB
JavaScript
// Copyright 2015 Joyent, Inc.
|
|
|
|
var assert = require('assert-plus');
|
|
var util = require('util');
|
|
|
|
function FingerprintFormatError(fp, format) {
|
|
if (Error.captureStackTrace)
|
|
Error.captureStackTrace(this, FingerprintFormatError);
|
|
this.name = 'FingerprintFormatError';
|
|
this.fingerprint = fp;
|
|
this.format = format;
|
|
this.message = 'Fingerprint format is not supported, or is invalid: ';
|
|
if (fp !== undefined)
|
|
this.message += ' fingerprint = ' + fp;
|
|
if (format !== undefined)
|
|
this.message += ' format = ' + format;
|
|
}
|
|
util.inherits(FingerprintFormatError, Error);
|
|
|
|
function InvalidAlgorithmError(alg) {
|
|
if (Error.captureStackTrace)
|
|
Error.captureStackTrace(this, InvalidAlgorithmError);
|
|
this.name = 'InvalidAlgorithmError';
|
|
this.algorithm = alg;
|
|
this.message = 'Algorithm "' + alg + '" is not supported';
|
|
}
|
|
util.inherits(InvalidAlgorithmError, Error);
|
|
|
|
function KeyParseError(name, format, innerErr) {
|
|
if (Error.captureStackTrace)
|
|
Error.captureStackTrace(this, KeyParseError);
|
|
this.name = 'KeyParseError';
|
|
this.format = format;
|
|
this.keyName = name;
|
|
this.innerErr = innerErr;
|
|
this.message = 'Failed to parse ' + name + ' as a valid ' + format +
|
|
' format key: ' + innerErr.message;
|
|
}
|
|
util.inherits(KeyParseError, Error);
|
|
|
|
function SignatureParseError(type, format, innerErr) {
|
|
if (Error.captureStackTrace)
|
|
Error.captureStackTrace(this, SignatureParseError);
|
|
this.name = 'SignatureParseError';
|
|
this.type = type;
|
|
this.format = format;
|
|
this.innerErr = innerErr;
|
|
this.message = 'Failed to parse the given data as a ' + type +
|
|
' signature in ' + format + ' format: ' + innerErr.message;
|
|
}
|
|
util.inherits(SignatureParseError, Error);
|
|
|
|
function CertificateParseError(name, format, innerErr) {
|
|
if (Error.captureStackTrace)
|
|
Error.captureStackTrace(this, CertificateParseError);
|
|
this.name = 'CertificateParseError';
|
|
this.format = format;
|
|
this.certName = name;
|
|
this.innerErr = innerErr;
|
|
this.message = 'Failed to parse ' + name + ' as a valid ' + format +
|
|
' format certificate: ' + innerErr.message;
|
|
}
|
|
util.inherits(CertificateParseError, Error);
|
|
|
|
function KeyEncryptedError(name, format) {
|
|
if (Error.captureStackTrace)
|
|
Error.captureStackTrace(this, KeyEncryptedError);
|
|
this.name = 'KeyEncryptedError';
|
|
this.format = format;
|
|
this.keyName = name;
|
|
this.message = 'The ' + format + ' format key ' + name + ' is ' +
|
|
'encrypted (password-protected), and no passphrase was ' +
|
|
'provided in `options`';
|
|
}
|
|
util.inherits(KeyEncryptedError, Error);
|
|
|
|
module.exports = {
|
|
FingerprintFormatError: FingerprintFormatError,
|
|
InvalidAlgorithmError: InvalidAlgorithmError,
|
|
KeyParseError: KeyParseError,
|
|
SignatureParseError: SignatureParseError,
|
|
KeyEncryptedError: KeyEncryptedError,
|
|
CertificateParseError: CertificateParseError
|
|
};
|