mirror of
https://github.com/gradle/wrapper-validation-action.git
synced 2025-04-22 07:09:19 +08:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e2c57acffb | ||
|
0d659779b2 | ||
|
8aa7c79fa3 | ||
|
c96026c4a4 | ||
|
e60abf8b0f | ||
|
c924edf7c8 | ||
|
38d0eb7924 | ||
|
52477604a4 | ||
|
0dcfa68721 | ||
|
0484d9d18a | ||
|
4c4187a173 |
3
.eslintignore
Normal file
3
.eslintignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
dist/
|
||||||
|
lib/
|
||||||
|
node_modules/
|
58
.eslintrc.json
Normal file
58
.eslintrc.json
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"plugins": ["jest", "@typescript-eslint"],
|
||||||
|
"extends": ["plugin:github/es6"],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 9,
|
||||||
|
"sourceType": "module",
|
||||||
|
"project": "./tsconfig.json"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"eslint-comments/no-use": "off",
|
||||||
|
"import/no-namespace": "off",
|
||||||
|
"no-unused-vars": "off",
|
||||||
|
"@typescript-eslint/no-unused-vars": "error",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
|
||||||
|
"@typescript-eslint/no-require-imports": "error",
|
||||||
|
"@typescript-eslint/array-type": "error",
|
||||||
|
"@typescript-eslint/await-thenable": "error",
|
||||||
|
"@typescript-eslint/ban-ts-ignore": "error",
|
||||||
|
"camelcase": "off",
|
||||||
|
"@typescript-eslint/camelcase": "error",
|
||||||
|
"@typescript-eslint/class-name-casing": "error",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
|
||||||
|
"@typescript-eslint/func-call-spacing": ["error", "never"],
|
||||||
|
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
|
||||||
|
"@typescript-eslint/no-array-constructor": "error",
|
||||||
|
"@typescript-eslint/no-empty-interface": "error",
|
||||||
|
"@typescript-eslint/no-explicit-any": "error",
|
||||||
|
"@typescript-eslint/no-extraneous-class": "error",
|
||||||
|
"@typescript-eslint/no-for-in-array": "error",
|
||||||
|
"@typescript-eslint/no-inferrable-types": "error",
|
||||||
|
"@typescript-eslint/no-misused-new": "error",
|
||||||
|
"@typescript-eslint/no-namespace": "error",
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-object-literal-type-assertion": "error",
|
||||||
|
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
||||||
|
"@typescript-eslint/no-useless-constructor": "error",
|
||||||
|
"@typescript-eslint/no-var-requires": "error",
|
||||||
|
"@typescript-eslint/prefer-for-of": "warn",
|
||||||
|
"@typescript-eslint/prefer-function-type": "warn",
|
||||||
|
"@typescript-eslint/prefer-includes": "error",
|
||||||
|
"@typescript-eslint/prefer-interface": "error",
|
||||||
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
||||||
|
"@typescript-eslint/promise-function-async": "error",
|
||||||
|
"@typescript-eslint/require-array-sort-compare": "error",
|
||||||
|
"@typescript-eslint/restrict-plus-operands": "error",
|
||||||
|
"semi": "off",
|
||||||
|
"@typescript-eslint/semi": ["error", "never"],
|
||||||
|
"@typescript-eslint/type-annotation-spacing": "error",
|
||||||
|
"@typescript-eslint/unbound-method": "error"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"es6": true,
|
||||||
|
"jest/globals": true
|
||||||
|
}
|
||||||
|
}
|
10
.github/dependabot.yml
vendored
10
.github/dependabot.yml
vendored
@ -1,10 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
groups:
|
|
||||||
github-actions:
|
|
||||||
patterns:
|
|
||||||
- "*"
|
|
65
.github/workflows/ci.yml
vendored
65
.github/workflows/ci.yml
vendored
@ -3,65 +3,22 @@ on: # rebuild any PRs and main branch changes
|
|||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- master
|
||||||
- 'releases/*'
|
- 'releases/*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build: # make sure build/ci work properly
|
||||||
# Integration test for successful validation of wrappers
|
|
||||||
test-validation-success:
|
|
||||||
name: 'Test: Validation success'
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
|
- run: |
|
||||||
- name: Run wrapper-validation-action
|
npm install
|
||||||
id: action-test
|
npm run all
|
||||||
uses: ./
|
test: # make sure the action works on a clean machine without building
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
# to allow the invalid wrapper jar present in test data
|
# to allow the invalid wrapper jar present in test data
|
||||||
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||||
|
|
||||||
- name: Check outcome
|
|
||||||
env:
|
|
||||||
# Evaluate workflow expressions here as env variable values instead of inside shell script
|
|
||||||
# below to not accidentally inject code into shell script or break its syntax
|
|
||||||
FAILED_WRAPPERS: ${{ steps.action-test.outputs.failed-wrapper }}
|
|
||||||
FAILED_WRAPPERS_MATCHES: ${{ steps.action-test.outputs.failed-wrapper == '' }}
|
|
||||||
run: |
|
|
||||||
if [ "$FAILED_WRAPPERS_MATCHES" != "true" ] ; then
|
|
||||||
echo "'outputs.failed-wrapper' has unexpected content: $FAILED_WRAPPERS"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Integration test for failing validation of wrappers
|
|
||||||
test-validation-error:
|
|
||||||
name: 'Test: Validation error'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Run wrapper-validation-action
|
|
||||||
id: action-test
|
|
||||||
uses: ./
|
|
||||||
# Expected to fail; validated below
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Check outcome
|
|
||||||
env:
|
|
||||||
# Evaluate workflow expressions here as env variable values instead of inside shell script
|
|
||||||
# below to not accidentally inject code into shell script or break its syntax
|
|
||||||
VALIDATION_FAILED: ${{ steps.action-test.outcome == 'failure' }}
|
|
||||||
FAILED_WRAPPERS: ${{ steps.action-test.outputs.failed-wrapper }}
|
|
||||||
FAILED_WRAPPERS_MATCHES: ${{ steps.action-test.outputs.failed-wrapper == '__tests__/data/invalid/gradle-wrapper.jar|__tests__/data/invalid/gradlе-wrapper.jar' }}
|
|
||||||
run: |
|
|
||||||
if [ "$VALIDATION_FAILED" != "true" ] ; then
|
|
||||||
echo "Expected validation to fail, but it didn't"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$FAILED_WRAPPERS_MATCHES" != "true" ] ; then
|
|
||||||
echo "'outputs.failed-wrapper' has unexpected content: $FAILED_WRAPPERS"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
102
.gitignore
vendored
Normal file
102
.gitignore
vendored
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
# Dependency directory
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
.env.test
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# next.js build output
|
||||||
|
.next
|
||||||
|
|
||||||
|
# nuxt.js build output
|
||||||
|
.nuxt
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
|
||||||
|
# OS metadata
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Ignore built ts files
|
||||||
|
__tests__/runner/*
|
||||||
|
lib/**/*
|
||||||
|
|
||||||
|
.idea/
|
||||||
|
*.iml
|
3
.prettierignore
Normal file
3
.prettierignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
dist/
|
||||||
|
lib/
|
||||||
|
node_modules/
|
11
.prettierrc.json
Normal file
11
.prettierrc.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"printWidth": 80,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"useTabs": false,
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "none",
|
||||||
|
"bracketSpacing": false,
|
||||||
|
"arrowParens": "avoid",
|
||||||
|
"parser": "typescript"
|
||||||
|
}
|
12
CONTRIBUTING.md
Normal file
12
CONTRIBUTING.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
## Project Goals
|
||||||
|
|
||||||
|
We aim to keep the scope of this project limited so that it is easy for maintainers to apply and forget about.
|
||||||
|
|
||||||
|
### Goals
|
||||||
|
|
||||||
|
To verify that all the gradle-wrapper.jar(s) in a given GitHub repository or pull request against that repo is an official Gradle Wrapper release.
|
||||||
|
|
||||||
|
### Non-Goals
|
||||||
|
|
||||||
|
It is not the goal of this action to verify that the gradle-wrapper.jar matches a specific version of Gradle,
|
||||||
|
nor that the version declared in the build.gradle or gradle-wrapper.properties file matches.
|
4
LICENSE
4
LICENSE
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2023 Gradle Inc.
|
Copyright (c) 2018 GitHub, Inc. and contributors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -19,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
115
README.md
115
README.md
@ -1,27 +1,59 @@
|
|||||||
> [!IMPORTANT]
|
<p align="center">
|
||||||
> As of `v3` this action has been superceded by `gradle/actions/wrapper-validation`.
|
<a href="https://github.com/gradle/wrapper-validation-action/actions"><img alt="gradle/wrapper-validation-action status" src="https://github.com/gradle/wrapper-validation-action/workflows/ci/badge.svg"></a>
|
||||||
> Any workflow that uses `gradle/wrapper-validation-action@v3` will transparently delegate to `gradle/actions/wrapper-validation@v3`.
|
</p>
|
||||||
>
|
|
||||||
> Users are encouraged to update their workflows, replacing:
|
|
||||||
> ```
|
|
||||||
> uses: gradle/wrapper-validation-action@v3
|
|
||||||
> ```
|
|
||||||
>
|
|
||||||
> with
|
|
||||||
> ```
|
|
||||||
> uses: gradle/actions/wrapper-validation@v3
|
|
||||||
> ```
|
|
||||||
>
|
|
||||||
> See the [wrapper-validation documentation](https://github.com/gradle/actions/tree/main/wrapper-validation) for up-to-date documentation for `gradle/actions/wrapper-validation`.
|
|
||||||
|
|
||||||
# Gradle Wrapper Validation Action
|
# Gradle Wrapper Validation Action
|
||||||
|
|
||||||
This action validates the checksums of _all_ [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) JAR files present in the repository and fails if any unknown Gradle Wrapper JAR files are found.
|
This action validates the checksums of [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) JAR files present in the source tree and fails if unknown Gradle Wrapper JAR files are found.
|
||||||
|
|
||||||
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
|
## The Gradle Wrapper Problem in Open Source
|
||||||
|
|
||||||
### Example workflow
|
The `gradle-wrapper.jar` is a binary blob of executable code that is checked into nearly
|
||||||
|
[2.8 Million GitHub Repositories](https://github.com/search?l=&q=filename%3Agradle-wrapper.jar&type=Code).
|
||||||
|
|
||||||
|
Searching across GitHub you can find many pull requests (PRs) with helpful titles like 'Update to Gradle xxx'.
|
||||||
|
Many of these PRs are contributed by individuals outside of the organization maintaining the project.
|
||||||
|
|
||||||
|
Many maintainers are incredibly grateful for these kinds of contributions as it takes an item off of their backlog.
|
||||||
|
We assume that most maintainers do not consider the security implications of accepting the Gradle Wrapper binary from external contributors.
|
||||||
|
There is a certain amount of blind trust open source maintainers have.
|
||||||
|
Further compounding the issue is that maintainers are most often greeted in these PRs with a diff to the `gradle-wrapper.jar` that looks like this.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A fairly simple social engineering supply chain attack against open source would be contribute a helpful “Updated to Gradle xxx” PR that contains malicious code hidden inside this binary JAR.
|
||||||
|
A malicious `gradle-wrapper.jar` could execute, download, or install arbitrary code while otherwise behaving like a completely normal `gradle-wrapper.jar`.
|
||||||
|
|
||||||
|
## Solution
|
||||||
|
|
||||||
|
We have created a simple GitHub Action that can be applied to any GitHub repository.
|
||||||
|
This GitHub Action will do one simple task:
|
||||||
|
verify that any and all `gradle-wrapper.jar` files in the repository match the SHA-256 checksums of any of our official releases.
|
||||||
|
|
||||||
|
If any are found that do not match the SHA-256 checksums of our official releases, the action will fail.
|
||||||
|
|
||||||
|
Additionally, the action will find and SHA-256 hash all
|
||||||
|
[homoglyph](https://en.wikipedia.org/wiki/Homoglyph)
|
||||||
|
variants of files named `gradle-wrapper.jar`,
|
||||||
|
for example a file named `gradlе-wrapper.jar` (which uses a Cyrillic `е` instead of `e`).
|
||||||
|
The goal is to prevent homoglyph attacks which may be very difficult to spot in a GitHub diff.
|
||||||
|
We created an example [Homoglyph attack PR here](https://github.com/JLLeitschuh/playframework/pull/1/files).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Add to an existing Workflow
|
||||||
|
|
||||||
|
Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
uses: gradle/wrapper-validation-action@v1
|
||||||
|
```
|
||||||
|
|
||||||
|
### Add a new dedicated Workflow
|
||||||
|
|
||||||
|
Here's a sample complete workflow you can add to your repositories:
|
||||||
|
|
||||||
|
**`.github/workflows/gradle-wrapper-validation.yml`**
|
||||||
```yaml
|
```yaml
|
||||||
name: "Validate Gradle Wrapper"
|
name: "Validate Gradle Wrapper"
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
@ -31,11 +63,48 @@ jobs:
|
|||||||
name: "Validation"
|
name: "Validation"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: gradle/wrapper-validation-action@v3
|
- uses: gradle/wrapper-validation-action@v1
|
||||||
```
|
```
|
||||||
|
|
||||||
As of `v3`, the `gradle/wrapper-validation-action` action delegates to `gradle/actions/wrapper-validation` with the same version.
|
## Contributing to an external GitHub Repository
|
||||||
Configuration and usage of these actions is identical for releases with the same version number.
|
|
||||||
|
|
||||||
See the [full wrapper-validation documentation](https://github.com/gradle/actions/tree/main/wrapper-validation) for more details.
|
Since [GitHub Actions](https://github.com/features/actions)
|
||||||
|
are completely free for open source projects and are automatically enabled on almost all projects,
|
||||||
|
adding this check to a project's build is as simple as contributing a PR.
|
||||||
|
Enabling the check requires no overhead on behalf of the project maintainer beyond merging the action.
|
||||||
|
|
||||||
|
You can add this action to your favorite Gradle based project without checking out their source locally via the
|
||||||
|
GitHub Web UI thanks to the 'Create new file' button.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Simply add a new file named `.github/workflows/gradle-wrapper-validation.yml` with the contents mentioned above.
|
||||||
|
|
||||||
|
We recommend the message commit contents of:
|
||||||
|
- Title: `Official Gradle Wrapper Validation Action`
|
||||||
|
- Body (at minimum): `See: https://github.com/gradle/wrapper-validation-action`
|
||||||
|
|
||||||
|
From there, you can easily follow the rest of the prompts to create a Pull Request against the project.
|
||||||
|
|
||||||
|
## Reporting Failures
|
||||||
|
|
||||||
|
If this GitHub action fails because a `gradle-wrapper.jar` doesn't match one of our published SHA-256 checksums,
|
||||||
|
we highly recommend that you reach out to us at [security@gradle.com](mailto:security@gradle.com).
|
||||||
|
|
||||||
|
If you're curious and want to explore what the differences are between the `gradle-wrapper.jar` in your possession
|
||||||
|
and one of our valid release, you can compare them using this online utility: [DiffScope](https://try.diffoscope.org/).
|
||||||
|
Regardless of what you find, we still kindly request that you reach out to us and let us know about any issues you encountered.
|
||||||
|
|
||||||
|
|
||||||
|
**Note:** When _initially_ applying this action to your project,
|
||||||
|
if your `gradle-wrapper.jar` was generated by Gradle 3.3 to 4.0, the check will fail.
|
||||||
|
This is because these `gradle-wrapper.jar` versions were dynamically generated by Gradle in a non-reproducible manner.
|
||||||
|
As such, it's not possible to verify the `gradle-wrapper.jar` for those versions are legitimate using a hash comparison.
|
||||||
|
If the Gradle version in use is out of this range it is possible that your Wrapper JAR is out of sync.
|
||||||
|
To fix this run `./gradlew wrapper`. If the Gradle version in use is in the problematic range, you should consider upgrading.
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
To learn more about verifying the Gradle Wrapper JAR locally, see our
|
||||||
|
[guide on the topic](https://docs.gradle.org/current/userguide/gradle_wrapper.html#wrapper_checksum_verification).
|
||||||
|
14
RELEASING.md
Normal file
14
RELEASING.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Release
|
||||||
|
|
||||||
|
* starting on `master`
|
||||||
|
* `npm run all`
|
||||||
|
* `git checkout releases/v1`
|
||||||
|
* `git merge master`
|
||||||
|
* `npm prune --production`
|
||||||
|
* `git add -f node_modules`
|
||||||
|
* if changed dependencies `git commit -m Dependencies && git push`
|
||||||
|
* `git tag v1.0.x && git push --tags` with the actual version number
|
||||||
|
* `git tag --delete v1 && git push --delete origin v1 && git tag v1 && git push --tags`
|
||||||
|
* go to https://github.com/gradle/wrapper-validation-action/releases
|
||||||
|
* edit and publish the now drafted `v1` release
|
||||||
|
* create a new release from the new full version number `v1.0.x`, list the fixed issues and publish the release
|
6
__tests__/checksums.test.ts
Normal file
6
__tests__/checksums.test.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import * as checksums from '../src/checksums'
|
||||||
|
|
||||||
|
test('fetches wrapper jars checksums', async () => {
|
||||||
|
const validChecksums = await checksums.fetchValidChecksums(false)
|
||||||
|
expect(validChecksums.length).toBeGreaterThan(10)
|
||||||
|
})
|
11
__tests__/find.test.ts
Normal file
11
__tests__/find.test.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import * as path from 'path'
|
||||||
|
import * as find from '../src/find'
|
||||||
|
|
||||||
|
test('finds test data wrapper jars', async () => {
|
||||||
|
const repoRoot = path.resolve('.')
|
||||||
|
const wrapperJars = await find.findWrapperJars(repoRoot)
|
||||||
|
expect(wrapperJars.length).toBe(3)
|
||||||
|
expect(wrapperJars).toContain('__tests__/data/valid/gradle-wrapper.jar')
|
||||||
|
expect(wrapperJars).toContain('__tests__/data/invalid/gradle-wrapper.jar')
|
||||||
|
expect(wrapperJars).toContain('__tests__/data/invalid/gradlе-wrapper.jar') // homoglyph
|
||||||
|
})
|
11
__tests__/hash.test.ts
Normal file
11
__tests__/hash.test.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import * as path from 'path'
|
||||||
|
import * as hash from '../src/hash'
|
||||||
|
|
||||||
|
test('can sha256 files', async () => {
|
||||||
|
const sha = await hash.sha256File(
|
||||||
|
path.resolve('__tests__/data/invalid/gradle-wrapper.jar')
|
||||||
|
)
|
||||||
|
expect(sha).toEqual(
|
||||||
|
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
||||||
|
)
|
||||||
|
})
|
71
__tests__/validate.test.ts
Normal file
71
__tests__/validate.test.ts
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
import * as path from 'path'
|
||||||
|
import * as validate from '../src/validate'
|
||||||
|
|
||||||
|
const baseDir = path.resolve('.')
|
||||||
|
|
||||||
|
test('succeeds if all found wrapper jars are valid', async () => {
|
||||||
|
const result = await validate.findInvalidWrapperJars(baseDir, 3, false, [
|
||||||
|
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
||||||
|
])
|
||||||
|
|
||||||
|
expect(result.isValid()).toBe(true)
|
||||||
|
|
||||||
|
expect(result.toDisplayString()).toBe(
|
||||||
|
'✓ Found known Gradle Wrapper JAR files:\n' +
|
||||||
|
' e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 __tests__/data/invalid/gradle-wrapper.jar\n' +
|
||||||
|
' e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 __tests__/data/invalid/gradlе-wrapper.jar\n' + // homoglyph
|
||||||
|
' 3888c76faa032ea8394b8a54e04ce2227ab1f4be64f65d450f8509fe112d38ce __tests__/data/valid/gradle-wrapper.jar'
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
test('fails if invalid wrapper jars are found', async () => {
|
||||||
|
const result = await validate.findInvalidWrapperJars(baseDir, 3, false, [])
|
||||||
|
|
||||||
|
expect(result.isValid()).toBe(false)
|
||||||
|
|
||||||
|
expect(result.valid).toEqual([
|
||||||
|
new validate.WrapperJar(
|
||||||
|
'__tests__/data/valid/gradle-wrapper.jar',
|
||||||
|
'3888c76faa032ea8394b8a54e04ce2227ab1f4be64f65d450f8509fe112d38ce'
|
||||||
|
)
|
||||||
|
])
|
||||||
|
|
||||||
|
expect(result.invalid).toEqual([
|
||||||
|
new validate.WrapperJar(
|
||||||
|
'__tests__/data/invalid/gradle-wrapper.jar',
|
||||||
|
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
||||||
|
),
|
||||||
|
new validate.WrapperJar(
|
||||||
|
'__tests__/data/invalid/gradlе-wrapper.jar', // homoglyph
|
||||||
|
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
||||||
|
)
|
||||||
|
])
|
||||||
|
|
||||||
|
expect(result.toDisplayString()).toBe(
|
||||||
|
'✗ Found unknown Gradle Wrapper JAR files:\n' +
|
||||||
|
' e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 __tests__/data/invalid/gradle-wrapper.jar\n' +
|
||||||
|
' e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 __tests__/data/invalid/gradlе-wrapper.jar\n' + // homoglyph
|
||||||
|
'✓ Found known Gradle Wrapper JAR files:\n' +
|
||||||
|
' 3888c76faa032ea8394b8a54e04ce2227ab1f4be64f65d450f8509fe112d38ce __tests__/data/valid/gradle-wrapper.jar'
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
test('fails if not enough wrapper jars are found', async () => {
|
||||||
|
const result = await validate.findInvalidWrapperJars(baseDir, 4, false, [])
|
||||||
|
|
||||||
|
expect(result.isValid()).toBe(false)
|
||||||
|
|
||||||
|
expect(result.errors).toEqual([
|
||||||
|
'Expected to find at least 4 Gradle Wrapper JARs but got only 3'
|
||||||
|
])
|
||||||
|
|
||||||
|
expect(result.toDisplayString()).toBe(
|
||||||
|
'✗ Found unknown Gradle Wrapper JAR files:\n' +
|
||||||
|
' e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 __tests__/data/invalid/gradle-wrapper.jar\n' +
|
||||||
|
' e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 __tests__/data/invalid/gradlе-wrapper.jar\n' + // homoglyph
|
||||||
|
'✗ Other validation errors:\n' +
|
||||||
|
' Expected to find at least 4 Gradle Wrapper JARs but got only 3\n' +
|
||||||
|
'✓ Found known Gradle Wrapper JAR files:\n' +
|
||||||
|
' 3888c76faa032ea8394b8a54e04ce2227ab1f4be64f65d450f8509fe112d38ce __tests__/data/valid/gradle-wrapper.jar'
|
||||||
|
)
|
||||||
|
})
|
24
action.yml
24
action.yml
@ -4,35 +4,21 @@ author: 'Gradle'
|
|||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
min-wrapper-count:
|
min-wrapper-count:
|
||||||
description: 'Minimum number expected gradle-wrapper.jar files found in the repository. Non-negative number. Higher number is useful in monorepos where each project might have their own wrapper.'
|
description: 'Minimum expected wrapper JAR files'
|
||||||
required: false
|
required: false
|
||||||
default: '1'
|
default: '1'
|
||||||
allow-snapshots:
|
allow-snapshots:
|
||||||
description: 'Allow Gradle snapshot versions during checksum verification. Boolean, true or false.'
|
description: 'Allow snapshot Gradle versions'
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
default: 'false'
|
||||||
allow-checksums:
|
allow-checksums:
|
||||||
description: 'Accept arbitrary user-defined checksums as valid. Comma separated list of SHA256 checksums (lowercase hex).'
|
description: 'Allow arbitrary checksums, comma separated'
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
|
|
||||||
outputs:
|
|
||||||
failed-wrapper:
|
|
||||||
description: 'The path of the Gradle Wrapper(s) JAR that failed validation. Path is a platform-dependent relative path to git repository root. Multiple paths are separated by a | character.'
|
|
||||||
value: ${{ steps.wrapper-validation.outputs.failed-wrapper }}
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: 'node12'
|
||||||
steps:
|
main: 'dist/index.js'
|
||||||
- name: Wrapper Validation
|
|
||||||
id: wrapper-validation
|
|
||||||
uses: gradle/actions/wrapper-validation@v3.5.0
|
|
||||||
with:
|
|
||||||
min-wrapper-count: ${{ inputs.min-wrapper-count }}
|
|
||||||
allow-snapshots: ${{ inputs.allow-snapshots }}
|
|
||||||
allow-checksums: ${{ inputs.allow-checksums }}
|
|
||||||
env:
|
|
||||||
GRADLE_ACTION_ID: gradle/wrapper-validation-action
|
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
icon: 'shield'
|
icon: 'shield'
|
||||||
|
2468
dist/index.js
vendored
Normal file
2468
dist/index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
12
jest.config.js
Normal file
12
jest.config.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
module.exports = {
|
||||||
|
clearMocks: true,
|
||||||
|
moduleFileExtensions: ['js', 'ts', 'json'],
|
||||||
|
testEnvironment: 'node',
|
||||||
|
testMatch: ['**/*.test.ts'],
|
||||||
|
testRunner: 'jest-circus/runner',
|
||||||
|
transform: {
|
||||||
|
'^.+\\.ts$': 'ts-jest'
|
||||||
|
},
|
||||||
|
verbose: true,
|
||||||
|
setupFilesAfterEnv: ['./jest.setup.js']
|
||||||
|
}
|
1
jest.setup.js
Normal file
1
jest.setup.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
jest.setTimeout(10000) // in milliseconds
|
140
node_modules/@actions/core/README.md
generated
vendored
Normal file
140
node_modules/@actions/core/README.md
generated
vendored
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
# `@actions/core`
|
||||||
|
|
||||||
|
> Core functions for setting results, logging, registering secrets and exporting variables across actions
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Import the package
|
||||||
|
|
||||||
|
```js
|
||||||
|
// javascript
|
||||||
|
const core = require('@actions/core');
|
||||||
|
|
||||||
|
// typescript
|
||||||
|
import * as core from '@actions/core';
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Inputs/Outputs
|
||||||
|
|
||||||
|
Action inputs can be read with `getInput`. Outputs can be set with `setOutput` which makes them available to be mapped into inputs of other actions to ensure they are decoupled.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const myInput = core.getInput('inputName', { required: true });
|
||||||
|
|
||||||
|
core.setOutput('outputKey', 'outputVal');
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Exporting variables
|
||||||
|
|
||||||
|
Since each step runs in a separate process, you can use `exportVariable` to add it to this step and future steps environment blocks.
|
||||||
|
|
||||||
|
```js
|
||||||
|
core.exportVariable('envVar', 'Val');
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Setting a secret
|
||||||
|
|
||||||
|
Setting a secret registers the secret with the runner to ensure it is masked in logs.
|
||||||
|
|
||||||
|
```js
|
||||||
|
core.setSecret('myPassword');
|
||||||
|
```
|
||||||
|
|
||||||
|
#### PATH Manipulation
|
||||||
|
|
||||||
|
To make a tool's path available in the path for the remainder of the job (without altering the machine or containers state), use `addPath`. The runner will prepend the path given to the jobs PATH.
|
||||||
|
|
||||||
|
```js
|
||||||
|
core.addPath('/path/to/mytool');
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Exit codes
|
||||||
|
|
||||||
|
You should use this library to set the failing exit code for your action. If status is not set and the script runs to completion, that will lead to a success.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const core = require('@actions/core');
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Do stuff
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
// setFailed logs the message and sets a failing exit code
|
||||||
|
core.setFailed(`Action failed with error ${err}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
Note that `setNeutral` is not yet implemented in actions V2 but equivalent functionality is being planned.
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Logging
|
||||||
|
|
||||||
|
Finally, this library provides some utilities for logging. Note that debug logging is hidden from the logs by default. This behavior can be toggled by enabling the [Step Debug Logs](../../docs/action-debugging.md#step-debug-logs).
|
||||||
|
|
||||||
|
```js
|
||||||
|
const core = require('@actions/core');
|
||||||
|
|
||||||
|
const myInput = core.getInput('input');
|
||||||
|
try {
|
||||||
|
core.debug('Inside try block');
|
||||||
|
|
||||||
|
if (!myInput) {
|
||||||
|
core.warning('myInput was not set');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do stuff
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
core.error(`Error ${err}, action may still succeed though`);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
This library can also wrap chunks of output in foldable groups.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const core = require('@actions/core')
|
||||||
|
|
||||||
|
// Manually wrap output
|
||||||
|
core.startGroup('Do some function')
|
||||||
|
doSomeFunction()
|
||||||
|
core.endGroup()
|
||||||
|
|
||||||
|
// Wrap an asynchronous function call
|
||||||
|
const result = await core.group('Do something async', async () => {
|
||||||
|
const response = await doSomeHTTPRequest()
|
||||||
|
return response
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Action state
|
||||||
|
|
||||||
|
You can use this library to save state and get state for sharing information between a given wrapper action:
|
||||||
|
|
||||||
|
**action.yml**
|
||||||
|
```yaml
|
||||||
|
name: 'Wrapper action sample'
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
default: 'GitHub'
|
||||||
|
runs:
|
||||||
|
using: 'node12'
|
||||||
|
main: 'main.js'
|
||||||
|
post: 'cleanup.js'
|
||||||
|
```
|
||||||
|
|
||||||
|
In action's `main.js`:
|
||||||
|
|
||||||
|
```js
|
||||||
|
const core = require('@actions/core');
|
||||||
|
|
||||||
|
core.saveState("pidToKill", 12345);
|
||||||
|
```
|
||||||
|
|
||||||
|
In action's `cleanup.js`:
|
||||||
|
```js
|
||||||
|
const core = require('@actions/core');
|
||||||
|
|
||||||
|
var pid = core.getState("pidToKill");
|
||||||
|
|
||||||
|
process.kill(pid);
|
||||||
|
```
|
16
node_modules/@actions/core/lib/command.d.ts
generated
vendored
Normal file
16
node_modules/@actions/core/lib/command.d.ts
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
interface CommandProperties {
|
||||||
|
[key: string]: string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Commands
|
||||||
|
*
|
||||||
|
* Command Format:
|
||||||
|
* ##[name key=value;key=value]message
|
||||||
|
*
|
||||||
|
* Examples:
|
||||||
|
* ##[warning]This is the user warning message
|
||||||
|
* ##[set-secret name=mypassword]definitelyNotAPassword!
|
||||||
|
*/
|
||||||
|
export declare function issueCommand(command: string, properties: CommandProperties, message: string): void;
|
||||||
|
export declare function issue(name: string, message?: string): void;
|
||||||
|
export {};
|
66
node_modules/@actions/core/lib/command.js
generated
vendored
Normal file
66
node_modules/@actions/core/lib/command.js
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const os = require("os");
|
||||||
|
/**
|
||||||
|
* Commands
|
||||||
|
*
|
||||||
|
* Command Format:
|
||||||
|
* ##[name key=value;key=value]message
|
||||||
|
*
|
||||||
|
* Examples:
|
||||||
|
* ##[warning]This is the user warning message
|
||||||
|
* ##[set-secret name=mypassword]definitelyNotAPassword!
|
||||||
|
*/
|
||||||
|
function issueCommand(command, properties, message) {
|
||||||
|
const cmd = new Command(command, properties, message);
|
||||||
|
process.stdout.write(cmd.toString() + os.EOL);
|
||||||
|
}
|
||||||
|
exports.issueCommand = issueCommand;
|
||||||
|
function issue(name, message = '') {
|
||||||
|
issueCommand(name, {}, message);
|
||||||
|
}
|
||||||
|
exports.issue = issue;
|
||||||
|
const CMD_STRING = '::';
|
||||||
|
class Command {
|
||||||
|
constructor(command, properties, message) {
|
||||||
|
if (!command) {
|
||||||
|
command = 'missing.command';
|
||||||
|
}
|
||||||
|
this.command = command;
|
||||||
|
this.properties = properties;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
toString() {
|
||||||
|
let cmdStr = CMD_STRING + this.command;
|
||||||
|
if (this.properties && Object.keys(this.properties).length > 0) {
|
||||||
|
cmdStr += ' ';
|
||||||
|
for (const key in this.properties) {
|
||||||
|
if (this.properties.hasOwnProperty(key)) {
|
||||||
|
const val = this.properties[key];
|
||||||
|
if (val) {
|
||||||
|
// safely append the val - avoid blowing up when attempting to
|
||||||
|
// call .replace() if message is not a string for some reason
|
||||||
|
cmdStr += `${key}=${escape(`${val || ''}`)},`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cmdStr += CMD_STRING;
|
||||||
|
// safely append the message - avoid blowing up when attempting to
|
||||||
|
// call .replace() if message is not a string for some reason
|
||||||
|
const message = `${this.message || ''}`;
|
||||||
|
cmdStr += escapeData(message);
|
||||||
|
return cmdStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function escapeData(s) {
|
||||||
|
return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A');
|
||||||
|
}
|
||||||
|
function escape(s) {
|
||||||
|
return s
|
||||||
|
.replace(/\r/g, '%0D')
|
||||||
|
.replace(/\n/g, '%0A')
|
||||||
|
.replace(/]/g, '%5D')
|
||||||
|
.replace(/;/g, '%3B');
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=command.js.map
|
1
node_modules/@actions/core/lib/command.js.map
generated
vendored
Normal file
1
node_modules/@actions/core/lib/command.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;AAAA,yBAAwB;AAQxB;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAe;IAEf,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,UAAkB,EAAE;IACtD,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,QAAQ;QACN,IAAI,MAAM,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAA;QAEtC,IAAI,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9D,MAAM,IAAI,GAAG,CAAA;YACb,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACvC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;oBAChC,IAAI,GAAG,EAAE;wBACP,8DAA8D;wBAC9D,6DAA6D;wBAC7D,MAAM,IAAI,GAAG,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE,EAAE,CAAC,GAAG,CAAA;qBAC9C;iBACF;aACF;SACF;QAED,MAAM,IAAI,UAAU,CAAA;QAEpB,kEAAkE;QAClE,6DAA6D;QAC7D,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,CAAA;QACvC,MAAM,IAAI,UAAU,CAAC,OAAO,CAAC,CAAA;QAE7B,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AACtD,CAAC;AAED,SAAS,MAAM,CAAC,CAAS;IACvB,OAAO,CAAC;SACL,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"}
|
112
node_modules/@actions/core/lib/core.d.ts
generated
vendored
Normal file
112
node_modules/@actions/core/lib/core.d.ts
generated
vendored
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
/**
|
||||||
|
* Interface for getInput options
|
||||||
|
*/
|
||||||
|
export interface InputOptions {
|
||||||
|
/** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */
|
||||||
|
required?: boolean;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* The code to exit an action
|
||||||
|
*/
|
||||||
|
export declare enum ExitCode {
|
||||||
|
/**
|
||||||
|
* A code indicating that the action was successful
|
||||||
|
*/
|
||||||
|
Success = 0,
|
||||||
|
/**
|
||||||
|
* A code indicating that the action was a failure
|
||||||
|
*/
|
||||||
|
Failure = 1
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Sets env variable for this action and future actions in the job
|
||||||
|
* @param name the name of the variable to set
|
||||||
|
* @param val the value of the variable
|
||||||
|
*/
|
||||||
|
export declare function exportVariable(name: string, val: string): void;
|
||||||
|
/**
|
||||||
|
* Registers a secret which will get masked from logs
|
||||||
|
* @param secret value of the secret
|
||||||
|
*/
|
||||||
|
export declare function setSecret(secret: string): void;
|
||||||
|
/**
|
||||||
|
* Prepends inputPath to the PATH (for this action and future actions)
|
||||||
|
* @param inputPath
|
||||||
|
*/
|
||||||
|
export declare function addPath(inputPath: string): void;
|
||||||
|
/**
|
||||||
|
* Gets the value of an input. The value is also trimmed.
|
||||||
|
*
|
||||||
|
* @param name name of the input to get
|
||||||
|
* @param options optional. See InputOptions.
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
|
export declare function getInput(name: string, options?: InputOptions): string;
|
||||||
|
/**
|
||||||
|
* Sets the value of an output.
|
||||||
|
*
|
||||||
|
* @param name name of the output to set
|
||||||
|
* @param value value to store
|
||||||
|
*/
|
||||||
|
export declare function setOutput(name: string, value: string): void;
|
||||||
|
/**
|
||||||
|
* Sets the action status to failed.
|
||||||
|
* When the action exits it will be with an exit code of 1
|
||||||
|
* @param message add error issue message
|
||||||
|
*/
|
||||||
|
export declare function setFailed(message: string): void;
|
||||||
|
/**
|
||||||
|
* Writes debug message to user log
|
||||||
|
* @param message debug message
|
||||||
|
*/
|
||||||
|
export declare function debug(message: string): void;
|
||||||
|
/**
|
||||||
|
* Adds an error issue
|
||||||
|
* @param message error issue message
|
||||||
|
*/
|
||||||
|
export declare function error(message: string): void;
|
||||||
|
/**
|
||||||
|
* Adds an warning issue
|
||||||
|
* @param message warning issue message
|
||||||
|
*/
|
||||||
|
export declare function warning(message: string): void;
|
||||||
|
/**
|
||||||
|
* Writes info to log with console.log.
|
||||||
|
* @param message info message
|
||||||
|
*/
|
||||||
|
export declare function info(message: string): void;
|
||||||
|
/**
|
||||||
|
* Begin an output group.
|
||||||
|
*
|
||||||
|
* Output until the next `groupEnd` will be foldable in this group
|
||||||
|
*
|
||||||
|
* @param name The name of the output group
|
||||||
|
*/
|
||||||
|
export declare function startGroup(name: string): void;
|
||||||
|
/**
|
||||||
|
* End an output group.
|
||||||
|
*/
|
||||||
|
export declare function endGroup(): void;
|
||||||
|
/**
|
||||||
|
* Wrap an asynchronous function call in a group.
|
||||||
|
*
|
||||||
|
* Returns the same type as the function itself.
|
||||||
|
*
|
||||||
|
* @param name The name of the group
|
||||||
|
* @param fn The function to wrap in the group
|
||||||
|
*/
|
||||||
|
export declare function group<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
||||||
|
/**
|
||||||
|
* Saves state for current action, the state can only be retrieved by this action's post job execution.
|
||||||
|
*
|
||||||
|
* @param name name of the state to store
|
||||||
|
* @param value value to store
|
||||||
|
*/
|
||||||
|
export declare function saveState(name: string, value: string): void;
|
||||||
|
/**
|
||||||
|
* Gets the value of an state set by this action's main execution.
|
||||||
|
*
|
||||||
|
* @param name name of the state to get
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
|
export declare function getState(name: string): string;
|
195
node_modules/@actions/core/lib/core.js
generated
vendored
Normal file
195
node_modules/@actions/core/lib/core.js
generated
vendored
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const command_1 = require("./command");
|
||||||
|
const os = require("os");
|
||||||
|
const path = require("path");
|
||||||
|
/**
|
||||||
|
* The code to exit an action
|
||||||
|
*/
|
||||||
|
var ExitCode;
|
||||||
|
(function (ExitCode) {
|
||||||
|
/**
|
||||||
|
* A code indicating that the action was successful
|
||||||
|
*/
|
||||||
|
ExitCode[ExitCode["Success"] = 0] = "Success";
|
||||||
|
/**
|
||||||
|
* A code indicating that the action was a failure
|
||||||
|
*/
|
||||||
|
ExitCode[ExitCode["Failure"] = 1] = "Failure";
|
||||||
|
})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));
|
||||||
|
//-----------------------------------------------------------------------
|
||||||
|
// Variables
|
||||||
|
//-----------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* Sets env variable for this action and future actions in the job
|
||||||
|
* @param name the name of the variable to set
|
||||||
|
* @param val the value of the variable
|
||||||
|
*/
|
||||||
|
function exportVariable(name, val) {
|
||||||
|
process.env[name] = val;
|
||||||
|
command_1.issueCommand('set-env', { name }, val);
|
||||||
|
}
|
||||||
|
exports.exportVariable = exportVariable;
|
||||||
|
/**
|
||||||
|
* Registers a secret which will get masked from logs
|
||||||
|
* @param secret value of the secret
|
||||||
|
*/
|
||||||
|
function setSecret(secret) {
|
||||||
|
command_1.issueCommand('add-mask', {}, secret);
|
||||||
|
}
|
||||||
|
exports.setSecret = setSecret;
|
||||||
|
/**
|
||||||
|
* Prepends inputPath to the PATH (for this action and future actions)
|
||||||
|
* @param inputPath
|
||||||
|
*/
|
||||||
|
function addPath(inputPath) {
|
||||||
|
command_1.issueCommand('add-path', {}, inputPath);
|
||||||
|
process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
|
||||||
|
}
|
||||||
|
exports.addPath = addPath;
|
||||||
|
/**
|
||||||
|
* Gets the value of an input. The value is also trimmed.
|
||||||
|
*
|
||||||
|
* @param name name of the input to get
|
||||||
|
* @param options optional. See InputOptions.
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
|
function getInput(name, options) {
|
||||||
|
const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';
|
||||||
|
if (options && options.required && !val) {
|
||||||
|
throw new Error(`Input required and not supplied: ${name}`);
|
||||||
|
}
|
||||||
|
return val.trim();
|
||||||
|
}
|
||||||
|
exports.getInput = getInput;
|
||||||
|
/**
|
||||||
|
* Sets the value of an output.
|
||||||
|
*
|
||||||
|
* @param name name of the output to set
|
||||||
|
* @param value value to store
|
||||||
|
*/
|
||||||
|
function setOutput(name, value) {
|
||||||
|
command_1.issueCommand('set-output', { name }, value);
|
||||||
|
}
|
||||||
|
exports.setOutput = setOutput;
|
||||||
|
//-----------------------------------------------------------------------
|
||||||
|
// Results
|
||||||
|
//-----------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* Sets the action status to failed.
|
||||||
|
* When the action exits it will be with an exit code of 1
|
||||||
|
* @param message add error issue message
|
||||||
|
*/
|
||||||
|
function setFailed(message) {
|
||||||
|
process.exitCode = ExitCode.Failure;
|
||||||
|
error(message);
|
||||||
|
}
|
||||||
|
exports.setFailed = setFailed;
|
||||||
|
//-----------------------------------------------------------------------
|
||||||
|
// Logging Commands
|
||||||
|
//-----------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* Writes debug message to user log
|
||||||
|
* @param message debug message
|
||||||
|
*/
|
||||||
|
function debug(message) {
|
||||||
|
command_1.issueCommand('debug', {}, message);
|
||||||
|
}
|
||||||
|
exports.debug = debug;
|
||||||
|
/**
|
||||||
|
* Adds an error issue
|
||||||
|
* @param message error issue message
|
||||||
|
*/
|
||||||
|
function error(message) {
|
||||||
|
command_1.issue('error', message);
|
||||||
|
}
|
||||||
|
exports.error = error;
|
||||||
|
/**
|
||||||
|
* Adds an warning issue
|
||||||
|
* @param message warning issue message
|
||||||
|
*/
|
||||||
|
function warning(message) {
|
||||||
|
command_1.issue('warning', message);
|
||||||
|
}
|
||||||
|
exports.warning = warning;
|
||||||
|
/**
|
||||||
|
* Writes info to log with console.log.
|
||||||
|
* @param message info message
|
||||||
|
*/
|
||||||
|
function info(message) {
|
||||||
|
process.stdout.write(message + os.EOL);
|
||||||
|
}
|
||||||
|
exports.info = info;
|
||||||
|
/**
|
||||||
|
* Begin an output group.
|
||||||
|
*
|
||||||
|
* Output until the next `groupEnd` will be foldable in this group
|
||||||
|
*
|
||||||
|
* @param name The name of the output group
|
||||||
|
*/
|
||||||
|
function startGroup(name) {
|
||||||
|
command_1.issue('group', name);
|
||||||
|
}
|
||||||
|
exports.startGroup = startGroup;
|
||||||
|
/**
|
||||||
|
* End an output group.
|
||||||
|
*/
|
||||||
|
function endGroup() {
|
||||||
|
command_1.issue('endgroup');
|
||||||
|
}
|
||||||
|
exports.endGroup = endGroup;
|
||||||
|
/**
|
||||||
|
* Wrap an asynchronous function call in a group.
|
||||||
|
*
|
||||||
|
* Returns the same type as the function itself.
|
||||||
|
*
|
||||||
|
* @param name The name of the group
|
||||||
|
* @param fn The function to wrap in the group
|
||||||
|
*/
|
||||||
|
function group(name, fn) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
startGroup(name);
|
||||||
|
let result;
|
||||||
|
try {
|
||||||
|
result = yield fn();
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
endGroup();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.group = group;
|
||||||
|
//-----------------------------------------------------------------------
|
||||||
|
// Wrapper action state
|
||||||
|
//-----------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* Saves state for current action, the state can only be retrieved by this action's post job execution.
|
||||||
|
*
|
||||||
|
* @param name name of the state to store
|
||||||
|
* @param value value to store
|
||||||
|
*/
|
||||||
|
function saveState(name, value) {
|
||||||
|
command_1.issueCommand('save-state', { name }, value);
|
||||||
|
}
|
||||||
|
exports.saveState = saveState;
|
||||||
|
/**
|
||||||
|
* Gets the value of an state set by this action's main execution.
|
||||||
|
*
|
||||||
|
* @param name name of the state to get
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
|
function getState(name) {
|
||||||
|
return process.env[`STATE_${name}`] || '';
|
||||||
|
}
|
||||||
|
exports.getState = getState;
|
||||||
|
//# sourceMappingURL=core.js.map
|
1
node_modules/@actions/core/lib/core.js.map
generated
vendored
Normal file
1
node_modules/@actions/core/lib/core.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uCAA6C;AAE7C,yBAAwB;AACxB,6BAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACvB,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAHD,wCAGC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;AACtC,CAAC;AAFD,8BAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;IACvC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AAHD,0BAGC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAsB;IAC3D,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;IACrE,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAA;KAC5D;IAED,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC;AARD,4BAQC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED,yEAAyE;AACzE,UAAU;AACV,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAe;IACvC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAA;IACnC,KAAK,CAAC,OAAO,CAAC,CAAA;AAChB,CAAC;AAHD,8BAGC;AAED,yEAAyE;AACzE,mBAAmB;AACnB,yEAAyE;AAEzE;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,sBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACpC,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,eAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;AACzB,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,OAAe;IACrC,eAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;AAC3B,CAAC;AAFD,0BAEC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,oBAEC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,eAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC;AAED,yEAAyE;AACzE,uBAAuB;AACvB,yEAAyE;AAEzE;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC"}
|
67
node_modules/@actions/core/package.json
generated
vendored
Normal file
67
node_modules/@actions/core/package.json
generated
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"@actions/core@1.2.0",
|
||||||
|
"/Users/paul/src/gradle-related/gradle-wrapper-check"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"_from": "@actions/core@1.2.0",
|
||||||
|
"_id": "@actions/core@1.2.0",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw==",
|
||||||
|
"_location": "/@actions/core",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "version",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "@actions/core@1.2.0",
|
||||||
|
"name": "@actions/core",
|
||||||
|
"escapedName": "@actions%2fcore",
|
||||||
|
"scope": "@actions",
|
||||||
|
"rawSpec": "1.2.0",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "1.2.0"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz",
|
||||||
|
"_spec": "1.2.0",
|
||||||
|
"_where": "/Users/paul/src/gradle-related/gradle-wrapper-check",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
|
},
|
||||||
|
"description": "Actions core lib",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^12.0.2"
|
||||||
|
},
|
||||||
|
"directories": {
|
||||||
|
"lib": "lib",
|
||||||
|
"test": "__tests__"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/actions/toolkit/tree/master/packages/core",
|
||||||
|
"keywords": [
|
||||||
|
"github",
|
||||||
|
"actions",
|
||||||
|
"core"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "lib/core.js",
|
||||||
|
"name": "@actions/core",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/actions/toolkit.git",
|
||||||
|
"directory": "packages/core"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: run tests from root\" && exit 1",
|
||||||
|
"tsc": "tsc"
|
||||||
|
},
|
||||||
|
"version": "1.2.0"
|
||||||
|
}
|
2
node_modules/tunnel/.npmignore
generated
vendored
Normal file
2
node_modules/tunnel/.npmignore
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/.idea
|
||||||
|
/node_modules
|
13
node_modules/tunnel/CHANGELOG.md
generated
vendored
Normal file
13
node_modules/tunnel/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
- 0.0.4 (2016/01/23)
|
||||||
|
- supported Node v0.12 or later.
|
||||||
|
|
||||||
|
- 0.0.3 (2014/01/20)
|
||||||
|
- fixed package.json
|
||||||
|
|
||||||
|
- 0.0.1 (2012/02/18)
|
||||||
|
- supported Node v0.6.x (0.6.11 or later).
|
||||||
|
|
||||||
|
- 0.0.0 (2012/02/11)
|
||||||
|
- first release.
|
21
node_modules/tunnel/LICENSE
generated
vendored
Normal file
21
node_modules/tunnel/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2012 Koichi Kobayashi
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
179
node_modules/tunnel/README.md
generated
vendored
Normal file
179
node_modules/tunnel/README.md
generated
vendored
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
# node-tunnel - HTTP/HTTPS Agents for tunneling proxies
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var tunnel = require('tunnel');
|
||||||
|
|
||||||
|
var tunnelingAgent = tunnel.httpsOverHttp({
|
||||||
|
proxy: {
|
||||||
|
host: 'localhost',
|
||||||
|
port: 3128
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var req = https.request({
|
||||||
|
host: 'example.com',
|
||||||
|
port: 443,
|
||||||
|
agent: tunnelingAgent
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
$ npm install tunnel
|
||||||
|
|
||||||
|
## Usages
|
||||||
|
|
||||||
|
### HTTP over HTTP tunneling
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var tunnelingAgent = tunnel.httpOverHttp({
|
||||||
|
maxSockets: poolSize, // Defaults to 5
|
||||||
|
|
||||||
|
proxy: { // Proxy settings
|
||||||
|
host: proxyHost, // Defaults to 'localhost'
|
||||||
|
port: proxyPort, // Defaults to 80
|
||||||
|
localAddress: localAddress, // Local interface if necessary
|
||||||
|
|
||||||
|
// Basic authorization for proxy server if necessary
|
||||||
|
proxyAuth: 'user:password',
|
||||||
|
|
||||||
|
// Header fields for proxy server if necessary
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Node'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var req = http.request({
|
||||||
|
host: 'example.com',
|
||||||
|
port: 80,
|
||||||
|
agent: tunnelingAgent
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### HTTPS over HTTP tunneling
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var tunnelingAgent = tunnel.httpsOverHttp({
|
||||||
|
maxSockets: poolSize, // Defaults to 5
|
||||||
|
|
||||||
|
// CA for origin server if necessary
|
||||||
|
ca: [ fs.readFileSync('origin-server-ca.pem')],
|
||||||
|
|
||||||
|
// Client certification for origin server if necessary
|
||||||
|
key: fs.readFileSync('origin-server-key.pem'),
|
||||||
|
cert: fs.readFileSync('origin-server-cert.pem'),
|
||||||
|
|
||||||
|
proxy: { // Proxy settings
|
||||||
|
host: proxyHost, // Defaults to 'localhost'
|
||||||
|
port: proxyPort, // Defaults to 80
|
||||||
|
localAddress: localAddress, // Local interface if necessary
|
||||||
|
|
||||||
|
// Basic authorization for proxy server if necessary
|
||||||
|
proxyAuth: 'user:password',
|
||||||
|
|
||||||
|
// Header fields for proxy server if necessary
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Node'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var req = https.request({
|
||||||
|
host: 'example.com',
|
||||||
|
port: 443,
|
||||||
|
agent: tunnelingAgent
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### HTTP over HTTPS tunneling
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var tunnelingAgent = tunnel.httpOverHttps({
|
||||||
|
maxSockets: poolSize, // Defaults to 5
|
||||||
|
|
||||||
|
proxy: { // Proxy settings
|
||||||
|
host: proxyHost, // Defaults to 'localhost'
|
||||||
|
port: proxyPort, // Defaults to 443
|
||||||
|
localAddress: localAddress, // Local interface if necessary
|
||||||
|
|
||||||
|
// Basic authorization for proxy server if necessary
|
||||||
|
proxyAuth: 'user:password',
|
||||||
|
|
||||||
|
// Header fields for proxy server if necessary
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Node'
|
||||||
|
},
|
||||||
|
|
||||||
|
// CA for proxy server if necessary
|
||||||
|
ca: [ fs.readFileSync('origin-server-ca.pem')],
|
||||||
|
|
||||||
|
// Server name for verification if necessary
|
||||||
|
servername: 'example.com',
|
||||||
|
|
||||||
|
// Client certification for proxy server if necessary
|
||||||
|
key: fs.readFileSync('origin-server-key.pem'),
|
||||||
|
cert: fs.readFileSync('origin-server-cert.pem'),
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var req = http.request({
|
||||||
|
host: 'example.com',
|
||||||
|
port: 80,
|
||||||
|
agent: tunnelingAgent
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### HTTPS over HTTPS tunneling
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var tunnelingAgent = tunnel.httpsOverHttps({
|
||||||
|
maxSockets: poolSize, // Defaults to 5
|
||||||
|
|
||||||
|
// CA for origin server if necessary
|
||||||
|
ca: [ fs.readFileSync('origin-server-ca.pem')],
|
||||||
|
|
||||||
|
// Client certification for origin server if necessary
|
||||||
|
key: fs.readFileSync('origin-server-key.pem'),
|
||||||
|
cert: fs.readFileSync('origin-server-cert.pem'),
|
||||||
|
|
||||||
|
proxy: { // Proxy settings
|
||||||
|
host: proxyHost, // Defaults to 'localhost'
|
||||||
|
port: proxyPort, // Defaults to 443
|
||||||
|
localAddress: localAddress, // Local interface if necessary
|
||||||
|
|
||||||
|
// Basic authorization for proxy server if necessary
|
||||||
|
proxyAuth: 'user:password',
|
||||||
|
|
||||||
|
// Header fields for proxy server if necessary
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Node'
|
||||||
|
}
|
||||||
|
|
||||||
|
// CA for proxy server if necessary
|
||||||
|
ca: [ fs.readFileSync('origin-server-ca.pem')],
|
||||||
|
|
||||||
|
// Server name for verification if necessary
|
||||||
|
servername: 'example.com',
|
||||||
|
|
||||||
|
// Client certification for proxy server if necessary
|
||||||
|
key: fs.readFileSync('origin-server-key.pem'),
|
||||||
|
cert: fs.readFileSync('origin-server-cert.pem'),
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var req = https.request({
|
||||||
|
host: 'example.com',
|
||||||
|
port: 443,
|
||||||
|
agent: tunnelingAgent
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## CONTRIBUTORS
|
||||||
|
* [Aleksis Brezas (abresas)](https://github.com/abresas)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE) license.
|
1
node_modules/tunnel/index.js
generated
vendored
Normal file
1
node_modules/tunnel/index.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
module.exports = require('./lib/tunnel');
|
247
node_modules/tunnel/lib/tunnel.js
generated
vendored
Normal file
247
node_modules/tunnel/lib/tunnel.js
generated
vendored
Normal file
@ -0,0 +1,247 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
var net = require('net');
|
||||||
|
var tls = require('tls');
|
||||||
|
var http = require('http');
|
||||||
|
var https = require('https');
|
||||||
|
var events = require('events');
|
||||||
|
var assert = require('assert');
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
|
||||||
|
exports.httpOverHttp = httpOverHttp;
|
||||||
|
exports.httpsOverHttp = httpsOverHttp;
|
||||||
|
exports.httpOverHttps = httpOverHttps;
|
||||||
|
exports.httpsOverHttps = httpsOverHttps;
|
||||||
|
|
||||||
|
|
||||||
|
function httpOverHttp(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = http.request;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpsOverHttp(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = http.request;
|
||||||
|
agent.createSocket = createSecureSocket;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpOverHttps(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = https.request;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpsOverHttps(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = https.request;
|
||||||
|
agent.createSocket = createSecureSocket;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function TunnelingAgent(options) {
|
||||||
|
var self = this;
|
||||||
|
self.options = options || {};
|
||||||
|
self.proxyOptions = self.options.proxy || {};
|
||||||
|
self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;
|
||||||
|
self.requests = [];
|
||||||
|
self.sockets = [];
|
||||||
|
|
||||||
|
self.on('free', function onFree(socket, host, port, localAddress) {
|
||||||
|
var options = toOptions(host, port, localAddress);
|
||||||
|
for (var i = 0, len = self.requests.length; i < len; ++i) {
|
||||||
|
var pending = self.requests[i];
|
||||||
|
if (pending.host === options.host && pending.port === options.port) {
|
||||||
|
// Detect the request to connect same origin server,
|
||||||
|
// reuse the connection.
|
||||||
|
self.requests.splice(i, 1);
|
||||||
|
pending.request.onSocket(socket);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
socket.destroy();
|
||||||
|
self.removeSocket(socket);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
util.inherits(TunnelingAgent, events.EventEmitter);
|
||||||
|
|
||||||
|
TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {
|
||||||
|
var self = this;
|
||||||
|
var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));
|
||||||
|
|
||||||
|
if (self.sockets.length >= this.maxSockets) {
|
||||||
|
// We are over limit so we'll add it to the queue.
|
||||||
|
self.requests.push(options);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we are under maxSockets create a new one.
|
||||||
|
self.createSocket(options, function(socket) {
|
||||||
|
socket.on('free', onFree);
|
||||||
|
socket.on('close', onCloseOrRemove);
|
||||||
|
socket.on('agentRemove', onCloseOrRemove);
|
||||||
|
req.onSocket(socket);
|
||||||
|
|
||||||
|
function onFree() {
|
||||||
|
self.emit('free', socket, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onCloseOrRemove(err) {
|
||||||
|
self.removeSocket(socket);
|
||||||
|
socket.removeListener('free', onFree);
|
||||||
|
socket.removeListener('close', onCloseOrRemove);
|
||||||
|
socket.removeListener('agentRemove', onCloseOrRemove);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
|
||||||
|
var self = this;
|
||||||
|
var placeholder = {};
|
||||||
|
self.sockets.push(placeholder);
|
||||||
|
|
||||||
|
var connectOptions = mergeOptions({}, self.proxyOptions, {
|
||||||
|
method: 'CONNECT',
|
||||||
|
path: options.host + ':' + options.port,
|
||||||
|
agent: false
|
||||||
|
});
|
||||||
|
if (connectOptions.proxyAuth) {
|
||||||
|
connectOptions.headers = connectOptions.headers || {};
|
||||||
|
connectOptions.headers['Proxy-Authorization'] = 'Basic ' +
|
||||||
|
new Buffer(connectOptions.proxyAuth).toString('base64');
|
||||||
|
}
|
||||||
|
|
||||||
|
debug('making CONNECT request');
|
||||||
|
var connectReq = self.request(connectOptions);
|
||||||
|
connectReq.useChunkedEncodingByDefault = false; // for v0.6
|
||||||
|
connectReq.once('response', onResponse); // for v0.6
|
||||||
|
connectReq.once('upgrade', onUpgrade); // for v0.6
|
||||||
|
connectReq.once('connect', onConnect); // for v0.7 or later
|
||||||
|
connectReq.once('error', onError);
|
||||||
|
connectReq.end();
|
||||||
|
|
||||||
|
function onResponse(res) {
|
||||||
|
// Very hacky. This is necessary to avoid http-parser leaks.
|
||||||
|
res.upgrade = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onUpgrade(res, socket, head) {
|
||||||
|
// Hacky.
|
||||||
|
process.nextTick(function() {
|
||||||
|
onConnect(res, socket, head);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onConnect(res, socket, head) {
|
||||||
|
connectReq.removeAllListeners();
|
||||||
|
socket.removeAllListeners();
|
||||||
|
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
assert.equal(head.length, 0);
|
||||||
|
debug('tunneling connection has established');
|
||||||
|
self.sockets[self.sockets.indexOf(placeholder)] = socket;
|
||||||
|
cb(socket);
|
||||||
|
} else {
|
||||||
|
debug('tunneling socket could not be established, statusCode=%d',
|
||||||
|
res.statusCode);
|
||||||
|
var error = new Error('tunneling socket could not be established, ' +
|
||||||
|
'statusCode=' + res.statusCode);
|
||||||
|
error.code = 'ECONNRESET';
|
||||||
|
options.request.emit('error', error);
|
||||||
|
self.removeSocket(placeholder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onError(cause) {
|
||||||
|
connectReq.removeAllListeners();
|
||||||
|
|
||||||
|
debug('tunneling socket could not be established, cause=%s\n',
|
||||||
|
cause.message, cause.stack);
|
||||||
|
var error = new Error('tunneling socket could not be established, ' +
|
||||||
|
'cause=' + cause.message);
|
||||||
|
error.code = 'ECONNRESET';
|
||||||
|
options.request.emit('error', error);
|
||||||
|
self.removeSocket(placeholder);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
|
||||||
|
var pos = this.sockets.indexOf(socket)
|
||||||
|
if (pos === -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.sockets.splice(pos, 1);
|
||||||
|
|
||||||
|
var pending = this.requests.shift();
|
||||||
|
if (pending) {
|
||||||
|
// If we have pending requests and a socket gets closed a new one
|
||||||
|
// needs to be created to take over in the pool for the one that closed.
|
||||||
|
this.createSocket(pending, function(socket) {
|
||||||
|
pending.request.onSocket(socket);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function createSecureSocket(options, cb) {
|
||||||
|
var self = this;
|
||||||
|
TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {
|
||||||
|
var hostHeader = options.request.getHeader('host');
|
||||||
|
var tlsOptions = mergeOptions({}, self.options, {
|
||||||
|
socket: socket,
|
||||||
|
servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host
|
||||||
|
});
|
||||||
|
|
||||||
|
// 0 is dummy port for v0.6
|
||||||
|
var secureSocket = tls.connect(0, tlsOptions);
|
||||||
|
self.sockets[self.sockets.indexOf(socket)] = secureSocket;
|
||||||
|
cb(secureSocket);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function toOptions(host, port, localAddress) {
|
||||||
|
if (typeof host === 'string') { // since v0.10
|
||||||
|
return {
|
||||||
|
host: host,
|
||||||
|
port: port,
|
||||||
|
localAddress: localAddress
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return host; // for v0.11 or later
|
||||||
|
}
|
||||||
|
|
||||||
|
function mergeOptions(target) {
|
||||||
|
for (var i = 1, len = arguments.length; i < len; ++i) {
|
||||||
|
var overrides = arguments[i];
|
||||||
|
if (typeof overrides === 'object') {
|
||||||
|
var keys = Object.keys(overrides);
|
||||||
|
for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {
|
||||||
|
var k = keys[j];
|
||||||
|
if (overrides[k] !== undefined) {
|
||||||
|
target[k] = overrides[k];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var debug;
|
||||||
|
if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
|
||||||
|
debug = function() {
|
||||||
|
var args = Array.prototype.slice.call(arguments);
|
||||||
|
if (typeof args[0] === 'string') {
|
||||||
|
args[0] = 'TUNNEL: ' + args[0];
|
||||||
|
} else {
|
||||||
|
args.unshift('TUNNEL:');
|
||||||
|
}
|
||||||
|
console.error.apply(console, args);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
debug = function() {};
|
||||||
|
}
|
||||||
|
exports.debug = debug; // for test
|
64
node_modules/tunnel/package.json
generated
vendored
Normal file
64
node_modules/tunnel/package.json
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"_from": "tunnel@0.0.4",
|
||||||
|
"_id": "tunnel@0.0.4",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=",
|
||||||
|
"_location": "/tunnel",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "version",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "tunnel@0.0.4",
|
||||||
|
"name": "tunnel",
|
||||||
|
"escapedName": "tunnel",
|
||||||
|
"rawSpec": "0.0.4",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "0.0.4"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/typed-rest-client"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz",
|
||||||
|
"_shasum": "2d3785a158c174c9a16dc2c046ec5fc5f1742213",
|
||||||
|
"_spec": "tunnel@0.0.4",
|
||||||
|
"_where": "/Users/paul/src/gradle-related/gradle-wrapper-check/node_modules/typed-rest-client",
|
||||||
|
"author": {
|
||||||
|
"name": "Koichi Kobayashi",
|
||||||
|
"email": "koichik@improvement.jp"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/koichik/node-tunnel/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Node HTTP/HTTPS Agents for tunneling proxies",
|
||||||
|
"devDependencies": {
|
||||||
|
"mocha": "*",
|
||||||
|
"should": "*"
|
||||||
|
},
|
||||||
|
"directories": {
|
||||||
|
"lib": "./lib"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/koichik/node-tunnel/",
|
||||||
|
"keywords": [
|
||||||
|
"http",
|
||||||
|
"https",
|
||||||
|
"agent",
|
||||||
|
"proxy",
|
||||||
|
"tunnel"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "./index.js",
|
||||||
|
"name": "tunnel",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/koichik/node-tunnel.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "./node_modules/mocha/bin/mocha"
|
||||||
|
},
|
||||||
|
"version": "0.0.4"
|
||||||
|
}
|
108
node_modules/tunnel/test/http-over-http.js
generated
vendored
Normal file
108
node_modules/tunnel/test/http-over-http.js
generated
vendored
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
var http = require('http');
|
||||||
|
var net = require('net');
|
||||||
|
var should = require('should');
|
||||||
|
var tunnel = require('../index');
|
||||||
|
|
||||||
|
describe('HTTP over HTTP', function() {
|
||||||
|
it('should finish without error', function(done) {
|
||||||
|
var serverPort = 3000;
|
||||||
|
var proxyPort = 3001;
|
||||||
|
var poolSize = 3;
|
||||||
|
var N = 10;
|
||||||
|
var serverConnect = 0;
|
||||||
|
var proxyConnect = 0;
|
||||||
|
var clientConnect = 0;
|
||||||
|
var server;
|
||||||
|
var proxy;
|
||||||
|
var agent;
|
||||||
|
|
||||||
|
server = http.createServer(function(req, res) {
|
||||||
|
tunnel.debug('SERVER: got request');
|
||||||
|
++serverConnect;
|
||||||
|
res.writeHead(200);
|
||||||
|
res.end('Hello' + req.url);
|
||||||
|
tunnel.debug('SERVER: sending response');
|
||||||
|
});
|
||||||
|
server.listen(serverPort, setupProxy);
|
||||||
|
|
||||||
|
function setupProxy() {
|
||||||
|
proxy = http.createServer(function(req, res) {
|
||||||
|
should.fail();
|
||||||
|
});
|
||||||
|
proxy.on('upgrade', onConnect); // for v0.6
|
||||||
|
proxy.on('connect', onConnect); // for v0.7 or later
|
||||||
|
|
||||||
|
function onConnect(req, clientSocket, head) {
|
||||||
|
tunnel.debug('PROXY: got CONNECT request');
|
||||||
|
|
||||||
|
req.method.should.equal('CONNECT');
|
||||||
|
req.url.should.equal('localhost:' + serverPort);
|
||||||
|
req.headers.should.not.have.property('transfer-encoding');
|
||||||
|
req.headers.should.have.property('proxy-authorization',
|
||||||
|
'Basic ' + new Buffer('user:password').toString('base64'));
|
||||||
|
++proxyConnect;
|
||||||
|
|
||||||
|
tunnel.debug('PROXY: creating a tunnel');
|
||||||
|
var serverSocket = net.connect(serverPort, function() {
|
||||||
|
tunnel.debug('PROXY: replying to client CONNECT request');
|
||||||
|
clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n');
|
||||||
|
clientSocket.pipe(serverSocket);
|
||||||
|
serverSocket.write(head);
|
||||||
|
serverSocket.pipe(clientSocket);
|
||||||
|
// workaround, see joyent/node#2524
|
||||||
|
serverSocket.on('end', function() {
|
||||||
|
clientSocket.end();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
proxy.listen(proxyPort, setupClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupClient() {
|
||||||
|
agent = tunnel.httpOverHttp({
|
||||||
|
maxSockets: poolSize,
|
||||||
|
proxy: {
|
||||||
|
port: proxyPort,
|
||||||
|
proxyAuth: 'user:password'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
for (var i = 0; i < N; ++i) {
|
||||||
|
doClientRequest(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
function doClientRequest(i) {
|
||||||
|
tunnel.debug('CLIENT: Making HTTP request (%d)', i);
|
||||||
|
var req = http.get({
|
||||||
|
port: serverPort,
|
||||||
|
path: '/' + i,
|
||||||
|
agent: agent
|
||||||
|
}, function(res) {
|
||||||
|
tunnel.debug('CLIENT: got HTTP response (%d)', i);
|
||||||
|
res.setEncoding('utf8');
|
||||||
|
res.on('data', function(data) {
|
||||||
|
data.should.equal('Hello/' + i);
|
||||||
|
});
|
||||||
|
res.on('end', function() {
|
||||||
|
++clientConnect;
|
||||||
|
if (clientConnect === N) {
|
||||||
|
proxy.close();
|
||||||
|
server.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server.on('close', function() {
|
||||||
|
serverConnect.should.equal(N);
|
||||||
|
proxyConnect.should.equal(poolSize);
|
||||||
|
clientConnect.should.equal(N);
|
||||||
|
|
||||||
|
agent.sockets.should.be.empty;
|
||||||
|
agent.requests.should.be.empty;
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
130
node_modules/tunnel/test/http-over-https.js
generated
vendored
Normal file
130
node_modules/tunnel/test/http-over-https.js
generated
vendored
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
var http = require('http');
|
||||||
|
var https = require('https');
|
||||||
|
var net = require('net');
|
||||||
|
var fs = require('fs');
|
||||||
|
var path = require('path');
|
||||||
|
var should = require('should');
|
||||||
|
var tunnel = require('../index');
|
||||||
|
|
||||||
|
function readPem(file) {
|
||||||
|
return fs.readFileSync(path.join('test/keys', file + '.pem'));
|
||||||
|
}
|
||||||
|
|
||||||
|
var proxyKey = readPem('proxy1-key');
|
||||||
|
var proxyCert = readPem('proxy1-cert');
|
||||||
|
var proxyCA = readPem('ca2-cert');
|
||||||
|
var clientKey = readPem('client1-key');
|
||||||
|
var clientCert = readPem('client1-cert');
|
||||||
|
var clientCA = readPem('ca3-cert');
|
||||||
|
|
||||||
|
describe('HTTP over HTTPS', function() {
|
||||||
|
it('should finish without error', function(done) {
|
||||||
|
var serverPort = 3004;
|
||||||
|
var proxyPort = 3005;
|
||||||
|
var poolSize = 3;
|
||||||
|
var N = 10;
|
||||||
|
var serverConnect = 0;
|
||||||
|
var proxyConnect = 0;
|
||||||
|
var clientConnect = 0;
|
||||||
|
var server;
|
||||||
|
var proxy;
|
||||||
|
var agent;
|
||||||
|
|
||||||
|
server = http.createServer(function(req, res) {
|
||||||
|
tunnel.debug('SERVER: got request');
|
||||||
|
++serverConnect;
|
||||||
|
res.writeHead(200);
|
||||||
|
res.end('Hello' + req.url);
|
||||||
|
tunnel.debug('SERVER: sending response');
|
||||||
|
});
|
||||||
|
server.listen(serverPort, setupProxy);
|
||||||
|
|
||||||
|
function setupProxy() {
|
||||||
|
proxy = https.createServer({
|
||||||
|
key: proxyKey,
|
||||||
|
cert: proxyCert,
|
||||||
|
ca: [clientCA],
|
||||||
|
requestCert: true,
|
||||||
|
rejectUnauthorized: true
|
||||||
|
}, function(req, res) {
|
||||||
|
should.fail();
|
||||||
|
});
|
||||||
|
proxy.on('upgrade', onConnect); // for v0.6
|
||||||
|
proxy.on('connect', onConnect); // for v0.7 or later
|
||||||
|
|
||||||
|
function onConnect(req, clientSocket, head) {
|
||||||
|
tunnel.debug('PROXY: got CONNECT request');
|
||||||
|
|
||||||
|
req.method.should.equal('CONNECT');
|
||||||
|
req.url.should.equal('localhost:' + serverPort);
|
||||||
|
req.headers.should.not.have.property('transfer-encoding');
|
||||||
|
++proxyConnect;
|
||||||
|
|
||||||
|
tunnel.debug('PROXY: creating a tunnel');
|
||||||
|
var serverSocket = net.connect(serverPort, function() {
|
||||||
|
tunnel.debug('PROXY: replying to client CONNECT request');
|
||||||
|
clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n');
|
||||||
|
clientSocket.pipe(serverSocket);
|
||||||
|
serverSocket.write(head);
|
||||||
|
serverSocket.pipe(clientSocket);
|
||||||
|
// workaround, see joyent/node#2524
|
||||||
|
serverSocket.on('end', function() {
|
||||||
|
clientSocket.end();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
proxy.listen(proxyPort, setupClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupClient() {
|
||||||
|
agent = tunnel.httpOverHttps({
|
||||||
|
maxSockets: poolSize,
|
||||||
|
proxy: {
|
||||||
|
port: proxyPort,
|
||||||
|
key: clientKey,
|
||||||
|
cert: clientCert,
|
||||||
|
ca: [proxyCA],
|
||||||
|
rejectUnauthorized: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
for (var i = 0; i < N; ++i) {
|
||||||
|
doClientRequest(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
function doClientRequest(i) {
|
||||||
|
tunnel.debug('CLIENT: Making HTTP request (%d)', i);
|
||||||
|
var req = http.get({
|
||||||
|
port: serverPort,
|
||||||
|
path: '/' + i,
|
||||||
|
agent: agent
|
||||||
|
}, function(res) {
|
||||||
|
tunnel.debug('CLIENT: got HTTP response (%d)', i);
|
||||||
|
res.setEncoding('utf8');
|
||||||
|
res.on('data', function(data) {
|
||||||
|
data.should.equal('Hello/' + i);
|
||||||
|
});
|
||||||
|
res.on('end', function() {
|
||||||
|
++clientConnect;
|
||||||
|
if (clientConnect === N) {
|
||||||
|
proxy.close();
|
||||||
|
server.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server.on('close', function() {
|
||||||
|
serverConnect.should.equal(N);
|
||||||
|
proxyConnect.should.equal(poolSize);
|
||||||
|
clientConnect.should.equal(N);
|
||||||
|
|
||||||
|
var name = 'localhost:' + serverPort;
|
||||||
|
agent.sockets.should.be.empty;
|
||||||
|
agent.requests.should.be.empty;
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
130
node_modules/tunnel/test/https-over-http.js
generated
vendored
Normal file
130
node_modules/tunnel/test/https-over-http.js
generated
vendored
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
var http = require('http');
|
||||||
|
var https = require('https');
|
||||||
|
var net = require('net');
|
||||||
|
var fs = require('fs');
|
||||||
|
var path = require('path');
|
||||||
|
var should = require('should');
|
||||||
|
var tunnel = require('../index');
|
||||||
|
|
||||||
|
function readPem(file) {
|
||||||
|
return fs.readFileSync(path.join('test/keys', file + '.pem'));
|
||||||
|
}
|
||||||
|
|
||||||
|
var serverKey = readPem('server1-key');
|
||||||
|
var serverCert = readPem('server1-cert');
|
||||||
|
var serverCA = readPem('ca1-cert');
|
||||||
|
var clientKey = readPem('client1-key');
|
||||||
|
var clientCert = readPem('client1-cert');
|
||||||
|
var clientCA = readPem('ca3-cert');
|
||||||
|
|
||||||
|
|
||||||
|
describe('HTTPS over HTTP', function() {
|
||||||
|
it('should finish without error', function(done) {
|
||||||
|
var serverPort = 3002;
|
||||||
|
var proxyPort = 3003;
|
||||||
|
var poolSize = 3;
|
||||||
|
var N = 10;
|
||||||
|
var serverConnect = 0;
|
||||||
|
var proxyConnect = 0;
|
||||||
|
var clientConnect = 0;
|
||||||
|
var server;
|
||||||
|
var proxy;
|
||||||
|
var agent;
|
||||||
|
|
||||||
|
server = https.createServer({
|
||||||
|
key: serverKey,
|
||||||
|
cert: serverCert,
|
||||||
|
ca: [clientCA],
|
||||||
|
requestCert: true,
|
||||||
|
rejectUnauthorized: true
|
||||||
|
}, function(req, res) {
|
||||||
|
tunnel.debug('SERVER: got request');
|
||||||
|
++serverConnect;
|
||||||
|
res.writeHead(200);
|
||||||
|
res.end('Hello' + req.url);
|
||||||
|
tunnel.debug('SERVER: sending response');
|
||||||
|
});
|
||||||
|
server.listen(serverPort, setupProxy);
|
||||||
|
|
||||||
|
function setupProxy() {
|
||||||
|
proxy = http.createServer(function(req, res) {
|
||||||
|
should.fail();
|
||||||
|
});
|
||||||
|
proxy.on('upgrade', onConnect); // for v0.6
|
||||||
|
proxy.on('connect', onConnect); // for v0.7 or later
|
||||||
|
|
||||||
|
function onConnect(req, clientSocket, head) {
|
||||||
|
tunnel.debug('PROXY: got CONNECT request');
|
||||||
|
|
||||||
|
req.method.should.equal('CONNECT');
|
||||||
|
req.url.should.equal('localhost:' + serverPort);
|
||||||
|
req.headers.should.not.have.property('transfer-encoding');
|
||||||
|
++proxyConnect;
|
||||||
|
|
||||||
|
var serverSocket = net.connect(serverPort, function() {
|
||||||
|
tunnel.debug('PROXY: replying to client CONNECT request');
|
||||||
|
clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n');
|
||||||
|
clientSocket.pipe(serverSocket);
|
||||||
|
serverSocket.write(head);
|
||||||
|
serverSocket.pipe(clientSocket);
|
||||||
|
// workaround, see joyent/node#2524
|
||||||
|
serverSocket.on('end', function() {
|
||||||
|
clientSocket.end();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
proxy.listen(proxyPort, setupClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupClient() {
|
||||||
|
agent = tunnel.httpsOverHttp({
|
||||||
|
maxSockets: poolSize,
|
||||||
|
key: clientKey,
|
||||||
|
cert: clientCert,
|
||||||
|
ca: [serverCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
proxy: {
|
||||||
|
port: proxyPort
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
for (var i = 0; i < N; ++i) {
|
||||||
|
doClientRequest(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
function doClientRequest(i) {
|
||||||
|
tunnel.debug('CLIENT: Making HTTPS request (%d)', i);
|
||||||
|
var req = https.get({
|
||||||
|
port: serverPort,
|
||||||
|
path: '/' + i,
|
||||||
|
agent: agent
|
||||||
|
}, function(res) {
|
||||||
|
tunnel.debug('CLIENT: got HTTPS response (%d)', i);
|
||||||
|
res.setEncoding('utf8');
|
||||||
|
res.on('data', function(data) {
|
||||||
|
data.should.equal('Hello/' + i);
|
||||||
|
});
|
||||||
|
res.on('end', function() {
|
||||||
|
++clientConnect;
|
||||||
|
if (clientConnect === N) {
|
||||||
|
proxy.close();
|
||||||
|
server.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server.on('close', function() {
|
||||||
|
serverConnect.should.equal(N);
|
||||||
|
proxyConnect.should.equal(poolSize);
|
||||||
|
clientConnect.should.equal(N);
|
||||||
|
|
||||||
|
var name = 'localhost:' + serverPort;
|
||||||
|
agent.sockets.should.be.empty;
|
||||||
|
agent.requests.should.be.empty;
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
261
node_modules/tunnel/test/https-over-https-error.js
generated
vendored
Normal file
261
node_modules/tunnel/test/https-over-https-error.js
generated
vendored
Normal file
@ -0,0 +1,261 @@
|
|||||||
|
var http = require('http');
|
||||||
|
var https = require('https');
|
||||||
|
var net = require('net');
|
||||||
|
var fs = require('fs');
|
||||||
|
var path = require('path');
|
||||||
|
var should = require('should');
|
||||||
|
var tunnel = require('../index');
|
||||||
|
|
||||||
|
function readPem(file) {
|
||||||
|
return fs.readFileSync(path.join('test/keys', file + '.pem'));
|
||||||
|
}
|
||||||
|
|
||||||
|
var serverKey = readPem('server2-key');
|
||||||
|
var serverCert = readPem('server2-cert');
|
||||||
|
var serverCA = readPem('ca1-cert');
|
||||||
|
var proxyKey = readPem('proxy2-key');
|
||||||
|
var proxyCert = readPem('proxy2-cert');
|
||||||
|
var proxyCA = readPem('ca2-cert');
|
||||||
|
var client1Key = readPem('client1-key');
|
||||||
|
var client1Cert = readPem('client1-cert');
|
||||||
|
var client1CA = readPem('ca3-cert');
|
||||||
|
var client2Key = readPem('client2-key');
|
||||||
|
var client2Cert = readPem('client2-cert');
|
||||||
|
var client2CA = readPem('ca4-cert');
|
||||||
|
|
||||||
|
describe('HTTPS over HTTPS authentication failed', function() {
|
||||||
|
it('should finish without error', function(done) {
|
||||||
|
var serverPort = 3008;
|
||||||
|
var proxyPort = 3009;
|
||||||
|
var serverConnect = 0;
|
||||||
|
var proxyConnect = 0;
|
||||||
|
var clientRequest = 0;
|
||||||
|
var clientConnect = 0;
|
||||||
|
var clientError = 0;
|
||||||
|
var server;
|
||||||
|
var proxy;
|
||||||
|
|
||||||
|
server = https.createServer({
|
||||||
|
key: serverKey,
|
||||||
|
cert: serverCert,
|
||||||
|
ca: [client1CA],
|
||||||
|
requestCert: true,
|
||||||
|
rejectUnauthorized: true
|
||||||
|
}, function(req, res) {
|
||||||
|
tunnel.debug('SERVER: got request', req.url);
|
||||||
|
++serverConnect;
|
||||||
|
req.on('data', function(data) {
|
||||||
|
});
|
||||||
|
req.on('end', function() {
|
||||||
|
res.writeHead(200);
|
||||||
|
res.end('Hello, ' + serverConnect);
|
||||||
|
tunnel.debug('SERVER: sending response');
|
||||||
|
});
|
||||||
|
req.resume();
|
||||||
|
});
|
||||||
|
//server.addContext('server2', {
|
||||||
|
// key: serverKey,
|
||||||
|
// cert: serverCert,
|
||||||
|
// ca: [client1CA],
|
||||||
|
//});
|
||||||
|
server.listen(serverPort, setupProxy);
|
||||||
|
|
||||||
|
function setupProxy() {
|
||||||
|
proxy = https.createServer({
|
||||||
|
key: proxyKey,
|
||||||
|
cert: proxyCert,
|
||||||
|
ca: [client2CA],
|
||||||
|
requestCert: true,
|
||||||
|
rejectUnauthorized: true
|
||||||
|
}, function(req, res) {
|
||||||
|
should.fail();
|
||||||
|
});
|
||||||
|
//proxy.addContext('proxy2', {
|
||||||
|
// key: proxyKey,
|
||||||
|
// cert: proxyCert,
|
||||||
|
// ca: [client2CA],
|
||||||
|
//});
|
||||||
|
proxy.on('upgrade', onConnect); // for v0.6
|
||||||
|
proxy.on('connect', onConnect); // for v0.7 or later
|
||||||
|
|
||||||
|
function onConnect(req, clientSocket, head) {
|
||||||
|
req.method.should.equal('CONNECT');
|
||||||
|
req.url.should.equal('localhost:' + serverPort);
|
||||||
|
req.headers.should.not.have.property('transfer-encoding');
|
||||||
|
++proxyConnect;
|
||||||
|
|
||||||
|
var serverSocket = net.connect(serverPort, function() {
|
||||||
|
tunnel.debug('PROXY: replying to client CONNECT request');
|
||||||
|
clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n');
|
||||||
|
clientSocket.pipe(serverSocket);
|
||||||
|
serverSocket.write(head);
|
||||||
|
serverSocket.pipe(clientSocket);
|
||||||
|
// workaround, see #2524
|
||||||
|
serverSocket.on('end', function() {
|
||||||
|
clientSocket.end();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
proxy.listen(proxyPort, setupClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupClient() {
|
||||||
|
function doRequest(name, options, host) {
|
||||||
|
tunnel.debug('CLIENT: Making HTTPS request (%s)', name);
|
||||||
|
++clientRequest;
|
||||||
|
var agent = tunnel.httpsOverHttps(options);
|
||||||
|
var req = https.get({
|
||||||
|
host: 'localhost',
|
||||||
|
port: serverPort,
|
||||||
|
path: '/' + encodeURIComponent(name),
|
||||||
|
headers: {
|
||||||
|
host: host ? host : 'localhost',
|
||||||
|
},
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
agent: agent
|
||||||
|
}, function(res) {
|
||||||
|
tunnel.debug('CLIENT: got HTTPS response (%s)', name);
|
||||||
|
++clientConnect;
|
||||||
|
res.on('data', function(data) {
|
||||||
|
});
|
||||||
|
res.on('end', function() {
|
||||||
|
req.emit('finish');
|
||||||
|
});
|
||||||
|
res.resume();
|
||||||
|
});
|
||||||
|
req.on('error', function(err) {
|
||||||
|
tunnel.debug('CLIENT: failed HTTP response (%s)', name, err);
|
||||||
|
++clientError;
|
||||||
|
req.emit('finish');
|
||||||
|
});
|
||||||
|
req.on('finish', function() {
|
||||||
|
if (clientConnect + clientError === clientRequest) {
|
||||||
|
proxy.close();
|
||||||
|
server.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
doRequest('no cert origin nor proxy', { // invalid
|
||||||
|
maxSockets: 1,
|
||||||
|
ca: [serverCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
// no certificate for origin server
|
||||||
|
proxy: {
|
||||||
|
port: proxyPort,
|
||||||
|
ca: [proxyCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
headers: {
|
||||||
|
host: 'proxy2'
|
||||||
|
}
|
||||||
|
// no certificate for proxy
|
||||||
|
}
|
||||||
|
}, 'server2');
|
||||||
|
|
||||||
|
doRequest('no cert proxy', { // invalid
|
||||||
|
maxSockets: 1,
|
||||||
|
ca: [serverCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
// client certification for origin server
|
||||||
|
key: client1Key,
|
||||||
|
cert: client1Cert,
|
||||||
|
proxy: {
|
||||||
|
port: proxyPort,
|
||||||
|
ca: [proxyCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
headers: {
|
||||||
|
host: 'proxy2'
|
||||||
|
}
|
||||||
|
// no certificate for proxy
|
||||||
|
}
|
||||||
|
}, 'server2');
|
||||||
|
|
||||||
|
doRequest('no cert origin', { // invalid
|
||||||
|
maxSockets: 1,
|
||||||
|
ca: [serverCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
// no certificate for origin server
|
||||||
|
proxy: {
|
||||||
|
port: proxyPort,
|
||||||
|
servername: 'proxy2',
|
||||||
|
ca: [proxyCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
headers: {
|
||||||
|
host: 'proxy2'
|
||||||
|
},
|
||||||
|
// client certification for proxy
|
||||||
|
key: client2Key,
|
||||||
|
cert: client2Cert
|
||||||
|
}
|
||||||
|
}, 'server2');
|
||||||
|
|
||||||
|
doRequest('invalid proxy server name', { // invalid
|
||||||
|
maxSockets: 1,
|
||||||
|
ca: [serverCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
// client certification for origin server
|
||||||
|
key: client1Key,
|
||||||
|
cert: client1Cert,
|
||||||
|
proxy: {
|
||||||
|
port: proxyPort,
|
||||||
|
ca: [proxyCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
// client certification for proxy
|
||||||
|
key: client2Key,
|
||||||
|
cert: client2Cert,
|
||||||
|
}
|
||||||
|
}, 'server2');
|
||||||
|
|
||||||
|
doRequest('invalid origin server name', { // invalid
|
||||||
|
maxSockets: 1,
|
||||||
|
ca: [serverCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
// client certification for origin server
|
||||||
|
key: client1Key,
|
||||||
|
cert: client1Cert,
|
||||||
|
proxy: {
|
||||||
|
port: proxyPort,
|
||||||
|
servername: 'proxy2',
|
||||||
|
ca: [proxyCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
headers: {
|
||||||
|
host: 'proxy2'
|
||||||
|
},
|
||||||
|
// client certification for proxy
|
||||||
|
key: client2Key,
|
||||||
|
cert: client2Cert
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
doRequest('valid', { // valid
|
||||||
|
maxSockets: 1,
|
||||||
|
ca: [serverCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
// client certification for origin server
|
||||||
|
key: client1Key,
|
||||||
|
cert: client1Cert,
|
||||||
|
proxy: {
|
||||||
|
port: proxyPort,
|
||||||
|
servername: 'proxy2',
|
||||||
|
ca: [proxyCA],
|
||||||
|
rejectUnauthorized: true,
|
||||||
|
headers: {
|
||||||
|
host: 'proxy2'
|
||||||
|
},
|
||||||
|
// client certification for proxy
|
||||||
|
key: client2Key,
|
||||||
|
cert: client2Cert
|
||||||
|
}
|
||||||
|
}, 'server2');
|
||||||
|
}
|
||||||
|
|
||||||
|
server.on('close', function() {
|
||||||
|
serverConnect.should.equal(1);
|
||||||
|
proxyConnect.should.equal(3);
|
||||||
|
clientConnect.should.equal(1);
|
||||||
|
clientError.should.equal(5);
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
146
node_modules/tunnel/test/https-over-https.js
generated
vendored
Normal file
146
node_modules/tunnel/test/https-over-https.js
generated
vendored
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
var http = require('http');
|
||||||
|
var https = require('https');
|
||||||
|
var net = require('net');
|
||||||
|
var fs = require('fs');
|
||||||
|
var path = require('path');
|
||||||
|
var should = require('should');
|
||||||
|
var tunnel = require('../index.js');
|
||||||
|
|
||||||
|
function readPem(file) {
|
||||||
|
return fs.readFileSync(path.join('test/keys', file + '.pem'));
|
||||||
|
}
|
||||||
|
|
||||||
|
var serverKey = readPem('server1-key');
|
||||||
|
var serverCert = readPem('server1-cert');
|
||||||
|
var serverCA = readPem('ca1-cert');
|
||||||
|
var proxyKey = readPem('proxy1-key');
|
||||||
|
var proxyCert = readPem('proxy1-cert');
|
||||||
|
var proxyCA = readPem('ca2-cert');
|
||||||
|
var client1Key = readPem('client1-key');
|
||||||
|
var client1Cert = readPem('client1-cert');
|
||||||
|
var client1CA = readPem('ca3-cert');
|
||||||
|
var client2Key = readPem('client2-key');
|
||||||
|
var client2Cert = readPem('client2-cert');
|
||||||
|
var client2CA = readPem('ca4-cert');
|
||||||
|
|
||||||
|
describe('HTTPS over HTTPS', function() {
|
||||||
|
it('should finish without error', function(done) {
|
||||||
|
var serverPort = 3006;
|
||||||
|
var proxyPort = 3007;
|
||||||
|
var poolSize = 3;
|
||||||
|
var N = 5;
|
||||||
|
var serverConnect = 0;
|
||||||
|
var proxyConnect = 0;
|
||||||
|
var clientConnect = 0;
|
||||||
|
var server;
|
||||||
|
var proxy;
|
||||||
|
var agent;
|
||||||
|
|
||||||
|
server = https.createServer({
|
||||||
|
key: serverKey,
|
||||||
|
cert: serverCert,
|
||||||
|
ca: [client1CA],
|
||||||
|
requestCert: true,
|
||||||
|
rejectUnauthorized: true
|
||||||
|
}, function(req, res) {
|
||||||
|
tunnel.debug('SERVER: got request');
|
||||||
|
++serverConnect;
|
||||||
|
res.writeHead(200);
|
||||||
|
res.end('Hello' + req.url);
|
||||||
|
tunnel.debug('SERVER: sending response');
|
||||||
|
});
|
||||||
|
server.listen(serverPort, setupProxy);
|
||||||
|
|
||||||
|
function setupProxy() {
|
||||||
|
proxy = https.createServer({
|
||||||
|
key: proxyKey,
|
||||||
|
cert: proxyCert,
|
||||||
|
ca: [client2CA],
|
||||||
|
requestCert: true,
|
||||||
|
rejectUnauthorized: true
|
||||||
|
}, function(req, res) {
|
||||||
|
should.fail();
|
||||||
|
});
|
||||||
|
proxy.on('upgrade', onConnect); // for v0.6
|
||||||
|
proxy.on('connect', onConnect); // for v0.7 or later
|
||||||
|
|
||||||
|
function onConnect(req, clientSocket, head) {
|
||||||
|
tunnel.debug('PROXY: got CONNECT request');
|
||||||
|
req.method.should.equal('CONNECT');
|
||||||
|
req.url.should.equal('localhost:' + serverPort);
|
||||||
|
req.headers.should.not.have.property('transfer-encoding');
|
||||||
|
++proxyConnect;
|
||||||
|
|
||||||
|
var serverSocket = net.connect(serverPort, function() {
|
||||||
|
tunnel.debug('PROXY: replying to client CONNECT request');
|
||||||
|
clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n');
|
||||||
|
clientSocket.pipe(serverSocket);
|
||||||
|
serverSocket.write(head);
|
||||||
|
serverSocket.pipe(clientSocket);
|
||||||
|
// workaround, see joyent/node#2524
|
||||||
|
serverSocket.on('end', function() {
|
||||||
|
clientSocket.end();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
proxy.listen(proxyPort, setupClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupClient() {
|
||||||
|
agent = tunnel.httpsOverHttps({
|
||||||
|
maxSockets: poolSize,
|
||||||
|
// client certification for origin server
|
||||||
|
key: client1Key,
|
||||||
|
cert: client1Cert,
|
||||||
|
ca: [serverCA],
|
||||||
|
rejectUnauthroized: true,
|
||||||
|
proxy: {
|
||||||
|
port: proxyPort,
|
||||||
|
// client certification for proxy
|
||||||
|
key: client2Key,
|
||||||
|
cert: client2Cert,
|
||||||
|
ca: [proxyCA],
|
||||||
|
rejectUnauthroized: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
for (var i = 0; i < N; ++i) {
|
||||||
|
doClientRequest(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
function doClientRequest(i) {
|
||||||
|
tunnel.debug('CLIENT: Making HTTPS request (%d)', i);
|
||||||
|
var req = https.get({
|
||||||
|
port: serverPort,
|
||||||
|
path: '/' + i,
|
||||||
|
agent: agent
|
||||||
|
}, function(res) {
|
||||||
|
tunnel.debug('CLIENT: got HTTPS response (%d)', i);
|
||||||
|
res.setEncoding('utf8');
|
||||||
|
res.on('data', function(data) {
|
||||||
|
data.should.equal('Hello/' + i);
|
||||||
|
});
|
||||||
|
res.on('end', function() {
|
||||||
|
++clientConnect;
|
||||||
|
if (clientConnect === N) {
|
||||||
|
proxy.close();
|
||||||
|
server.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server.on('close', function() {
|
||||||
|
serverConnect.should.equal(N);
|
||||||
|
proxyConnect.should.equal(poolSize);
|
||||||
|
clientConnect.should.equal(N);
|
||||||
|
|
||||||
|
var name = 'localhost:' + serverPort;
|
||||||
|
agent.sockets.should.be.empty;
|
||||||
|
agent.requests.should.be.empty;
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
157
node_modules/tunnel/test/keys/Makefile
generated
vendored
Normal file
157
node_modules/tunnel/test/keys/Makefile
generated
vendored
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
all: server1-cert.pem server2-cert.pem proxy1-cert.pem proxy2-cert.pem client1-cert.pem client2-cert.pem
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create Certificate Authority: ca1
|
||||||
|
# ('password' is used for the CA password.)
|
||||||
|
#
|
||||||
|
ca1-cert.pem: ca1.cnf
|
||||||
|
openssl req -new -x509 -days 9999 -config ca1.cnf -keyout ca1-key.pem -out ca1-cert.pem
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create Certificate Authority: ca2
|
||||||
|
# ('password' is used for the CA password.)
|
||||||
|
#
|
||||||
|
ca2-cert.pem: ca2.cnf
|
||||||
|
openssl req -new -x509 -days 9999 -config ca2.cnf -keyout ca2-key.pem -out ca2-cert.pem
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create Certificate Authority: ca3
|
||||||
|
# ('password' is used for the CA password.)
|
||||||
|
#
|
||||||
|
ca3-cert.pem: ca3.cnf
|
||||||
|
openssl req -new -x509 -days 9999 -config ca3.cnf -keyout ca3-key.pem -out ca3-cert.pem
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create Certificate Authority: ca4
|
||||||
|
# ('password' is used for the CA password.)
|
||||||
|
#
|
||||||
|
ca4-cert.pem: ca4.cnf
|
||||||
|
openssl req -new -x509 -days 9999 -config ca4.cnf -keyout ca4-key.pem -out ca4-cert.pem
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# server1 is signed by ca1.
|
||||||
|
#
|
||||||
|
server1-key.pem:
|
||||||
|
openssl genrsa -out server1-key.pem 1024
|
||||||
|
|
||||||
|
server1-csr.pem: server1.cnf server1-key.pem
|
||||||
|
openssl req -new -config server1.cnf -key server1-key.pem -out server1-csr.pem
|
||||||
|
|
||||||
|
server1-cert.pem: server1-csr.pem ca1-cert.pem ca1-key.pem
|
||||||
|
openssl x509 -req \
|
||||||
|
-days 9999 \
|
||||||
|
-passin "pass:password" \
|
||||||
|
-in server1-csr.pem \
|
||||||
|
-CA ca1-cert.pem \
|
||||||
|
-CAkey ca1-key.pem \
|
||||||
|
-CAcreateserial \
|
||||||
|
-out server1-cert.pem
|
||||||
|
|
||||||
|
#
|
||||||
|
# server2 is signed by ca1.
|
||||||
|
#
|
||||||
|
server2-key.pem:
|
||||||
|
openssl genrsa -out server2-key.pem 1024
|
||||||
|
|
||||||
|
server2-csr.pem: server2.cnf server2-key.pem
|
||||||
|
openssl req -new -config server2.cnf -key server2-key.pem -out server2-csr.pem
|
||||||
|
|
||||||
|
server2-cert.pem: server2-csr.pem ca1-cert.pem ca1-key.pem
|
||||||
|
openssl x509 -req \
|
||||||
|
-days 9999 \
|
||||||
|
-passin "pass:password" \
|
||||||
|
-in server2-csr.pem \
|
||||||
|
-CA ca1-cert.pem \
|
||||||
|
-CAkey ca1-key.pem \
|
||||||
|
-CAcreateserial \
|
||||||
|
-out server2-cert.pem
|
||||||
|
|
||||||
|
server2-verify: server2-cert.pem ca1-cert.pem
|
||||||
|
openssl verify -CAfile ca1-cert.pem server2-cert.pem
|
||||||
|
|
||||||
|
#
|
||||||
|
# proxy1 is signed by ca2.
|
||||||
|
#
|
||||||
|
proxy1-key.pem:
|
||||||
|
openssl genrsa -out proxy1-key.pem 1024
|
||||||
|
|
||||||
|
proxy1-csr.pem: proxy1.cnf proxy1-key.pem
|
||||||
|
openssl req -new -config proxy1.cnf -key proxy1-key.pem -out proxy1-csr.pem
|
||||||
|
|
||||||
|
proxy1-cert.pem: proxy1-csr.pem ca2-cert.pem ca2-key.pem
|
||||||
|
openssl x509 -req \
|
||||||
|
-days 9999 \
|
||||||
|
-passin "pass:password" \
|
||||||
|
-in proxy1-csr.pem \
|
||||||
|
-CA ca2-cert.pem \
|
||||||
|
-CAkey ca2-key.pem \
|
||||||
|
-CAcreateserial \
|
||||||
|
-out proxy1-cert.pem
|
||||||
|
|
||||||
|
#
|
||||||
|
# proxy2 is signed by ca2.
|
||||||
|
#
|
||||||
|
proxy2-key.pem:
|
||||||
|
openssl genrsa -out proxy2-key.pem 1024
|
||||||
|
|
||||||
|
proxy2-csr.pem: proxy2.cnf proxy2-key.pem
|
||||||
|
openssl req -new -config proxy2.cnf -key proxy2-key.pem -out proxy2-csr.pem
|
||||||
|
|
||||||
|
proxy2-cert.pem: proxy2-csr.pem ca2-cert.pem ca2-key.pem
|
||||||
|
openssl x509 -req \
|
||||||
|
-days 9999 \
|
||||||
|
-passin "pass:password" \
|
||||||
|
-in proxy2-csr.pem \
|
||||||
|
-CA ca2-cert.pem \
|
||||||
|
-CAkey ca2-key.pem \
|
||||||
|
-CAcreateserial \
|
||||||
|
-out proxy2-cert.pem
|
||||||
|
|
||||||
|
proxy2-verify: proxy2-cert.pem ca2-cert.pem
|
||||||
|
openssl verify -CAfile ca2-cert.pem proxy2-cert.pem
|
||||||
|
|
||||||
|
#
|
||||||
|
# client1 is signed by ca3.
|
||||||
|
#
|
||||||
|
client1-key.pem:
|
||||||
|
openssl genrsa -out client1-key.pem 1024
|
||||||
|
|
||||||
|
client1-csr.pem: client1.cnf client1-key.pem
|
||||||
|
openssl req -new -config client1.cnf -key client1-key.pem -out client1-csr.pem
|
||||||
|
|
||||||
|
client1-cert.pem: client1-csr.pem ca3-cert.pem ca3-key.pem
|
||||||
|
openssl x509 -req \
|
||||||
|
-days 9999 \
|
||||||
|
-passin "pass:password" \
|
||||||
|
-in client1-csr.pem \
|
||||||
|
-CA ca3-cert.pem \
|
||||||
|
-CAkey ca3-key.pem \
|
||||||
|
-CAcreateserial \
|
||||||
|
-out client1-cert.pem
|
||||||
|
|
||||||
|
#
|
||||||
|
# client2 is signed by ca4.
|
||||||
|
#
|
||||||
|
client2-key.pem:
|
||||||
|
openssl genrsa -out client2-key.pem 1024
|
||||||
|
|
||||||
|
client2-csr.pem: client2.cnf client2-key.pem
|
||||||
|
openssl req -new -config client2.cnf -key client2-key.pem -out client2-csr.pem
|
||||||
|
|
||||||
|
client2-cert.pem: client2-csr.pem ca4-cert.pem ca4-key.pem
|
||||||
|
openssl x509 -req \
|
||||||
|
-days 9999 \
|
||||||
|
-passin "pass:password" \
|
||||||
|
-in client2-csr.pem \
|
||||||
|
-CA ca4-cert.pem \
|
||||||
|
-CAkey ca4-key.pem \
|
||||||
|
-CAcreateserial \
|
||||||
|
-out client2-cert.pem
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.pem *.srl
|
||||||
|
|
||||||
|
test: client-verify server2-verify proxy1-verify proxy2-verify client-verify
|
14
node_modules/tunnel/test/keys/agent1-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/agent1-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICKjCCAZMCCQDQ8o4kHKdCPDANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV
|
||||||
|
UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO
|
||||||
|
BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqGSIb3DQEJARYRcnlA
|
||||||
|
dGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEyWjB9
|
||||||
|
MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK
|
||||||
|
EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MTEgMB4G
|
||||||
|
CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEFAANL
|
||||||
|
ADBIAkEAnzpAqcoXZxWJz/WFK7BXwD23jlREyG11x7gkydteHvn6PrVBbB5yfu6c
|
||||||
|
bk8w3/Ar608AcyMQ9vHjkLQKH7cjEQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAKha
|
||||||
|
HqjCfTIut+m/idKy3AoFh48tBHo3p9Nl5uBjQJmahKdZAaiksL24Pl+NzPQ8LIU+
|
||||||
|
FyDHFp6OeJKN6HzZ72Bh9wpBVu6Uj1hwhZhincyTXT80wtSI/BoUAW8Ls2kwPdus
|
||||||
|
64LsJhhxqj2m4vPKNRbHB2QxnNrGi30CUf3kt3Ia
|
||||||
|
-----END CERTIFICATE-----
|
10
node_modules/tunnel/test/keys/agent1-csr.pem
generated
vendored
Normal file
10
node_modules/tunnel/test/keys/agent1-csr.pem
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
|
||||||
|
EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD
|
||||||
|
EwZhZ2VudDExIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ
|
||||||
|
KoZIhvcNAQEBBQADSwAwSAJBAJ86QKnKF2cVic/1hSuwV8A9t45URMhtdce4JMnb
|
||||||
|
Xh75+j61QWwecn7unG5PMN/wK+tPAHMjEPbx45C0Ch+3IxECAwEAAaAlMCMGCSqG
|
||||||
|
SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB
|
||||||
|
AF+AfG64hNyYHum46m6i7RgnUBrJSOynGjs23TekV4he3QdMSAAPPqbll8W14+y3
|
||||||
|
vOo7/yQ2v2uTqxCjakUNPPs=
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
9
node_modules/tunnel/test/keys/agent1-key.pem
generated
vendored
Normal file
9
node_modules/tunnel/test/keys/agent1-key.pem
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIBOwIBAAJBAJ86QKnKF2cVic/1hSuwV8A9t45URMhtdce4JMnbXh75+j61QWwe
|
||||||
|
cn7unG5PMN/wK+tPAHMjEPbx45C0Ch+3IxECAwEAAQJBAI2cU1IuR+4IO87WPyAB
|
||||||
|
76kruoo87AeNQkjjvuQ/00+b/6IS45mcEP5Kw0NukbqBhIw2di9uQ9J51DJ/ZfQr
|
||||||
|
+YECIQDUHaN3ZjIdJ7/w8Yq9Zzz+3kY2F/xEz6e4ftOFW8bY2QIhAMAref+WYckC
|
||||||
|
oECgOLAvAxB1lI4j7oCbAaawfxKdnPj5AiEAi95rXx09aGpAsBGmSdScrPdG1v6j
|
||||||
|
83/2ebrvoZ1uFqkCIB0AssnrRVjUB6GZTNTyU3ERfdkx/RX1zvr8WkFR/lXpAiB7
|
||||||
|
cUZ1i8ZkZrPrdVgw2cb28UJM7qZHQnXcMHTXFFvxeQ==
|
||||||
|
-----END RSA PRIVATE KEY-----
|
19
node_modules/tunnel/test/keys/agent1.cnf
generated
vendored
Normal file
19
node_modules/tunnel/test/keys/agent1.cnf
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = US
|
||||||
|
ST = CA
|
||||||
|
L = SF
|
||||||
|
O = Joyent
|
||||||
|
OU = Node.js
|
||||||
|
CN = agent1
|
||||||
|
emailAddress = ry@tinyclouds.org
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
13
node_modules/tunnel/test/keys/agent2-cert.pem
generated
vendored
Normal file
13
node_modules/tunnel/test/keys/agent2-cert.pem
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIB7DCCAZYCCQC7gs0MDNn6MTANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJV
|
||||||
|
UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO
|
||||||
|
BgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEgMB4GCSqGSIb3DQEJARYR
|
||||||
|
cnlAdGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEy
|
||||||
|
WjB9MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYD
|
||||||
|
VQQKEwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEg
|
||||||
|
MB4GCSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEF
|
||||||
|
AANLADBIAkEAyXb8FrRdKbhrKLgLSsn61i1C7w7fVVVd7OQsmV/7p9WB2lWFiDlC
|
||||||
|
WKGU9SiIz/A6wNZDUAuc2E+VwtpCT561AQIDAQABMA0GCSqGSIb3DQEBBQUAA0EA
|
||||||
|
C8HzpuNhFLCI3A5KkBS5zHAQax6TFUOhbpBCR0aTDbJ6F1liDTK1lmU/BjvPoj+9
|
||||||
|
1LHwrmh29rK8kBPEjmymCQ==
|
||||||
|
-----END CERTIFICATE-----
|
10
node_modules/tunnel/test/keys/agent2-csr.pem
generated
vendored
Normal file
10
node_modules/tunnel/test/keys/agent2-csr.pem
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
|
||||||
|
EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD
|
||||||
|
EwZhZ2VudDIxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ
|
||||||
|
KoZIhvcNAQEBBQADSwAwSAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf
|
||||||
|
+6fVgdpVhYg5QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAaAlMCMGCSqG
|
||||||
|
SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB
|
||||||
|
AJnll2pt5l0pzskQSpjjLVTlFDFmJr/AZ3UK8v0WxBjYjCe5Jx4YehkChpxIyDUm
|
||||||
|
U3J9q9MDUf0+Y2+EGkssFfk=
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
9
node_modules/tunnel/test/keys/agent2-key.pem
generated
vendored
Normal file
9
node_modules/tunnel/test/keys/agent2-key.pem
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIBOgIBAAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf+6fVgdpVhYg5
|
||||||
|
QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAQJBAMT6Bf34+UHKY1ObpsbH
|
||||||
|
9u2jsVblFq1rWvs8GPMY6oertzvwm3DpuSUp7PTgOB1nLTLYtCERbQ4ovtN8tn3p
|
||||||
|
OHUCIQDzIEGsoCr5vlxXvy2zJwu+fxYuhTZWMVuo1397L0VyhwIhANQh+yzqUgaf
|
||||||
|
WRtSB4T2W7ADtJI35ET61jKBty3CqJY3AiAIwju7dVW3A5WeD6Qc1SZGKZvp9yCb
|
||||||
|
AFI2BfVwwaY11wIgXF3PeGcvACMyMWsuSv7aPXHfliswAbkWuzcwA4TW01ECIGWa
|
||||||
|
cgsDvVFxmfM5NPSuT/UDTa6R5BFISB5ea0N0AR3I
|
||||||
|
-----END RSA PRIVATE KEY-----
|
19
node_modules/tunnel/test/keys/agent2.cnf
generated
vendored
Normal file
19
node_modules/tunnel/test/keys/agent2.cnf
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = US
|
||||||
|
ST = CA
|
||||||
|
L = SF
|
||||||
|
O = Joyent
|
||||||
|
OU = Node.js
|
||||||
|
CN = agent2
|
||||||
|
emailAddress = ry@tinyclouds.org
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
14
node_modules/tunnel/test/keys/agent3-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/agent3-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICKjCCAZMCCQCDBr594bsJmTANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV
|
||||||
|
UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO
|
||||||
|
BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMjEgMB4GCSqGSIb3DQEJARYRcnlA
|
||||||
|
dGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEyWjB9
|
||||||
|
MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK
|
||||||
|
EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MzEgMB4G
|
||||||
|
CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEFAANL
|
||||||
|
ADBIAkEAtlNDZ+bHeBI0B2gD/IWqA7Aq1hwsnS4+XpnLesjTQcL2JwFFpkR0oWrw
|
||||||
|
yjrYhCogi7c5gjKrLZF1d2JD5JgHgQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAJoK
|
||||||
|
bXwsImk7vJz9649yrmsXwnuGbEKVYMvqcGyjaZNP9lYEG41y5CeRzxhWy2rlYdhE
|
||||||
|
f2nqE2lg75oJP7LQqfQY7aCqwahM3q/GQbsfKVCGjF7TVyq9TQzd8iW+FEJIQzSE
|
||||||
|
3aN85hR67+3VAXeSzmkGSVBO2m1SJIug4qftIkc2
|
||||||
|
-----END CERTIFICATE-----
|
10
node_modules/tunnel/test/keys/agent3-csr.pem
generated
vendored
Normal file
10
node_modules/tunnel/test/keys/agent3-csr.pem
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
|
||||||
|
EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD
|
||||||
|
EwZhZ2VudDMxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ
|
||||||
|
KoZIhvcNAQEBBQADSwAwSAJBALZTQ2fmx3gSNAdoA/yFqgOwKtYcLJ0uPl6Zy3rI
|
||||||
|
00HC9icBRaZEdKFq8Mo62IQqIIu3OYIyqy2RdXdiQ+SYB4ECAwEAAaAlMCMGCSqG
|
||||||
|
SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB
|
||||||
|
AEGo76iH+a8pnE+RWQT+wg9/BL+iIuqrcFXLs0rbGonqderrwXAe15ODwql/Bfu3
|
||||||
|
zgMt8ooTsgMPcMX9EgmubEM=
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
9
node_modules/tunnel/test/keys/agent3-key.pem
generated
vendored
Normal file
9
node_modules/tunnel/test/keys/agent3-key.pem
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIBOwIBAAJBALZTQ2fmx3gSNAdoA/yFqgOwKtYcLJ0uPl6Zy3rI00HC9icBRaZE
|
||||||
|
dKFq8Mo62IQqIIu3OYIyqy2RdXdiQ+SYB4ECAwEAAQJAIk+G9s2SKgFa8y3a2jGZ
|
||||||
|
LfqABSzmJGooaIsOpLuYLd6eCC31XUDlT4rPVGRhysKQCQ4+NMjgdnj9ZqNnvXY/
|
||||||
|
RQIhAOgbdltr3Ey2hy7RuDW5rmOeJTuVqCrZ7QI8ifyCEbYTAiEAyRfvWSvvASeP
|
||||||
|
kZTMUhATRUpuyDQW+058NE0oJSinTpsCIQCR/FPhBGI3TcaQyA9Ym0T4GwvIAkUX
|
||||||
|
TqInefRAAX8qSQIgZVJPAdIWGbHSL9sWW97HpukLCorcbYEtKbkamiZyrjMCIQCX
|
||||||
|
lX76ttkeId5OsJGQcF67eFMMr2UGZ1WMf6M39lCYHQ==
|
||||||
|
-----END RSA PRIVATE KEY-----
|
19
node_modules/tunnel/test/keys/agent3.cnf
generated
vendored
Normal file
19
node_modules/tunnel/test/keys/agent3.cnf
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = US
|
||||||
|
ST = CA
|
||||||
|
L = SF
|
||||||
|
O = Joyent
|
||||||
|
OU = Node.js
|
||||||
|
CN = agent3
|
||||||
|
emailAddress = ry@tinyclouds.org
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
15
node_modules/tunnel/test/keys/agent4-cert.pem
generated
vendored
Normal file
15
node_modules/tunnel/test/keys/agent4-cert.pem
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICSDCCAbGgAwIBAgIJAIMGvn3huwmaMA0GCSqGSIb3DQEBBQUAMHoxCzAJBgNV
|
||||||
|
BAYTAlVTMQswCQYDVQQIEwJDQTELMAkGA1UEBxMCU0YxDzANBgNVBAoTBkpveWVu
|
||||||
|
dDEQMA4GA1UECxMHTm9kZS5qczEMMAoGA1UEAxMDY2EyMSAwHgYJKoZIhvcNAQkB
|
||||||
|
FhFyeUB0aW55Y2xvdWRzLm9yZzAeFw0xMTAzMTQxODI5MTJaFw0zODA3MjkxODI5
|
||||||
|
MTJaMH0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTELMAkGA1UEBxMCU0YxDzAN
|
||||||
|
BgNVBAoTBkpveWVudDEQMA4GA1UECxMHTm9kZS5qczEPMA0GA1UEAxMGYWdlbnQ0
|
||||||
|
MSAwHgYJKoZIhvcNAQkBFhFyeUB0aW55Y2xvdWRzLm9yZzBcMA0GCSqGSIb3DQEB
|
||||||
|
AQUAA0sAMEgCQQDN/yMfmQ8zdvmjlGk7b3Mn6wY2FjaMb4c5ENJX15vyYhKS1zhx
|
||||||
|
6n0kQIn2vf6yqG7tO5Okz2IJiD9Sa06mK6GrAgMBAAGjFzAVMBMGA1UdJQQMMAoG
|
||||||
|
CCsGAQUFBwMCMA0GCSqGSIb3DQEBBQUAA4GBAA8FXpRmdrHBdlofNvxa14zLvv0N
|
||||||
|
WnUGUmxVklFLKXvpVWTanOhVgI2TDCMrT5WvCRTD25iT1EUKWxjDhFJrklQJ+IfC
|
||||||
|
KC6fsgO7AynuxWSfSkc8/acGiAH+20vW9QxR53HYiIDMXEV/wnE0KVcr3t/d70lr
|
||||||
|
ImanTrunagV+3O4O
|
||||||
|
-----END CERTIFICATE-----
|
10
node_modules/tunnel/test/keys/agent4-csr.pem
generated
vendored
Normal file
10
node_modules/tunnel/test/keys/agent4-csr.pem
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
|
||||||
|
EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD
|
||||||
|
EwZhZ2VudDQxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ
|
||||||
|
KoZIhvcNAQEBBQADSwAwSAJBAM3/Ix+ZDzN2+aOUaTtvcyfrBjYWNoxvhzkQ0lfX
|
||||||
|
m/JiEpLXOHHqfSRAifa9/rKobu07k6TPYgmIP1JrTqYroasCAwEAAaAlMCMGCSqG
|
||||||
|
SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB
|
||||||
|
AMzo7GUOBtGm5MSck1rrEE2C1bU3qoVvXVuiN3A/57zXeNeq24FZMLnkDeL9U+/b
|
||||||
|
Kj646XFou04gla982Xp74p0=
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
9
node_modules/tunnel/test/keys/agent4-key.pem
generated
vendored
Normal file
9
node_modules/tunnel/test/keys/agent4-key.pem
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIBOQIBAAJBAM3/Ix+ZDzN2+aOUaTtvcyfrBjYWNoxvhzkQ0lfXm/JiEpLXOHHq
|
||||||
|
fSRAifa9/rKobu07k6TPYgmIP1JrTqYroasCAwEAAQJAN8RQb+dx1A7rejtdWbfM
|
||||||
|
Rww7PD07Oz2eL/a72wgFsdIabRuVypIoHunqV0sAegYtNJt9yu+VhREw0R5tx/qz
|
||||||
|
EQIhAPY+nmzp0b4iFRk7mtGUmCTr9iwwzoqzITwphE7FpQnFAiEA1ihUHFT9YPHO
|
||||||
|
f85skM6qZv77NEgXHO8NJmQZ5GX1ZK8CICzle+Mluo0tD6W7HV4q9pZ8wzSJbY8S
|
||||||
|
W/PpKetm09F1AiAWTw8sAGKAtc/IGo3Oq+iuYAN1F8lolzJsfGMCGujsOwIgAJKP
|
||||||
|
t3eXilwX3ZlsDWSklWNZ7iYcfYrvAc3JqU6gFCE=
|
||||||
|
-----END RSA PRIVATE KEY-----
|
21
node_modules/tunnel/test/keys/agent4.cnf
generated
vendored
Normal file
21
node_modules/tunnel/test/keys/agent4.cnf
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = US
|
||||||
|
ST = CA
|
||||||
|
L = SF
|
||||||
|
O = Joyent
|
||||||
|
OU = Node.js
|
||||||
|
CN = agent4
|
||||||
|
emailAddress = ry@tinyclouds.org
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
||||||
|
[ ext_key_usage ]
|
||||||
|
extendedKeyUsage = clientAuth
|
14
node_modules/tunnel/test/keys/ca1-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/ca1-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICIzCCAYwCCQC4ONZJx5BOwjANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
|
||||||
|
UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTExJTAjBgkqhkiG9w0B
|
||||||
|
CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
|
||||||
|
NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww
|
||||||
|
CgYDVQQDEwNjYTExJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu
|
||||||
|
anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOJMS1ug8jUu0wwEfD4h9/Mg
|
||||||
|
w0fvs7JbpMxtwpdcFpg/6ECd8YzGUvljLzeHPe2AhF26MiWIUN3YTxZRiQQ2tv93
|
||||||
|
afRVWchdPypytmuxv2aYGjhZ66Tv4vNRizM71OE+66+KS30gEQW2k4MTr0ZVlRPR
|
||||||
|
OVey+zRSLdVaKciB/XaBAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEApfbly4b+Ry1q
|
||||||
|
bGIgGrlTvNFvF+j2RuHqSpuTB4nKyw1tbNreKmEEb6SBEfkjcTONx5rKECZ5RRPX
|
||||||
|
z4R/o1G6Dn21ouf1pWQO0BC/HnLN30KvvsoZRoxBn/fqBlJA+j/Kpj3RQgFj6l2I
|
||||||
|
AKI5fD+ucPqRGhjmmTsNyc+Ln4UfAq8=
|
||||||
|
-----END CERTIFICATE-----
|
1
node_modules/tunnel/test/keys/ca1-cert.srl
generated
vendored
Normal file
1
node_modules/tunnel/test/keys/ca1-cert.srl
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
B111C9CEF0257692
|
17
node_modules/tunnel/test/keys/ca1-key.pem
generated
vendored
Normal file
17
node_modules/tunnel/test/keys/ca1-key.pem
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN ENCRYPTED PRIVATE KEY-----
|
||||||
|
MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIbo5wvG42IY0CAggA
|
||||||
|
MBQGCCqGSIb3DQMHBAgf8SPuz4biYASCAoAR4r8MVikusOAEt4Xp6nB7whrMX4iG
|
||||||
|
G792Qpf21nHZPMV73w3cdkfimbAfUn8F50tSJwdrAa8U9BjjpL9Kt0loIyXt/r8c
|
||||||
|
6PWAQ4WZuLPgTFUTJUNAXrunBHI0iFWYEN4YzJYmT1qN3J4u0diy0MkKz6eJPfZ3
|
||||||
|
3v97+nF7dR2H86ZgLKsuE4pO5IRb60XW85d7CYaY6rU6l6mXMF0g9sIccHTlFoet
|
||||||
|
Xm6cA7NAm1XSI1ciYcoc8oaVE9dXoOALaTnBEZ2MJGpsYQ0Hr7kB4VKAO9wsOta5
|
||||||
|
L9nXPv79Nzo1MZMChkrORFnwOzH4ffsUwVQ70jUzkt5DEyzCM1oSxFNRQESxnFrr
|
||||||
|
7c1jLg2gxAVwnqYo8njsKJ23BZqZUxHsBgB2Mg1L/iPT6zhclD0u3RZx9MR4ezB2
|
||||||
|
IqoCF19Z5bblkReAeVRAE9Ol4hKVaCEIIPUspcw7eGVGONalHDCSXpIFnJoZLeXJ
|
||||||
|
OZjLmYlA6KkJw52eNE5IwIb8l/tha2fwNpRvlMoXp65yH9wKyJk8zPSM6WAk4dKD
|
||||||
|
nLrTCK4KtM6aIbG14Mff6WEf3uaLPM0cLwxmuypfieCZfkIzgytNdFZoBgaYUpon
|
||||||
|
zazvUMoy3gqDBorcU08SaosdRoL+s+QVkRhA29shf42lqOM4zbh0dTul4QDlLG0U
|
||||||
|
VBNeMJ3HnrqATfBU28j3bUqtuF2RffgcN/3ivlBjcyzF/iPt0TWmm6Zz5v4K8+b6
|
||||||
|
lOm6gofIz+ffg2cXfPzrqZ2/xhFkcerRuN0Xp5eAhlI2vGJVGuEc4X+tT7VtQgLV
|
||||||
|
iovqzlLhp+ph/gsfCcsYZ9iso3ozw+Cx1HfJ8XT7yWUgXxblkt4uszEo
|
||||||
|
-----END ENCRYPTED PRIVATE KEY-----
|
17
node_modules/tunnel/test/keys/ca1.cnf
generated
vendored
Normal file
17
node_modules/tunnel/test/keys/ca1.cnf
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 9999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
output_password = password
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = JP
|
||||||
|
OU = nodejs_jp
|
||||||
|
CN = ca1
|
||||||
|
emailAddress = koichik@improvement.jp
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
14
node_modules/tunnel/test/keys/ca2-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/ca2-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICIzCCAYwCCQCxIhZSDET+8DANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
|
||||||
|
UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0B
|
||||||
|
CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
|
||||||
|
NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww
|
||||||
|
CgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu
|
||||||
|
anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMaaLMMe7K5eYABH3NnJoimG
|
||||||
|
LvY4S5tdGF6YRwfkn1bgGa+kEw1zNqa/Y0jSzs4h7bApt3+bKTalR4+Zk+0UmWgZ
|
||||||
|
Gvlq8+mdqDXtBKoWE3vYDPBmeNyKsgxf9UIhFOpsxVUeYP8t66qJyUk/FlFJcDqc
|
||||||
|
WPawikl1bUFSZXBKu4PxAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAwh3sXPIkA5kn
|
||||||
|
fpg7fV5haS4EpFr9ia61dzWbhXDZtasAx+nWdWqgG4T+HIYSLlMNZbGJ998uhFZf
|
||||||
|
DEHlbY/WuSBukZ0w+xqKBtPyjLIQKVvNiaTx5YMzQes62R1iklOXzBzyHbYIxFOG
|
||||||
|
dqLfIjEe/mVVoR23LN2tr8Wa6+rmd+w=
|
||||||
|
-----END CERTIFICATE-----
|
1
node_modules/tunnel/test/keys/ca2-cert.srl
generated
vendored
Normal file
1
node_modules/tunnel/test/keys/ca2-cert.srl
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
9BF2D4B2E00EDF16
|
10
node_modules/tunnel/test/keys/ca2-crl.pem
generated
vendored
Normal file
10
node_modules/tunnel/test/keys/ca2-crl.pem
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
-----BEGIN X509 CRL-----
|
||||||
|
MIIBXTCBxzANBgkqhkiG9w0BAQQFADB6MQswCQYDVQQGEwJVUzELMAkGA1UECBMC
|
||||||
|
Q0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAOBgNVBAsTB05vZGUu
|
||||||
|
anMxDDAKBgNVBAMTA2NhMjEgMB4GCSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5v
|
||||||
|
cmcXDTExMDMxNDE4MjkxNloXDTEzMTIwNzE4MjkxNlowHDAaAgkAgwa+feG7CZoX
|
||||||
|
DTExMDMxNDE4MjkxNFowDQYJKoZIhvcNAQEEBQADgYEArRKuEkOla61fm4zlZtHe
|
||||||
|
LTXFV0Hgo21PScHAp6JqPol4rN5R9+EmUkv7gPCVVBJ9VjIgxSosHiLsDiz3zR+u
|
||||||
|
txHemhzbdIVANAIiChnFct8sEqH2eL4N6XNUIlMIR06NjNl7NbN8w8haqiearnuT
|
||||||
|
wmnaL4TThPmpbpKAF7N7JqQ=
|
||||||
|
-----END X509 CRL-----
|
1
node_modules/tunnel/test/keys/ca2-database.txt
generated
vendored
Normal file
1
node_modules/tunnel/test/keys/ca2-database.txt
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
R 380729182912Z 110314182914Z 8306BE7DE1BB099A unknown /C=US/ST=CA/L=SF/O=Joyent/OU=Node.js/CN=agent4/emailAddress=ry@tinyclouds.org
|
17
node_modules/tunnel/test/keys/ca2-key.pem
generated
vendored
Normal file
17
node_modules/tunnel/test/keys/ca2-key.pem
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN ENCRYPTED PRIVATE KEY-----
|
||||||
|
MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQI3aq9fKZIOF0CAggA
|
||||||
|
MBQGCCqGSIb3DQMHBAjyunMfVve0OwSCAoAdMsrRFlQUSILw+bq3cSVIIbFjwcs0
|
||||||
|
B1Uz2rc9SB+1qjsazjv4zvPQSXTrsx2EOSJf9PSPz7r+c0NzO9vfWLorpXof/lwL
|
||||||
|
C1tRN7/1OqEW/mTK+1wlv0M5C4cmf44BBXmI+y+RWrQ/qc+CWEMvfHwv9zWr2K+i
|
||||||
|
cLlZv55727GvZYCMMVLiqYd/Ejj98loBsE5dhN4JJ5MPaN3UHhFTCpD453GIIzCi
|
||||||
|
FRuYhOOtX4qYoEuP2db4S2qu26723ZJnYBEHkK2YZiRrgvoZHugyGIr4f/RRoSUI
|
||||||
|
fPgycgQfL3Ow+Y1G533PiZ+CYgh9cViUzhZImEPiZpSuUntAD1loOYkJuV9Ai9XZ
|
||||||
|
+t6+7tfkM3aAo1bkaU8KcfINxxNWfAhCbUQw+tGJl2A+73OM5AGjGSfzjQQL/FOa
|
||||||
|
5omfEvdfEX2XyRRlqnQ2VucvSTL9ZdzbIJGg/euJTpM44Fwc7yAZv2aprbPoPixu
|
||||||
|
yyf0LoTjlGGSBZvHkunpWx82lYEXvHhcnCxV5MDFw8wehvDrvcSuzb8//HzLOiOB
|
||||||
|
gzUr3DOQk4U1UD6xixZjAKC+NUwTVZoHg68KtmQfkq+eGUWf5oJP4xUigi3ui/Wy
|
||||||
|
OCBDdlRBkFtgLGL51KJqtq1ixx3Q9HMl0y6edr5Ls0unDIo0LtUWUUcAtr6wl+kK
|
||||||
|
zSztxFMi2zTtbhbkwoVpucNstFQNfV1k22vtnlcux2FV2DdZiJQwYpIbr8Gj6gpK
|
||||||
|
gtV5l9RFe21oZBcKPt/chrF8ayiClfGMpF3D2p2GqGCe0HuH5uM/JAFf60rbnriA
|
||||||
|
Nu1bWiXsXLRUXcLIQ/uEPR3Mvvo9k1h4Q6it1Rp67eQiXCX6h2uFq+sB
|
||||||
|
-----END ENCRYPTED PRIVATE KEY-----
|
1
node_modules/tunnel/test/keys/ca2-serial
generated
vendored
Normal file
1
node_modules/tunnel/test/keys/ca2-serial
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
01
|
17
node_modules/tunnel/test/keys/ca2.cnf
generated
vendored
Normal file
17
node_modules/tunnel/test/keys/ca2.cnf
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 9999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
output_password = password
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = JP
|
||||||
|
OU = nodejs_jp
|
||||||
|
CN = ca2
|
||||||
|
emailAddress = koichik@improvement.jp
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
14
node_modules/tunnel/test/keys/ca3-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/ca3-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICIzCCAYwCCQCudHFhEWiUHDANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
|
||||||
|
UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTMxJTAjBgkqhkiG9w0B
|
||||||
|
CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
|
||||||
|
NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww
|
||||||
|
CgYDVQQDEwNjYTMxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu
|
||||||
|
anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJPRJMhCNtxX6dQ3rLdrzVCl
|
||||||
|
XJMSRIICpbsc7arOzSJcrsIYeYC4d29dGwxYNLnAkKSmHujFT9SmFgh88CoYETLp
|
||||||
|
gE9zCk9hVCwUlWelM/UaIrzeLT4SC3VBptnLmMtk2mqFniLcaFdMycAcX8OIhAgG
|
||||||
|
fbqyT5Wxwz7UMegip2ZjAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEADpu8a/W+NPnS
|
||||||
|
mhyIOxXn8O//2oH9ELlBYFLIgTid0xmS05x/MgkXtWqiBEEZFoOfoJBJxM3vTFs0
|
||||||
|
PiZvcVjv0IIjDF4s54yRVH+4WI2p7cil1fgzAVRTuOIuR+VyN7ct8s26a/7GFDq6
|
||||||
|
NJMByyjsJHyxwwri5hVv+jbLCxmnDjI=
|
||||||
|
-----END CERTIFICATE-----
|
1
node_modules/tunnel/test/keys/ca3-cert.srl
generated
vendored
Normal file
1
node_modules/tunnel/test/keys/ca3-cert.srl
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
EF7B2CF0FA61DF41
|
17
node_modules/tunnel/test/keys/ca3-key.pem
generated
vendored
Normal file
17
node_modules/tunnel/test/keys/ca3-key.pem
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN ENCRYPTED PRIVATE KEY-----
|
||||||
|
MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIwAta+L4c9soCAggA
|
||||||
|
MBQGCCqGSIb3DQMHBAgqRud2p3SvogSCAoDXoDJOJDkvgFpQ6rxeV5r0fLX4SrGJ
|
||||||
|
quv4yt02QxSDUPN2ZLtBt6bLzg4Zv2pIggufYJcZ2IOUnX82T7FlvBP8hbW1q3Bs
|
||||||
|
jAso7z8kJlFrZjNudjuP2l/X8tjrVyr3I0PoRoomtcHnCcSDdyne8Dqqj1enuikF
|
||||||
|
8b7FZUqocNLfu8LmNGxMmMwjw3UqhtpP5DjqV60B8ytQFPoz/gFh6aNGvsrD/avU
|
||||||
|
Dj8EJkQZP6Q32vmCzAvSiLjk7FA7RFmBtaurE9hJYNlc5v1eo69EUwPkeVlTpglJ
|
||||||
|
5sZAHxlhQCgc72ST6uFQKiMO3ng/JJA5N9EvacYSHQvI1TQIo43V2A//zUh/5hGL
|
||||||
|
sDv4pRuFq9miX8iiQpwo1LDfRzdwg7+tiLm8/mDyeLUSzDNc6GIX/tC9R4Ukq4ge
|
||||||
|
1Cfq0gtKSRxZhM8HqpGBC9rDs5mpdUqTRsoHLFn5T6/gMiAtrLCJxgD8JsZBa8rM
|
||||||
|
KZ09QEdZXTvpyvZ8bSakP5PF6Yz3QYO32CakL7LDPpCng0QDNHG10YaZbTOgJIzQ
|
||||||
|
NJ5o87DkgDx0Bb3L8FoREIBkjpYFbQi2fvPthoepZ3D5VamVsOwOiZ2sR1WF2J8l
|
||||||
|
X9c8GdG38byO+SQIPNZ8eT5JvUcNeSlIZiVSwvaEk496d2KzhmMMfoBLFVeHXG90
|
||||||
|
CIZPleVfkTmgNQgXPWcFngqTZdDEGsHjEDDhbEAijB3EeOxyiiEDJPMy5zqkdy5D
|
||||||
|
cZ/Y77EDbln7omcyL+cGvCgBhhYpTbtbuBtzW4CiCvcfEB5N4EtJKOTRJXIpL/d3
|
||||||
|
oVnZruqRRKidKwFMEZU2NZJX5FneAWFSeCv0IrY2vAUIc3El+n84CFFK
|
||||||
|
-----END ENCRYPTED PRIVATE KEY-----
|
17
node_modules/tunnel/test/keys/ca3.cnf
generated
vendored
Normal file
17
node_modules/tunnel/test/keys/ca3.cnf
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 9999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
output_password = password
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = JP
|
||||||
|
OU = nodejs_jp
|
||||||
|
CN = ca3
|
||||||
|
emailAddress = koichik@improvement.jp
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
14
node_modules/tunnel/test/keys/ca4-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/ca4-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICIzCCAYwCCQDUGh2r7lOpITANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
|
||||||
|
UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTQxJTAjBgkqhkiG9w0B
|
||||||
|
CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
|
||||||
|
NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww
|
||||||
|
CgYDVQQDEwNjYTQxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu
|
||||||
|
anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOOC+SPC8XzkjIHfKPMzzNV6
|
||||||
|
O/LpqQWdzJtEvFNW0oQ9g8gSV4iKqwUFrLNnSlwSGigvqKqGmYtG8S17ANWInoxI
|
||||||
|
c3sQlrS2cGbgLUBNKu4hZ7s+11EPOjbnn0QUE5w9GN8fy8CDx7ID/8URYKoxcoRv
|
||||||
|
0w7EJ2agfd68KS1ayxUXAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAumPFeR63Dyki
|
||||||
|
SWQtRAe2QWkIFlSRAR2PvSDdsDMLwMeXF5wD3Hv51yfTu9Gkg0QJB86deYfQ5vfV
|
||||||
|
4QsOQ35icesa12boyYpTE0/OoEX1f/s1sLlszpRvtAki3J4bkcGWAzM5yO1fKqpQ
|
||||||
|
MbtPzLn+DA7ymxuJa6EQAEb+kaJEBuU=
|
||||||
|
-----END CERTIFICATE-----
|
1
node_modules/tunnel/test/keys/ca4-cert.srl
generated
vendored
Normal file
1
node_modules/tunnel/test/keys/ca4-cert.srl
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
B01FE0416A2EDCF5
|
17
node_modules/tunnel/test/keys/ca4-key.pem
generated
vendored
Normal file
17
node_modules/tunnel/test/keys/ca4-key.pem
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN ENCRYPTED PRIVATE KEY-----
|
||||||
|
MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIWE/ri/feeikCAggA
|
||||||
|
MBQGCCqGSIb3DQMHBAiu6hUzoFnsVASCAoC53ZQ4gxLcFnb5yAcdCl4DdKOJ5m4G
|
||||||
|
CHosR87pJpZlO68DsCKwORUp9tTmb1/Q4Wm9n2kRf6VQNyVVm6REwzEPAgIJEgy2
|
||||||
|
FqLmfqpTElbRsQako8UDXjDjaMO30e+Qhy8HOTrHMJZ6LgrU90xnOCPPeN9fYmIu
|
||||||
|
YBkX4qewUfu+wFzk/unUbFLChvJsEN4fdrlDwTJMHRzKwbdvg3mHlCnspWwjA2Mc
|
||||||
|
q27QPeb3mwRUajmqL0dT9y7wVYeAN2zV59VoWm6zV+dWFgyMlVrVCRYkqQC3xOsy
|
||||||
|
ZlKrGldrY8nNdv5s6+Sc7YavTJiJxHgIB7sm6QFIsdqjxTBEGD4/YhEI52SUw/xO
|
||||||
|
VJmOTWdWUz4FdWNi7286nfhZ0+mdv6fUoG54Qv6ahnUMJvEsp60LkR1gHXLzQu/m
|
||||||
|
+yDZFqY/IIg2QA7M3gL0Md5GrWydDlD2uBPoXcC4A5gfOHswzHWDKurDCpoMqdpn
|
||||||
|
CUQ/ZVl2rwF8Pnty61MjY1xCN1r8xQjFBCgcfBWw5v6sNRbr/vef3TfQIBzVm+hx
|
||||||
|
akDb1nckBsIjMT9EfeT6hXub2n0oehEHewF1COifbcOjnxToLSswPLrtb0behB+o
|
||||||
|
zTgftn+4XrkY0sFY69TzYtQVMLAsiWTpZFvAi+D++2pXlQ/bnxKJiBBc6kZuAGpN
|
||||||
|
z+cJ4kUuFE4S9v5C5vK89nIgcuJT06u8wYTy0N0j/DnIjSaVgGr0Y0841mXtU1VV
|
||||||
|
wUZjuyYrVwVT/g5r6uzEFldTcjmYkbMaxo+MYnEZZgqYJvu2QlK87YxJOwo+D1NX
|
||||||
|
4gl1s/bmlPlGw/t9TxutI3S9PEr3JM3013e9UPE+evlTG9IIrZaUPzyj
|
||||||
|
-----END ENCRYPTED PRIVATE KEY-----
|
17
node_modules/tunnel/test/keys/ca4.cnf
generated
vendored
Normal file
17
node_modules/tunnel/test/keys/ca4.cnf
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 9999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
output_password = password
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = JP
|
||||||
|
OU = nodejs_jp
|
||||||
|
CN = ca4
|
||||||
|
emailAddress = koichik@improvement.jp
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
16
node_modules/tunnel/test/keys/client.cnf
generated
vendored
Normal file
16
node_modules/tunnel/test/keys/client.cnf
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 9999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = JP
|
||||||
|
OU = nodejs_jp
|
||||||
|
CN = localhost
|
||||||
|
emailAddress = koichik@improvement.jp
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
14
node_modules/tunnel/test/keys/client1-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/client1-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICKTCCAZICCQDveyzw+mHfQTANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
|
||||||
|
UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTMxJTAjBgkqhkiG9w0B
|
||||||
|
CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
|
||||||
|
NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw
|
||||||
|
EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92
|
||||||
|
ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMYUuKyuxT93zvrS
|
||||||
|
mL8IMI8xu8dP3iRZDUYu6dmq6Dntgb7intfzxtEFVmfNCDGwJwg7UKx/FzftGxFb
|
||||||
|
9LksuvAQuW2FLhCrOmXUVU938OZkQRSflISD80kd4i9JEoKKYPX1imjaMugIQ0ta
|
||||||
|
Bq2orY6sna8JAUVDW6WO3wVEJ4mBAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAAbaH
|
||||||
|
bc/6dIFC9TPIDrgsLtsOtycdBJqKbFT1wThhyKncXF/iyaI+8N4UA+hXMjk8ODUl
|
||||||
|
BVmmgaN6ufMLwnx/Gdl9FLmmDq4FQ4zspClTJo42QPzg5zKoPSw5liy73LM7z+nG
|
||||||
|
g6IeM8RFlEbs109YxqvQnbHfTgeLdIsdvtNXU80=
|
||||||
|
-----END CERTIFICATE-----
|
12
node_modules/tunnel/test/keys/client1-csr.pem
generated
vendored
Normal file
12
node_modules/tunnel/test/keys/client1-csr.pem
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES
|
||||||
|
MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv
|
||||||
|
dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDGFLisrsU/d876
|
||||||
|
0pi/CDCPMbvHT94kWQ1GLunZqug57YG+4p7X88bRBVZnzQgxsCcIO1Csfxc37RsR
|
||||||
|
W/S5LLrwELlthS4Qqzpl1FVPd/DmZEEUn5SEg/NJHeIvSRKCimD19Ypo2jLoCENL
|
||||||
|
WgatqK2OrJ2vCQFFQ1uljt8FRCeJgQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg
|
||||||
|
Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAB5NvNSHX+WDlF5R
|
||||||
|
LNr7SI2NzIy5OWEAgTxLkvS0NS75zlDLScaqwgs1uNfB2AnH0Fpw9+pePEijlb+L
|
||||||
|
3VRLNpV8hRn5TKztlS3O0Z4PPb7hlDHitXukTOQYrq0juQacodVSgWqNbac+O2yK
|
||||||
|
qf4Y3A7kQO1qmDOfN6QJFYVIpPiP
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
15
node_modules/tunnel/test/keys/client1-key.pem
generated
vendored
Normal file
15
node_modules/tunnel/test/keys/client1-key.pem
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIICXAIBAAKBgQDGFLisrsU/d8760pi/CDCPMbvHT94kWQ1GLunZqug57YG+4p7X
|
||||||
|
88bRBVZnzQgxsCcIO1Csfxc37RsRW/S5LLrwELlthS4Qqzpl1FVPd/DmZEEUn5SE
|
||||||
|
g/NJHeIvSRKCimD19Ypo2jLoCENLWgatqK2OrJ2vCQFFQ1uljt8FRCeJgQIDAQAB
|
||||||
|
AoGAbfcM+xjfejeqGYcWs175jlVe2OyW93jUrLTYsDV4TMh08iLfaiX0pw+eg2vI
|
||||||
|
88TGNoSvacP4gNzJ3R4+wxp5AFlRKZ876yL7D0VKavMFwbyRk21+D/tLGvW6gqOC
|
||||||
|
4qi4IWSkfgBh5RK+o4jZcl5tzRPQyuxR3pJGBS33q5K2dEECQQDhV4NuKZcGDnKt
|
||||||
|
1AhmtzqsJ4wrp2a3ysZYDTWyA692NGXi2Vnpnc6Aw9JchJhT3cueFLcOTFrb/ttu
|
||||||
|
ZC/iA67pAkEA4Qe7LvcPvHlwNAmzqzOg2lYAqq+aJY2ghfJMqr3dPCJqbHJnLN6p
|
||||||
|
GXsqGngwVlnvso0O/n5g30UmzvkRMFZW2QJAbOMQy0alh3OrzntKo/eeDln9zYpS
|
||||||
|
hDUjqqCXdbF6M7AWG4vTeqOaiXYWTEZ2JPBj17tCyVH0BaIc/jbDPH9zIQJBALei
|
||||||
|
YH0l/oB2tTqyBB2cpxIlhqvDW05z8d/859WZ1PVivGg9P7cdCO+TU7uAAyokgHe7
|
||||||
|
ptXFefYZb18NX5qLipkCQHjIo4BknrO1oisfsusWcCC700aRIYIDk0QyEEIAY3+9
|
||||||
|
7ar/Oo1EbqWA/qN7zByPuTKrjrb91/D+IMFUFgb4RWc=
|
||||||
|
-----END RSA PRIVATE KEY-----
|
16
node_modules/tunnel/test/keys/client1.cnf
generated
vendored
Normal file
16
node_modules/tunnel/test/keys/client1.cnf
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 9999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = JP
|
||||||
|
OU = nodejs_jp
|
||||||
|
CN = localhost
|
||||||
|
emailAddress = koichik@improvement.jp
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
14
node_modules/tunnel/test/keys/client2-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/client2-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICKTCCAZICCQCwH+BBai7c9TANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
|
||||||
|
UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTQxJTAjBgkqhkiG9w0B
|
||||||
|
CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
|
||||||
|
NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw
|
||||||
|
EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92
|
||||||
|
ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMJQGt34PZX5pQmi
|
||||||
|
3bNp3dryr7qPO3oGhTeShLCeZ6PPCdnmVl0PnT0n8/DFBlaijbvXGU9AjcFZ7gg7
|
||||||
|
hcSAFLGmPEb2pug021yzl7u0qUD2fnVaEzfJ04ZU4lUCFqGKsfFVQuIkDHFwadbE
|
||||||
|
AO+8EqOmDynUMkKfHPWQK6O9jt5ZAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEA143M
|
||||||
|
QIygJGDv2GFKlVgV05/CYZo6ouX9I6vPRekJnGeL98lmVH83Ogb7Xmc2SbJ18qFq
|
||||||
|
naBYnUEmHPUAZ2Ms2KuV3OOvscUSCsEJ4utJYznOT8PsemxVWrgG1Ba+zpnPkdII
|
||||||
|
p+PanKCsclNUKwBlSkJ8XfGi9CAZJBykwws3O1c=
|
||||||
|
-----END CERTIFICATE-----
|
12
node_modules/tunnel/test/keys/client2-csr.pem
generated
vendored
Normal file
12
node_modules/tunnel/test/keys/client2-csr.pem
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES
|
||||||
|
MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv
|
||||||
|
dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCUBrd+D2V+aUJ
|
||||||
|
ot2zad3a8q+6jzt6BoU3koSwnmejzwnZ5lZdD509J/PwxQZWoo271xlPQI3BWe4I
|
||||||
|
O4XEgBSxpjxG9qboNNtcs5e7tKlA9n51WhM3ydOGVOJVAhahirHxVULiJAxxcGnW
|
||||||
|
xADvvBKjpg8p1DJCnxz1kCujvY7eWQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg
|
||||||
|
Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAA//UPKPpVEpflDj
|
||||||
|
DBboWewa6yw8FEOnMvh6eeg/a8KbXfIYnkZRtxbmH06ygywBy/RUBCbM5EzyElkJ
|
||||||
|
bTVKorzCHnxuTfSnKQ68ZD+vI2SNjiWqQFXW6oOCPzLbtaTJVKw5D6ylBp8Zsu6n
|
||||||
|
BzQ/4Y42aX/HW4nfJeDydxNFYVJJ
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
15
node_modules/tunnel/test/keys/client2-key.pem
generated
vendored
Normal file
15
node_modules/tunnel/test/keys/client2-key.pem
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIICWwIBAAKBgQDCUBrd+D2V+aUJot2zad3a8q+6jzt6BoU3koSwnmejzwnZ5lZd
|
||||||
|
D509J/PwxQZWoo271xlPQI3BWe4IO4XEgBSxpjxG9qboNNtcs5e7tKlA9n51WhM3
|
||||||
|
ydOGVOJVAhahirHxVULiJAxxcGnWxADvvBKjpg8p1DJCnxz1kCujvY7eWQIDAQAB
|
||||||
|
AoGAbiT0JdCaMFIzb/PnEdU30e1xGSIpx7C8gNTH7EnOW7d3URHU8KlyKwFjsJ4u
|
||||||
|
SpuYFdsG2Lqx3+D3IamD2O/1SgODmtdFas1C/hQ2zx42SgyBQolVJU1MHJxHqmCb
|
||||||
|
nm2Wo8aHmvFXpQ8OF4YJLPxLOSdvmq0PC17evDyjz5PciWUCQQD5yzaBpJ7yzGwd
|
||||||
|
b6nreWj6pt+jfi11YsA3gAdvTJcFzMGyNNC+U9OExjQqHsyaHyxGhHKQ6y+ybZkR
|
||||||
|
BggkudPfAkEAxyQC/hmcvWegdGI4xOJNbm0kv8UyxyeqhtgzEW2hWgEQs4k3fflZ
|
||||||
|
iNpvxyIBIp/7zZo02YqeQfZlDYuxKypUxwJAa6jQBzRCZXcBqfY0kA611kIR5U8+
|
||||||
|
nHdBTSpbCfdCp/dGDF6DEWTjpzgdx4GawVpqJMJ09kzHM+nUrOeinuGQlQJAMAsV
|
||||||
|
Gb6OHPfaMxnbPkymh6SXQBjQNlHwhxWzxFmhmrg1EkthcufsXOLuIqmmgnb8Zc71
|
||||||
|
PyJ9KcbK/GieNp7A0wJAIz3Mm3Up9Rlk25TH9k5e3ELjC6fkd93u94Uo145oTgDm
|
||||||
|
HSbCbjifP5eVl66PztxZppG2GBXiXT0hA/RMruTQMg==
|
||||||
|
-----END RSA PRIVATE KEY-----
|
16
node_modules/tunnel/test/keys/client2.cnf
generated
vendored
Normal file
16
node_modules/tunnel/test/keys/client2.cnf
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 9999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = JP
|
||||||
|
OU = nodejs_jp
|
||||||
|
CN = localhost
|
||||||
|
emailAddress = koichik@improvement.jp
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
14
node_modules/tunnel/test/keys/proxy1-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/proxy1-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICKTCCAZICCQCb8tSy4A7fFTANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
|
||||||
|
UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0B
|
||||||
|
CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
|
||||||
|
NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw
|
||||||
|
EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92
|
||||||
|
ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALiUyeosVxtJK8G4
|
||||||
|
sAqU2DBLx5sMuZpV/YcW/YxUuJv3t/9TpVxcWAs6VRPzi5fqKe8TER8qxi1/I8zV
|
||||||
|
Qks1gWyZ01reU6Wpdt1MZguF036W2qKOxlJXvnqnRDWu9IFf6KMjSJjFZb6nqhQv
|
||||||
|
aiL/80hqc2qXVfuJbSYlGrKWFFINAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEABPIn
|
||||||
|
+vQoDpJx7lVNJNOe7DE+ShCXCK6jkQY8+GQXB1sz5K0OWdZxUWOOp/fcjNJua0NM
|
||||||
|
hgnylWu/pmjPh7c9xHdZhuh6LPD3F0k4QqK+I2rg45gdBPZT2IxEvxNYpGIfayvY
|
||||||
|
ofOgbienn69tMzGCMF/lUmEJu7Bn08EbL+OyNBg=
|
||||||
|
-----END CERTIFICATE-----
|
12
node_modules/tunnel/test/keys/proxy1-csr.pem
generated
vendored
Normal file
12
node_modules/tunnel/test/keys/proxy1-csr.pem
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES
|
||||||
|
MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv
|
||||||
|
dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4lMnqLFcbSSvB
|
||||||
|
uLAKlNgwS8ebDLmaVf2HFv2MVLib97f/U6VcXFgLOlUT84uX6invExEfKsYtfyPM
|
||||||
|
1UJLNYFsmdNa3lOlqXbdTGYLhdN+ltqijsZSV756p0Q1rvSBX+ijI0iYxWW+p6oU
|
||||||
|
L2oi//NIanNql1X7iW0mJRqylhRSDQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg
|
||||||
|
Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAFhZc2cvYGf8mCg/
|
||||||
|
5nPWmnjNIqgy7uJnOGfE3AP4rW48yiVHCJK9ZmPogbH7gBMOBrrX8fLX3ThK9Sbj
|
||||||
|
uJlBlZD/19zjM+kvJ14DcievJ15S3KehVQ6Ipmgbz/vnAaL1D+ZiOnjQad2/Fzg4
|
||||||
|
0MFXQaZFEUcI8fKnv/zmYi1aivej
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
15
node_modules/tunnel/test/keys/proxy1-key.pem
generated
vendored
Normal file
15
node_modules/tunnel/test/keys/proxy1-key.pem
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIICXQIBAAKBgQC4lMnqLFcbSSvBuLAKlNgwS8ebDLmaVf2HFv2MVLib97f/U6Vc
|
||||||
|
XFgLOlUT84uX6invExEfKsYtfyPM1UJLNYFsmdNa3lOlqXbdTGYLhdN+ltqijsZS
|
||||||
|
V756p0Q1rvSBX+ijI0iYxWW+p6oUL2oi//NIanNql1X7iW0mJRqylhRSDQIDAQAB
|
||||||
|
AoGADPSkl4M1Of0QzTAhaxy3b+xhvkhOXr7aZLkAYvEvZAMnLwy39puksmUNw7C8
|
||||||
|
g5U0DEvST9W4w0jBQodVd+Hxi4dUS4BLDVVStaLMa1Fjai/4uBPxbsrvdHzDu7if
|
||||||
|
BI6t12vWNNRtTxbfCJ1Fs3nHvDG0ueBZX3fYWBIPPM4bRQECQQDjmCrxbkfFrN5z
|
||||||
|
JXHfmzoNovV7KzgwRLKOLF17dYnhaG3G77JYjhEjIg5VXmQ8XJrwS45C/io5feFA
|
||||||
|
qrsy/0v1AkEAz55QK8CLue+sn0J8Yw//yLjJT6BK4pCFFKDxyAvP/3r4t7+1TgDj
|
||||||
|
KAfUMWb5Hcn9iT3sEykUeOe0ghU0h5X2uQJBAKES2qGPuP/vvmejwpnMVCO+hxmq
|
||||||
|
ltOiavQv9eEgaHq826SFk6UUtpA01AwbB7momIckEgTbuKqDql2H94C6KdkCQQC7
|
||||||
|
PfrtyoP5V8dmBk8qBEbZ3pVn45dFx7LNzOzhTo3yyhO/m/zGcZRsCMt9FnI7RG0M
|
||||||
|
tjTPfvAArm8kFj2+vie5AkASvVx478N8so+02QWKme4T3ZDX+HDBXgFH1+SMD91m
|
||||||
|
9tS6x2dtTNvvwBA2KFI1fUg3B/wDoKJQRrqwdl8jpoGP
|
||||||
|
-----END RSA PRIVATE KEY-----
|
16
node_modules/tunnel/test/keys/proxy1.cnf
generated
vendored
Normal file
16
node_modules/tunnel/test/keys/proxy1.cnf
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 9999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = JP
|
||||||
|
OU = nodejs_jp
|
||||||
|
CN = localhost
|
||||||
|
emailAddress = koichik@improvement.jp
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
14
node_modules/tunnel/test/keys/proxy2-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/proxy2-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICJjCCAY8CCQCb8tSy4A7fFjANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
|
||||||
|
UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0B
|
||||||
|
CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
|
||||||
|
NTEwMTEyMzIxWjBZMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQ8w
|
||||||
|
DQYDVQQDEwZwcm94eTIxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1l
|
||||||
|
bnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALZ3oNCmB2P4Q9DoUVFq
|
||||||
|
Z1ByASLm63jTPEumv2kX81GF5QMLRl59HBM6Te1rRR7wFHL0iBQUYuEzNPmedXpU
|
||||||
|
cds0uWl5teoO63ZSKFL1QLU3PMFo56AeWeznxOhy6vwWv3M8C391X6lYsiBow3K9
|
||||||
|
d37p//GLIR+jl6Q4xYD41zaxAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEADUQgtmot
|
||||||
|
8zqsRQInjWAypcntkxX8hdUOEudN2/zjX/YtMZbr8rRvsZzBsUDdgK+E2EmEb/N3
|
||||||
|
9ARZ0T2zWFFphJapkZOM1o1+LawN5ON5HfTPqr6d9qlHuRdGCBpXMUERO2V43Z+S
|
||||||
|
Zwm+iw1yZEs4buTmiw6zu6Nq0fhBlTiAweE=
|
||||||
|
-----END CERTIFICATE-----
|
12
node_modules/tunnel/test/keys/proxy2-csr.pem
generated
vendored
Normal file
12
node_modules/tunnel/test/keys/proxy2-csr.pem
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBvjCCAScCAQAwWTELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDEP
|
||||||
|
MA0GA1UEAxMGcHJveHkyMSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJvdmVt
|
||||||
|
ZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2d6DQpgdj+EPQ6FFR
|
||||||
|
amdQcgEi5ut40zxLpr9pF/NRheUDC0ZefRwTOk3ta0Ue8BRy9IgUFGLhMzT5nnV6
|
||||||
|
VHHbNLlpebXqDut2UihS9UC1NzzBaOegHlns58Tocur8Fr9zPAt/dV+pWLIgaMNy
|
||||||
|
vXd+6f/xiyEfo5ekOMWA+Nc2sQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEgY2hh
|
||||||
|
bGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBADC4dh/+gQnJcPMQ0riJ
|
||||||
|
CBVLygcCWxkNvwM3ARboyihuNbzFX1f2g23Zr5iLphiuEFCPDOyd26hHieQ8Xo1y
|
||||||
|
FPuDXpWMx9X9MLjCWg8kdtada7HsYffbUvpjjL9TxFh+rX0cmr6Ixc5kV7AV4I6V
|
||||||
|
3h8BYJebX+XfuYrI1UwEqjqI
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
15
node_modules/tunnel/test/keys/proxy2-key.pem
generated
vendored
Normal file
15
node_modules/tunnel/test/keys/proxy2-key.pem
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIICXQIBAAKBgQC2d6DQpgdj+EPQ6FFRamdQcgEi5ut40zxLpr9pF/NRheUDC0Ze
|
||||||
|
fRwTOk3ta0Ue8BRy9IgUFGLhMzT5nnV6VHHbNLlpebXqDut2UihS9UC1NzzBaOeg
|
||||||
|
Hlns58Tocur8Fr9zPAt/dV+pWLIgaMNyvXd+6f/xiyEfo5ekOMWA+Nc2sQIDAQAB
|
||||||
|
AoGBALPH0o9Bxu5c4pSnEdgh+oFskmoNE90MY9A2D0pA6uBcCHSjW0YmBs97FuTi
|
||||||
|
WExPSBarkJgYLgStK3j3A9Dv+uzRRT0gSr34vKFh5ozI+nJZOMNJyHDOCFiT9sm7
|
||||||
|
urDW0gSq9OW/H8NbAkxkBZw0PaB9oW5nljuieVIFDYXNAeMBAkEA6NfBHjzp3GS0
|
||||||
|
RbtaBkxn3CRlEoUUPVd3sJ6lW2XBu5AWrgNHRSlh0oBupXgd3cxWIB69xPOg6QjU
|
||||||
|
XmvcLjBlCQJBAMidTIw4s89m4+14eY/KuXaEgxW/awLEbQP2JDCjY1wT3Ya3Ggac
|
||||||
|
HIFuGdTbd2faJPxNJjoljZnatSdwY5aXFmkCQBQZM5FBnsooYys1vdKXW8uz1Imh
|
||||||
|
tRqKZ0l2mD1obi2bhWml3MwKg2ghL+vWj3VqwvBo1uaeRQB4g6RW2R2fjckCQQCf
|
||||||
|
FnZ0oCafa2WGlMo5qDbI8K6PGXv/9srIoHH0jC0oAKzkvuEJqtTEIw6jCOM43PoF
|
||||||
|
hhyxccRH5PNRckPXULs5AkACxKEL1dN+Bx72zE8jSU4DB5arpQdGOvuVsqXgVM/5
|
||||||
|
QLneJEHGPCqNFS1OkWUYLtX0S28X5GmHMEpLRLpgE9JY
|
||||||
|
-----END RSA PRIVATE KEY-----
|
16
node_modules/tunnel/test/keys/proxy2.cnf
generated
vendored
Normal file
16
node_modules/tunnel/test/keys/proxy2.cnf
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 9999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = JP
|
||||||
|
OU = nodejs_jp
|
||||||
|
CN = proxy2
|
||||||
|
emailAddress = koichik@improvement.jp
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
14
node_modules/tunnel/test/keys/server1-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/server1-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICKTCCAZICCQCxEcnO8CV2kTANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
|
||||||
|
UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTExJTAjBgkqhkiG9w0B
|
||||||
|
CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
|
||||||
|
NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw
|
||||||
|
EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92
|
||||||
|
ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALYb3z6TVgD8VmV2
|
||||||
|
i0IHoes/HNVz+/UgXxRoA7gTUXp4Q69HBymWwm4fG61YMn7XAjy0gyC2CX/C0S74
|
||||||
|
ZzHkhq1DCXCtlXCDx5oZhSRPpa902MVdDSRR+naLA4PPFkV2pI53hsFW37M5Dhge
|
||||||
|
+taFbih/dbjpOnhLD+SbkSKNTw/dAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAjDNi
|
||||||
|
mdmMM8Of/8iCYISqkqCG+7fz747Ntkg5fVMPufkwrBfkD9UjYVbfIpEOkZ3L0If9
|
||||||
|
0/wNi0uZobIJnd/9B/e0cHKYnx0gkhUpMylaRvIV4odKe2vq3+mjwMb9syYXYDx3
|
||||||
|
hw2qDMIIPr0S5ICeoIKXhbsYtODVxKSdJq+FjAI=
|
||||||
|
-----END CERTIFICATE-----
|
12
node_modules/tunnel/test/keys/server1-csr.pem
generated
vendored
Normal file
12
node_modules/tunnel/test/keys/server1-csr.pem
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES
|
||||||
|
MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv
|
||||||
|
dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2G98+k1YA/FZl
|
||||||
|
dotCB6HrPxzVc/v1IF8UaAO4E1F6eEOvRwcplsJuHxutWDJ+1wI8tIMgtgl/wtEu
|
||||||
|
+Gcx5IatQwlwrZVwg8eaGYUkT6WvdNjFXQ0kUfp2iwODzxZFdqSOd4bBVt+zOQ4Y
|
||||||
|
HvrWhW4of3W46Tp4Sw/km5EijU8P3QIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg
|
||||||
|
Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAJLLYClTc1BZbQi4
|
||||||
|
2GrGEimzJoheXXD1vepECS6TaeYJFSQldMGdkn5D8TMXWW115V4hw7a1pCwvRBPH
|
||||||
|
dVEeh3u3ktI1e4pS5ozvpbpYanILrHCNOQ4PvKi9rzG9Km8CprPcrJCZlWf2QUBK
|
||||||
|
gVNgqZJeqyEcBu80/ajjc6xrZsSP
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
15
node_modules/tunnel/test/keys/server1-key.pem
generated
vendored
Normal file
15
node_modules/tunnel/test/keys/server1-key.pem
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIICXQIBAAKBgQC2G98+k1YA/FZldotCB6HrPxzVc/v1IF8UaAO4E1F6eEOvRwcp
|
||||||
|
lsJuHxutWDJ+1wI8tIMgtgl/wtEu+Gcx5IatQwlwrZVwg8eaGYUkT6WvdNjFXQ0k
|
||||||
|
Ufp2iwODzxZFdqSOd4bBVt+zOQ4YHvrWhW4of3W46Tp4Sw/km5EijU8P3QIDAQAB
|
||||||
|
AoGAcDioz+T3gM//ZbMxidUuQMu5twgsYhg6v1aBxDOTaEcoXqEElupikn31DlNl
|
||||||
|
eqiApmwOyl+jZunlAm7tGN/c5WjmZtW6watv1D7HjDIFJQBdiOv2jLeV5gsoArMP
|
||||||
|
f8Y13MS68nJ7/ZkqisovjBlD7ZInbyUiJj0FH/cazauflIECQQDwHgQ0J46eL5EG
|
||||||
|
3smQQG9/8b/Wsnf8s9Vz6X/KptsbL3c7mCBY9/+cGw0xVxoUOyO7KGPzpRhtz4Y0
|
||||||
|
oP+JwISxAkEAwieUtl+SuUAn6er1tZzPPiAM2w6XGOAod+HuPjTAKVhLKHYIEJbU
|
||||||
|
jhPdjOGtZr10ED9g0m7M4n3JKMMM00W47QJBAOVkp7tztwpkgva/TG0lQeBHgnCI
|
||||||
|
G50t6NRN1Koz8crs88nZMb4NXwMxzM7AWcfOH/qjQan4pXfy9FG/JaHibGECQH8i
|
||||||
|
L+zj1E3dxsUTh+VuUv5ZOlHO0f4F+jnWBY1SOWpZWI2cDFfgjDqko3R26nbWI8Pn
|
||||||
|
3FyvFRZSS4CXiDRn+VkCQQCKPBl60QAifkZITqL0dCs+wB2hhmlWwqlpq1ZgeCby
|
||||||
|
zwmZY1auUK1BYBX1aPB85+Bm2Zhp5jnkwRcO7iSYy8+C
|
||||||
|
-----END RSA PRIVATE KEY-----
|
16
node_modules/tunnel/test/keys/server1.cnf
generated
vendored
Normal file
16
node_modules/tunnel/test/keys/server1.cnf
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 9999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = JP
|
||||||
|
OU = nodejs_jp
|
||||||
|
CN = localhost
|
||||||
|
emailAddress = koichik@improvement.jp
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
14
node_modules/tunnel/test/keys/server2-cert.pem
generated
vendored
Normal file
14
node_modules/tunnel/test/keys/server2-cert.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICJzCCAZACCQCxEcnO8CV2kjANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
|
||||||
|
UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTExJTAjBgkqhkiG9w0B
|
||||||
|
CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
|
||||||
|
NTEwMTEyMzIxWjBaMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRAw
|
||||||
|
DgYDVQQDEwdzZXJ2ZXIyMSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJvdmVt
|
||||||
|
ZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEkKr9SHG6jtf5UNfL
|
||||||
|
u66wNi8jrbAW5keYy7ECWRGRFDE7ay4N8LDMmOO3/1eH2WpY0QM5JFxq78hoVQED
|
||||||
|
ogvoeVTw+Ni33yqY6VL2WRv84FN2BmCrDGJQ83EYdsJqPUnxuXvbmq7Viw3l/BEu
|
||||||
|
hvsp722KcToIrqt8mHKMc/nPRwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBALbdQz32
|
||||||
|
CN0hJfJ6BtGyqee3zRSpufPY1KFV8OHSDG4qL55OfpjB5e5wsldp3VChTWzm2KM+
|
||||||
|
xg9WSWurMINM5KLgUqCZ69ttg1gJ/SnZNolXhH0I3SG/DY4DGTHo9oJPoSrgrWbX
|
||||||
|
3ZmCoO6rrDoSuVRJ8dKMWJmt8O1pZ6ZRW2iM
|
||||||
|
-----END CERTIFICATE-----
|
12
node_modules/tunnel/test/keys/server2-csr.pem
generated
vendored
Normal file
12
node_modules/tunnel/test/keys/server2-csr.pem
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIIBvzCCASgCAQAwWjELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDEQ
|
||||||
|
MA4GA1UEAxMHc2VydmVyMjElMCMGCSqGSIb3DQEJARYWa29pY2hpa0BpbXByb3Zl
|
||||||
|
bWVudC5qcDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxJCq/Uhxuo7X+VDX
|
||||||
|
y7uusDYvI62wFuZHmMuxAlkRkRQxO2suDfCwzJjjt/9Xh9lqWNEDOSRcau/IaFUB
|
||||||
|
A6IL6HlU8PjYt98qmOlS9lkb/OBTdgZgqwxiUPNxGHbCaj1J8bl725qu1YsN5fwR
|
||||||
|
Lob7Ke9tinE6CK6rfJhyjHP5z0cCAwEAAaAlMCMGCSqGSIb3DQEJBzEWExRBIGNo
|
||||||
|
YWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAAOBgQB3rCGCErgshGKEI5j9
|
||||||
|
togUBwD3ul91yRFSBoV2hVGXsTOalWa0XCI+9+5QQEOBlj1pUT8eDU8ve55mX1UX
|
||||||
|
AZEx+cbUQa9DNeiDAMX83GqHMD8fF2zqsY1mkg5zFKG3nhoIYSG15qXcpqAhxRpX
|
||||||
|
NUQnZ4yzt2pE0aiFfkXa3PM42Q==
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
15
node_modules/tunnel/test/keys/server2-key.pem
generated
vendored
Normal file
15
node_modules/tunnel/test/keys/server2-key.pem
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIICXQIBAAKBgQDEkKr9SHG6jtf5UNfLu66wNi8jrbAW5keYy7ECWRGRFDE7ay4N
|
||||||
|
8LDMmOO3/1eH2WpY0QM5JFxq78hoVQEDogvoeVTw+Ni33yqY6VL2WRv84FN2BmCr
|
||||||
|
DGJQ83EYdsJqPUnxuXvbmq7Viw3l/BEuhvsp722KcToIrqt8mHKMc/nPRwIDAQAB
|
||||||
|
AoGAQ/bRaGoYCK1DN80gEC2ApSTW/7saW5CbyNUFCw7I6CTXMPhKID/MobFraz86
|
||||||
|
gJpIDxWVy7gqzD7ESG67vwnUm52ITojQiY3JH7NCNhq/39/aYZOz2d7rBv2mvhk3
|
||||||
|
w7gxUsmtPVUz3s2/h1KYaGpM3b68TwMS9nIiwwHDJS1aR8ECQQDu/kOy+Z/0EVKC
|
||||||
|
APgiEzbxewAiy7BVzNppd8CR/5m1KxlsIoMr8OdLqVwiJ/13m3eZGkPNx5pLJ9Xv
|
||||||
|
sXER0ZcPAkEA0o19xA1AJ/v5qsRaWJaA+ftgQ8ZanqsWXhM9abAvkPdFLPKYWTfO
|
||||||
|
r9f8eUDH0+O9mA2eZ2mlsEcsmIHDTY6ESQJAO2lyIvfzT5VO0Yq0JKRqMDXHnt7M
|
||||||
|
A0hds4JVmPXVnDgOpdcejLniheigQs12MVmwrZrd6DYKoUxR3rhZx3g2+QJBAK/2
|
||||||
|
5fuaI1sHP+HSlbrhlUrWJd6egA+I5nma1MFmKGqb7Kki2eX+OPNGq87eL+LKuyG/
|
||||||
|
h/nfFkTbRs7x67n+eFkCQQCPgy381Vpa7lmoNUfEVeMSNe74FNL05IlPDs/BHcci
|
||||||
|
1GX9XzsFEqHLtJ5t1aWbGv39gb2WmPP3LJBsRPzLa2iQ
|
||||||
|
-----END RSA PRIVATE KEY-----
|
16
node_modules/tunnel/test/keys/server2.cnf
generated
vendored
Normal file
16
node_modules/tunnel/test/keys/server2.cnf
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[ req ]
|
||||||
|
default_bits = 1024
|
||||||
|
days = 9999
|
||||||
|
distinguished_name = req_distinguished_name
|
||||||
|
attributes = req_attributes
|
||||||
|
prompt = no
|
||||||
|
|
||||||
|
[ req_distinguished_name ]
|
||||||
|
C = JP
|
||||||
|
OU = nodejs_jp
|
||||||
|
CN = server2
|
||||||
|
emailAddress = koichik@improvement.jp
|
||||||
|
|
||||||
|
[ req_attributes ]
|
||||||
|
challengePassword = A challenge password
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user