Skip to content

Commit

Permalink
Merge branch '1.4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasrafael committed Nov 11, 2019
2 parents a9ad4e1 + 2330e0e commit 42de34c
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 179 deletions.
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ RUN npm install
# Copy app source
COPY . /usr/src/ds

# Create self-signed certificates
RUN chmod +x ./create-self-signed-certs.sh
RUN ./create-self-signed-certs.sh

# Build app
RUN npm run build

Expand Down
9 changes: 4 additions & 5 deletions create-self-signed-certs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#!/usr/bin/env bash
# Define where to store the generated certs and metadata.
DIR="$(pwd)/.certs"
Expand Down Expand Up @@ -27,7 +26,7 @@ C = UE
ST = Bruxelas
L = Bruxelas
O = OCARIoT CA
CN = api.ocariot.com
CN = localhost
# Allow client and server auth. You may want to only allow server auth.
# Link to SAN names.
[v3_req]
Expand All @@ -54,10 +53,10 @@ EOF
openssl req \
-new \
-newkey rsa:2048 \
-days 120 \
-days 365 \
-nodes \
-x509 \
-subj "//C=UE\ST=Bruxelas\L=Bruxelas\O=OCARIoT CA\CN=api.ocariot.com" \
-subj "/C=US/ST=Bruxelas/L=Bruxelas/O=OCARIoT CA/CN=localhost" \
-keyout "${DIR}/ca.key" \
-out "${DIR}/ca.crt"
# For each server/service you want to secure with your CA, repeat the
Expand All @@ -78,7 +77,7 @@ openssl req \
# by our CA.
openssl x509 \
-req \
-days 120 \
-days 365 \
-in "${DIR}/server.csr" \
-CA "${DIR}/ca.crt" \
-CAkey "${DIR}/ca.key" \
Expand Down
Loading

0 comments on commit 42de34c

Please sign in to comment.