Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This is just so that this repo can be reviewed #1

Open
wants to merge 18 commits into
base: empty-branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# **What it does:** Creates a release for the library, after checking there are changes that need releasing
# **Why we have it:** To automate the tagging the process
# **Who does it impact:** LI Engineering teams

name: Release Library

run-name: ${{ github.ref_name }}/${{ github.workflow }}

on:
workflow_dispatch:
inputs:
release_type:
type: choice
default: "minor"
description: Semantic Version
options:
- "major"
- "minor"
source_branch:
description: Source Branch
type: string
default: develop
required: true
base_branch:
description: Base Branch
type: string
default: master
required: true

jobs:

check-component-for-changes:
uses: ripjar/component-workflows/.github/workflows/check-node-component-for-changes.yaml@v2
with:
component_branch: ${{ inputs.source_branch }}
component_base_branch: ${{ inputs.base_branch }}
secrets: inherit

release-component:
uses: ripjar/component-workflows/.github/workflows/release-node-component.yaml@v2
needs: [ check-component-for-changes ]
if: needs.check-component-for-changes.outputs.is_release_required == '1'
with:
product: LI
node_version: 20
component_branch: ${{ inputs.source_branch }}
component_base_branch: ${{ inputs.base_branch }}
release_type: ${{ inputs.release_type }}
secrets: inherit

extract-version:
runs-on: arc
if: always()
needs: [ release-component ]
outputs:
version: ${{ steps.package_version.outputs.VERSION }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ inputs.base_branch }}
- name: Get version from package.json
id: package_version
run: echo "::set-output name=VERSION::$(jq -r '.version' package.json)"
shell: bash

bump-component-version:
uses: ripjar/component-workflows/.github/workflows/bump-node-component-version.yaml@v2
needs: [ release-component ]
secrets: inherit
with:
component_branch: ${{ inputs.source_branch }}

notify:
needs: [check-component-for-changes, release-component, extract-version, bump-component-version]
if: always()
uses: ripjar/li-ci-cd/.github/workflows/li-release-notify.yaml@develop
secrets: inherit
with:
repository_name: ${{ github.repository }}
is_release_required: ${{ needs.check-component-for-changes.outputs.is_release_required }}
release_result: ${{ needs.release-component.result }}
version: ${{ needs.extract-version.outputs.version }}
channel_id: 'C06PLQQEZRA'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/
node_modules
*~
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Node openssl

This was created so that we could verify the modulus of a public and private key
match. At the moment it has two functions RSAPrivateKey and X509PublicKey. The
first reads an rsa private key and the second reads from an x509 cert.

### The output of RSAPrivateKey is as follows:
```
{
n: (hex string) // public modulus
e: (hex string) // public exponent
d: (hex string) // private exponent
p: (hex string) // secret prime factor
q: (hex string) // secret prime factor
dmp1: (hex string) // d mod (p-1)
dmq1: (hex string) // d mod (q-1)
iqmp: (hex string) // q^-1 mod p
}
```

### The output of X509PublicKey is as follows:
```
{
n: (hex string) // public modulus
e: (hex string) // public exponent
}
```

## Licence

This is licenced under the GNU Lesser General Public License version 2. See
lgpl-2.1.txt for more details.
11 changes: 11 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"targets": [
{
"target_name": "node_openssl",
"sources": [ "./main.c" ],
"cflags": [
"-Wall"
]
}
]
}
Loading