@sequencemedia/certificates 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,21 +1,21 @@
1
- # @sequencemedia/certificates
2
-
3
- ## Pre-requisites for Windows
4
-
5
- Install the latest pre-built release of OpenSSL
6
-
7
- ### Install with an MSI
8
-
9
- Get an MSI from the [Win32/Win64 OpenSSL Installation Project](https://slproweb.com/products/Win32OpenSSL.html) (e.g., [3.0.7](https://slproweb.com/download/Win64OpenSSL-3_0_7.msi))
10
-
11
- ### Or install with Chocolatey
12
-
13
- ```
14
- choco install openssl
15
- ```
16
-
17
- ### Add OpenSSL to the `PATH`
18
-
19
- An [article on Medium](https://medium.com/swlh/installing-openssl-on-windows-10-and-updating-path-80992e26f6a1) also refers to the [OpenSSL Installation Project](https://slproweb.com/products/Win32OpenSSL.html) and describes (with screenshots) how to add OpenSSL to the `PATH`
20
-
21
- Once you have added OpenSSL to the `PATH`, open a console and at the command prompt enter `openssl version` to confirm the installation
1
+ # @sequencemedia/certificates
2
+
3
+ ## Pre-requisites for Windows
4
+
5
+ Install the latest pre-built release of OpenSSL
6
+
7
+ ### Install with an MSI
8
+
9
+ Get an MSI from the [Win32/Win64 OpenSSL Installation Project](https://slproweb.com/products/Win32OpenSSL.html) (e.g., [3.0.7](https://slproweb.com/download/Win64OpenSSL-3_0_7.msi))
10
+
11
+ ### Or install with Chocolatey
12
+
13
+ ```
14
+ choco install openssl
15
+ ```
16
+
17
+ ### Add OpenSSL to the `PATH`
18
+
19
+ An [article on Medium](https://medium.com/swlh/installing-openssl-on-windows-10-and-updating-path-80992e26f6a1) also refers to the [OpenSSL Installation Project](https://slproweb.com/products/Win32OpenSSL.html) and describes (with screenshots) how to add OpenSSL to the `PATH`
20
+
21
+ Once you have added OpenSSL to the `PATH`, open a console and at the command prompt enter `openssl version` to confirm the installation
package/README.txt CHANGED
@@ -1,19 +1,19 @@
1
- https://betterprogramming.pub/how-to-create-trusted-ssl-certificates-for-your-local-development-13fd5aad29c6
2
-
3
- https://www.section.io/engineering-education/how-to-get-ssl-https-for-localhost/
4
-
5
- https://www.digicert.com/kb/ssl-support/openssl-quick-reference-guide.htm
6
-
7
- https://www.ietf.org/rfc/rfc4514.txt
8
-
9
- String X.500 AttributeType
10
- ------ --------------------------------------------
11
- CN commonName (2.5.4.3)
12
- L localityName (2.5.4.7)
13
- ST stateOrProvinceName (2.5.4.8)
14
- O organizationName (2.5.4.10)
15
- OU organizationalUnitName (2.5.4.11)
16
- C countryName (2.5.4.6)
17
- STREET streetAddress (2.5.4.9)
18
- DC domainComponent (0.9.2342.19200300.100.1.25)
19
- UID userId (0.9.2342.19200300.100.1.1)
1
+ https://betterprogramming.pub/how-to-create-trusted-ssl-certificates-for-your-local-development-13fd5aad29c6
2
+
3
+ https://www.section.io/engineering-education/how-to-get-ssl-https-for-localhost/
4
+
5
+ https://www.digicert.com/kb/ssl-support/openssl-quick-reference-guide.htm
6
+
7
+ https://www.ietf.org/rfc/rfc4514.txt
8
+
9
+ String X.500 AttributeType
10
+ ------ --------------------------------------------
11
+ CN commonName (2.5.4.3)
12
+ L localityName (2.5.4.7)
13
+ ST stateOrProvinceName (2.5.4.8)
14
+ O organizationName (2.5.4.10)
15
+ OU organizationalUnitName (2.5.4.11)
16
+ C countryName (2.5.4.6)
17
+ STREET streetAddress (2.5.4.9)
18
+ DC domainComponent (0.9.2342.19200300.100.1.25)
19
+ UID userId (0.9.2342.19200300.100.1.1)
package/ca-and-certs.bat CHANGED
@@ -1,16 +1,16 @@
1
- @echo off
2
-
3
- if defined 1 (
4
- set SUBJ=%1
5
- ) else (
6
- set SUBJ="/C=UK/ST=England/L=Greenwich/O=Sequence Media Limited/CN=Sequence Media/emailAddress=sequencemedia@sequencemedia.net"
7
- )
8
-
9
- setlocal enableextensions
10
- md certificates
11
- endlocal
12
-
13
- call scripts/bat/certificate-authority-key-pem.bat
14
- call scripts/bat/certificate-authority-crt.bat
15
- call scripts/bat/localhost-csr.bat
16
- call scripts/bat/localhost-crt.bat
1
+ @echo off
2
+
3
+ if defined 1 (
4
+ set SUBJ=%1
5
+ ) else (
6
+ set SUBJ="/C=UK/ST=England/L=Greenwich/O=Sequence Media Limited/CN=Sequence Media/emailAddress=sequencemedia@sequencemedia.net"
7
+ )
8
+
9
+ setlocal enableextensions
10
+ md certificates
11
+ endlocal
12
+
13
+ call scripts/bat/certificate-authority-key-pem.bat
14
+ call scripts/bat/certificate-authority-crt.bat
15
+ call scripts/bat/localhost-csr.bat
16
+ call scripts/bat/localhost-crt.bat
package/certs.bat CHANGED
@@ -1,10 +1,10 @@
1
- @echo off
2
-
3
- if defined 1 (
4
- set SUBJ=%1
5
- ) else (
6
- set SUBJ="/C=UK/ST=England/L=Greenwich/O=Sequence Media Limited/CN=Sequence Media/emailAddress=sequencemedia@sequencemedia.net"
7
- )
8
-
9
- call scripts/bat/localhost-csr.bat
10
- call scripts/bat/localhost-crt.bat
1
+ @echo off
2
+
3
+ if defined 1 (
4
+ set SUBJ=%1
5
+ ) else (
6
+ set SUBJ="/C=UK/ST=England/L=Greenwich/O=Sequence Media Limited/CN=Sequence Media/emailAddress=sequencemedia@sequencemedia.net"
7
+ )
8
+
9
+ call scripts/bat/localhost-csr.bat
10
+ call scripts/bat/localhost-crt.bat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequencemedia/certificates",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Generate root CA and self-signed certificates with OpenSSL",
5
5
  "type": "module",
6
6
  "author": {
@@ -21,7 +21,8 @@
21
21
  "lint": "eslint . --ext cjs --ext mjs",
22
22
  "lint:fix": "npm run lint -- --fix",
23
23
  "ca-and-certs": "DEBUG=@sequencemedia/certificates:* node ca-and-certs.mjs",
24
- "certs": "DEBUG=@sequencemedia/certificates:* node certs.mjs"
24
+ "certs": "DEBUG=@sequencemedia/certificates:* node certs.mjs",
25
+ "prepare": "husky install"
25
26
  },
26
27
  "dependencies": {
27
28
  "debug": "^4.3.4",
@@ -35,11 +36,13 @@
35
36
  "@babel/core": "^7.20.12",
36
37
  "@babel/eslint-parser": "^7.19.1",
37
38
  "@babel/preset-env": "^7.20.2",
39
+ "@sequencemedia/hooks": "^1.0.300",
38
40
  "core-js": "^3.27.1",
39
41
  "eslint": "^8.31.0",
40
42
  "eslint-config-standard": "^17.0.0",
41
43
  "eslint-plugin-import": "^2.26.0",
42
44
  "eslint-plugin-node": "^11.1.0",
43
- "eslint-plugin-promise": "^6.1.1"
45
+ "eslint-plugin-promise": "^6.1.1",
46
+ "husky": "^8.0.3"
44
47
  }
45
48
  }
@@ -1,2 +1,2 @@
1
- @echo off
2
- openssl x509 -outform pem -in certificates/certificate-authority.pem -out certificates/certificate-authority.crt
1
+ @echo off
2
+ openssl x509 -outform pem -in certificates/certificate-authority.pem -out certificates/certificate-authority.crt
@@ -1,5 +1,5 @@
1
- @echo off
2
- if not defined SUBJ (
3
- set SUBJ="/C=UK/ST=England/L=Greenwich/O=Sequence Media Limited/CN=Sequence Media/emailAddress=sequencemedia@sequencemedia.net"
4
- )
5
- openssl req -x509 -nodes -new -sha512 -days 365 -newkey rsa:4096 -keyout certificates/certificate-authority.key -out certificates/certificate-authority.pem -subj %SUBJ%
1
+ @echo off
2
+ if not defined SUBJ (
3
+ set SUBJ="/C=UK/ST=England/L=Greenwich/O=Sequence Media Limited/CN=Sequence Media/emailAddress=sequencemedia@sequencemedia.net"
4
+ )
5
+ openssl req -x509 -nodes -new -sha512 -days 365 -newkey rsa:4096 -keyout certificates/certificate-authority.key -out certificates/certificate-authority.pem -subj %SUBJ%
@@ -1,2 +1,2 @@
1
- @echo off
2
- openssl x509 -req -sha512 -days 365 -extfile certificates/localhost.ext -CA certificates/certificate-authority.crt -CAkey certificates/certificate-authority.key -CAcreateserial -in certificates/localhost.csr -out certificates/localhost.crt
1
+ @echo off
2
+ openssl x509 -req -sha512 -days 365 -extfile certificates/localhost.ext -CA certificates/certificate-authority.crt -CAkey certificates/certificate-authority.key -CAcreateserial -in certificates/localhost.csr -out certificates/localhost.crt
@@ -1,5 +1,5 @@
1
- @echo off
2
- if not defined SUBJ (
3
- set SUBJ="/C=UK/ST=England/L=Greenwich/O=Sequence Media Limited/CN=Sequence Media/emailAddress=sequencemedia@sequencemedia.net"
4
- )
5
- openssl req -new -nodes -newkey rsa:4096 -keyout certificates/localhost.key -out certificates/localhost.csr -subj %SUBJ%
1
+ @echo off
2
+ if not defined SUBJ (
3
+ set SUBJ="/C=UK/ST=England/L=Greenwich/O=Sequence Media Limited/CN=Sequence Media/emailAddress=sequencemedia@sequencemedia.net"
4
+ )
5
+ openssl req -new -nodes -newkey rsa:4096 -keyout certificates/localhost.key -out certificates/localhost.csr -subj %SUBJ%