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

Fix generating CA cert #216

Merged
merged 1 commit into from
Nov 26, 2024
Merged
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
9 changes: 5 additions & 4 deletions testing/almalinux9-oj17-openldap-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ RUN keytool -export -alias coordinator -storepass testldap -keystore /etc/openld
-file /etc/openldap/certs/coordinator.csr

# create a test CA and generate caroot.cer( root certificate of the CA ).
RUN openssl req -new -keyout /etc/openldap/certs/cakey.pem -out /etc/openldap/certs/careq.pem -nodes \
-subj "/C=US/ST=Massachusetts/L=Boston/O=Teradata/OU=Finance/CN=teradata" && \
openssl x509 -req -in /etc/openldap/certs/careq.pem -out /etc/openldap/certs/caroot.cer -days 100000 \
-signkey /etc/openldap/certs/cakey.pem
RUN openssl genrsa -out /etc/openldap/certs/cakey.pem 2048 && \
openssl req -x509 -new -nodes -key /etc/openldap/certs/cakey.pem -sha256 -days 3650 -out /etc/openldap/certs/caroot.cer \
-subj "/C=US/ST=Massachusetts/L=Boston/O=Teradata/OU=Finance/CN=teradata" \
-addext "basicConstraints=CA:TRUE" \
-addext "keyUsage=keyCertSign,cRLSign"

# sign the server certificate using the testCA
RUN openssl x509 -req -in /etc/openldap/certs/coordinator.csr -out /etc/openldap/certs/TestCA.cer -days 100000 \
Expand Down
Loading