mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-07 20:43:11 +02:00
simplified changes
This commit is contained in:
parent
80fe4a44a9
commit
9b905917cc
3 changed files with 9 additions and 9 deletions
|
@ -189,15 +189,15 @@
|
||||||
|
|
||||||
- name: Build the client's pair
|
- name: Build the client's pair
|
||||||
local_action: >
|
local_action: >
|
||||||
shell openssl req -utf8 -new -newkey {{ algo_params | default('ec:ecparams/prime256v1.pem') }} -config openssl.cnf -keyout private/{{ item }}.key -out reqs/{{ item }}.req -nodes -passin pass:"{{ easyrsa_CA_password }}" -subj "/CN={{ IP_subject_alt_name }}_{{ item }}" -batch &&
|
shell openssl req -utf8 -new -newkey {{ algo_params | default('ec:ecparams/prime256v1.pem') }} -config openssl.cnf -keyout private/{{ item }}.key -out reqs/{{ item }}.req -nodes -passin pass:"{{ easyrsa_CA_password }}" -subj "/CN={{ item }}" -batch &&
|
||||||
openssl ca -utf8 -in reqs/{{ item }}.req -out certs/{{ item }}.crt -config openssl.cnf -days 3650 -batch -passin pass:"{{ easyrsa_CA_password }}" -subj "/CN={{ IP_subject_alt_name }}_{{ item }}" &&
|
openssl ca -utf8 -in reqs/{{ item }}.req -out certs/{{ item }}.crt -config openssl.cnf -days 3650 -batch -passin pass:"{{ easyrsa_CA_password }}" -subj "/CN={{ item }}" &&
|
||||||
touch certs/{{ item }}_crt_generated
|
touch certs/{{ item }}_crt_generated
|
||||||
become: no
|
become: no
|
||||||
args:
|
args:
|
||||||
chdir: "configs/{{ IP_subject_alt_name }}/pki/"
|
chdir: "configs/{{ IP_subject_alt_name }}/pki/"
|
||||||
creates: certs/{{ item }}_crt_generated
|
creates: certs/{{ item }}_crt_generated
|
||||||
environment:
|
environment:
|
||||||
subjectAltName: "DNS:{{ IP_subject_alt_name }}_{{ item }},IP:{{ IP_subject_alt_name }}"
|
subjectAltName: "DNS:{{ item }},IP:{{ IP_subject_alt_name }}"
|
||||||
with_items: "{{ users }}"
|
with_items: "{{ users }}"
|
||||||
|
|
||||||
- name: Build the client's p12
|
- name: Build the client's p12
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
<integer>1440</integer>
|
<integer>1440</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>LocalIdentifier</key>
|
<key>LocalIdentifier</key>
|
||||||
<string>{{ IP_subject_alt_name }}_{{ item.0 }}</string>
|
<string>{{ item.0 }}</string>
|
||||||
<key>PayloadCertificateUUID</key>
|
<key>PayloadCertificateUUID</key>
|
||||||
<string>{{ pkcs12_PayloadCertificateUUID }}</string>
|
<string>{{ pkcs12_PayloadCertificateUUID }}</string>
|
||||||
<key>CertificateType</key>
|
<key>CertificateType</key>
|
||||||
|
|
10
users.yml
10
users.yml
|
@ -63,15 +63,15 @@
|
||||||
|
|
||||||
- name: Build the client's pair
|
- name: Build the client's pair
|
||||||
local_action: >
|
local_action: >
|
||||||
shell openssl req -utf8 -new -newkey {{ algo_params | default('ec:ecparams/prime256v1.pem') }} -config openssl.cnf -keyout private/{{ item }}.key -out reqs/{{ item }}.req -nodes -passin pass:"{{ easyrsa_CA_password }}" -subj "/CN={{ IP_subject_alt_name }}_{{ item }}" -batch &&
|
shell openssl req -utf8 -new -newkey {{ algo_params | default('ec:ecparams/prime256v1.pem') }} -config openssl.cnf -keyout private/{{ item }}.key -out reqs/{{ item }}.req -nodes -passin pass:"{{ easyrsa_CA_password }}" -subj "/CN={{ item }}" -batch &&
|
||||||
openssl ca -utf8 -in reqs/{{ item }}.req -out certs/{{ item }}.crt -config openssl.cnf -days 3650 -batch -passin pass:"{{ easyrsa_CA_password }}" -subj "/CN={{ IP_subject_alt_name }}_{{ item }}" &&
|
openssl ca -utf8 -in reqs/{{ item }}.req -out certs/{{ item }}.crt -config openssl.cnf -days 3650 -batch -passin pass:"{{ easyrsa_CA_password }}" -subj "/CN={{ item }}" &&
|
||||||
touch certs/{{ item }}_crt_generated
|
touch certs/{{ item }}_crt_generated
|
||||||
become: no
|
become: no
|
||||||
args:
|
args:
|
||||||
chdir: "configs/{{ IP_subject_alt_name }}/pki/"
|
chdir: "configs/{{ IP_subject_alt_name }}/pki/"
|
||||||
creates: certs/{{ item }}_crt_generated
|
creates: certs/{{ item }}_crt_generated
|
||||||
environment:
|
environment:
|
||||||
subjectAltName: "DNS:{{ IP_subject_alt_name }}_{{ item }},IP:{{ IP_subject_alt_name }}"
|
subjectAltName: "DNS:{{ item }},IP:{{ IP_subject_alt_name }}"
|
||||||
with_items: "{{ users }}"
|
with_items: "{{ users }}"
|
||||||
|
|
||||||
- name: Build the client's p12
|
- name: Build the client's p12
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
|
|
||||||
- name: Get active users
|
- name: Get active users
|
||||||
local_action: >
|
local_action: >
|
||||||
shell grep ^V index.txt | grep -v "{{ IP_subject_alt_name }}" | awk '{print $5}' | sed 's/\/CN={{ IP_subject_alt_name }}_//g'
|
shell grep ^V index.txt | grep -v "{{ IP_subject_alt_name }}" | awk '{print $5}' | sed 's/\/CN=//g'
|
||||||
become: no
|
become: no
|
||||||
args:
|
args:
|
||||||
chdir: "configs/{{ IP_subject_alt_name }}/pki/"
|
chdir: "configs/{{ IP_subject_alt_name }}/pki/"
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
chdir: "configs/{{ IP_subject_alt_name }}/pki/"
|
chdir: "configs/{{ IP_subject_alt_name }}/pki/"
|
||||||
creates: crl/{{ item }}_revoked
|
creates: crl/{{ item }}_revoked
|
||||||
environment:
|
environment:
|
||||||
subjectAltName: "DNS:{{ IP_subject_alt_name }}_{{ item }},IP:{{ IP_subject_alt_name }}"
|
subjectAltName: "DNS:{{ item }},IP:{{ IP_subject_alt_name }}"
|
||||||
when: item not in users
|
when: item not in users
|
||||||
with_items: "{{ valid_certs.stdout_lines }}"
|
with_items: "{{ valid_certs.stdout_lines }}"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue