Skip to content

Commit 02704f8

Browse files
authored
Revert "The OpenSSL version has been changed to 3.4.2. (#493)" (#494)
This reverts commit 2e235ac.
1 parent 2e235ac commit 02704f8

File tree

4 files changed

+8
-36
lines changed

4 files changed

+8
-36
lines changed

common-npm-packages/azure-arm-rest/azure-arm-common.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -720,24 +720,12 @@ export class ApplicationTokenCredentials {
720720
return deferred.promise;
721721
}
722722

723-
private _getOpenSSLPath() {
724-
if (tl.osType().match(/^Win/)) {
725-
if (tl.getPipelineFeature("UseOpenSSLv3.4.2InAzureArmRest")) {
726-
return tl.which(path.join(__dirname, 'openssl3.4.2', 'openssl'));
727-
} else {
728-
return tl.which(path.join(__dirname, 'openssl3.4.0', 'openssl'));
729-
}
730-
} else {
731-
return tl.which('openssl');
732-
}
733-
}
734-
735723
/**
736724
* @deprecated ADAL related methods are deprecated and will be removed.
737725
* Use Use `getMSALToken(force?: boolean)` instead.
738726
*/
739727
private _getSPNCertificateAuthorizationToken(): string {
740-
var openSSLPath = this._getOpenSSLPath();
728+
var openSSLPath = tl.osType().match(/^Win/) ? tl.which(path.join(__dirname, 'openssl', 'openssl')) : tl.which('openssl');
741729
var openSSLArgsArray = [
742730
"x509",
743731
"-sha1",
@@ -746,7 +734,7 @@ export class ApplicationTokenCredentials {
746734
this.certFilePath,
747735
"-fingerprint"
748736
];
749-
tl.debug(`The OpenSSL version is ${tl.execSync(openSSLPath, 'version')}`);
737+
750738
var pemExecutionResult = tl.execSync(openSSLPath, openSSLArgsArray);
751739
var additionalHeaders = {
752740
"alg": "RS256",
Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
1-
import * as tl from 'azure-pipelines-task-lib/task';
21
var path = require('path');
32
var util = require('../build-scripts/util');
4-
var fs = require('fs');
5-
var buildPath = './_build'
63

7-
var opensslLatestVersion = tl.getPipelineFeature('UseOpenSSLv3.4.2InAzureArmRest');
8-
var opensslDir;
9-
var opensslUrl;
10-
if (opensslLatestVersion) {
11-
opensslDir = 'openssl3.4.2';
12-
opensslUrl = 'https://vstsagenttools.blob.core.windows.net/tools/openssl/3.4.2/M262/openssl.zip';
13-
}
14-
else {
15-
opensslDir = 'openssl3.4.0';
16-
opensslUrl = 'https://vstsagenttools.blob.core.windows.net/tools/openssl/3.4.0/M252/openssl.zip';
17-
}
4+
var buildPath = './_build'
185

19-
if (!fs.existsSync(path.join(__dirname, opensslDir))) {
20-
util.run(`node ../build-scripts/downloadArchive.js ${opensslUrl} ${opensslDir}`);
21-
}
226
util.rm('-rf', buildPath)
237
util.run(path.join(__dirname, 'node_modules/.bin/tsc') + ' --outDir ' + buildPath);
248

@@ -27,6 +11,6 @@ util.cp(path.join(__dirname, 'package-lock.json'), buildPath);
2711
util.cp(path.join(__dirname, 'module.json'), buildPath);
2812
util.cp(path.join('./Tests', 'package.json'), path.join(buildPath, 'Tests'));
2913
util.cp(path.join('./Tests', 'package-lock.json'), path.join(buildPath, 'Tests'));
30-
util.cp('-r', opensslDir, buildPath);
14+
util.cp('-r', 'openssl', buildPath);
3115
util.cp('-r', 'Strings', buildPath);
3216
util.cp('-r', 'node_modules', buildPath);

common-npm-packages/azure-arm-rest/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common-npm-packages/azure-arm-rest/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "azure-pipelines-tasks-azure-arm-rest",
3-
"version": "3.263.0",
3+
"version": "3.262.1",
44
"description": "Common Lib for Azure ARM REST apis",
55
"repository": {
66
"type": "git",
@@ -38,6 +38,6 @@
3838
"typescript": "^4.9.5"
3939
},
4040
"scripts": {
41-
"build": "node make.js"
41+
"build": "node ../build-scripts/downloadArchive.js https://vstsagenttools.blob.core.windows.net/tools/openssl/3.4.0/M252/openssl.zip ./openssl && node make.js"
4242
}
4343
}

0 commit comments

Comments
 (0)