@@ -8,6 +8,9 @@ WEBHOOK_SERVER_PORT=8980
88AGENT_ID=" d432fbb3-d2f1-4a97-9ef7-75bd81c00000"
99MY_IP=127.0.0.1
1010HOSTNAME=$( hostname )
11+ # When testing PQC, set the agent algorithm with something else due to
12+ # https://issues.redhat.com/browse/RHEL-117439
13+ [ -n " {AGENT_CRYPTO_ALG}" ] || AGENT_CRYPTO_ALG=" ${CRYPTO_ALG} "
1114
1215rlJournalStart
1316
@@ -28,6 +31,7 @@ rlJournalStart
2831 # registrar = webserver cert used for the registrar server
2932 # tenant = webclient cert used (twice) by the tenant, running on AGENT server
3033 # webhook = webserver cert used for the revocation notification webhook
34+ # agent = webserver cert used for mTLS connection
3135 # btw, we could live with just one key instead of generating multiple keys.. but that's just how openssl/certgen works
3236 rlRun " x509KeyGen -t ${CRYPTO_ALG} ca" 0 " Generating Root CA ${CRYPTO_ALG} key pair"
3337 rlRun " x509KeyGen -t ${CRYPTO_ALG} intermediate-ca" 0 " Generating Intermediate CA ${CRYPTO_ALG} key pair"
@@ -36,15 +40,15 @@ rlJournalStart
3640 rlRun " x509KeyGen -t ${CRYPTO_ALG} registrar" 0 " Generating registrar ${CRYPTO_ALG} key pair"
3741 rlRun " x509KeyGen -t ${CRYPTO_ALG} tenant" 0 " Generating tenant ${CRYPTO_ALG} key pair"
3842 rlRun " x509KeyGen -t ${CRYPTO_ALG} webhook" 0 " Generating webhook ${CRYPTO_ALG} key pair"
39- # rlRun "x509KeyGen agent" 0 "Preparing RSA tenant certificate "
43+ rlRun " x509KeyGen -t ${AGENT_CRYPTO_ALG} agent" 0 " Generating agent ${AGENT_CRYPTO_ALG} key pair "
4044 rlRun " x509SelfSign ca" 0 " Selfsigning Root CA certificate"
4145 rlRun " x509CertSign --CA ca --DN 'CN = ${HOSTNAME} ' -t CA --subjectAltName 'IP = ${MY_IP} ' intermediate-ca" 0 " Signing intermediate CA certificate with our Root CA key"
4246 rlRun " x509CertSign --CA intermediate-ca --DN 'CN = ${HOSTNAME} ' -t webserver --subjectAltName 'IP = ${MY_IP} ' verifier" 0 " Signing verifier certificate with intermediate CA key"
4347 rlRun " x509CertSign --CA intermediate-ca --DN 'CN = ${HOSTNAME} ' -t webclient --subjectAltName 'IP = ${MY_IP} ' verifier-client" 0 " Signing verifier-client certificate with intermediate CA key"
4448 rlRun " x509CertSign --CA intermediate-ca --DN 'CN = ${HOSTNAME} ' -t webserver --subjectAltName 'IP = ${MY_IP} ' registrar" 0 " Signing registrar certificate with intermediate CA key"
4549 rlRun " x509CertSign --CA intermediate-ca --DN 'CN = ${HOSTNAME} ' -t webclient --subjectAltName 'IP = ${MY_IP} ' tenant" 0 " Signing tenant certificate with intermediate CA key"
4650 rlRun " x509CertSign --CA intermediate-ca --DN 'CN = ${HOSTNAME} ' -t webserver --subjectAltName 'IP = ${MY_IP} ' webhook" 0 " Signing webhook certificate with intermediate CA key"
47- # rlRun "x509SelfSign --DN 'CN = ${HOSTNAME}' -t webserver agent" 0 "Self-signing agent certificate"
51+ rlRun " x509CertSign --CA intermediate-ca -- DN 'CN = ${HOSTNAME} ' -t webserver --subjectAltName 'IP = ${MY_IP} ' agent" 0 " Signing agent certificate with intermediate CA key "
4852
4953 # copy verifier certificates to proper location
5054 CERTDIR=/var/lib/keylime/certs
@@ -61,8 +65,8 @@ rlJournalStart
6165 rlRun " cp $( x509Key tenant) $CERTDIR /tenant-key.pem"
6266 rlRun " cp $( x509Cert webhook) $CERTDIR /webhook-cert.pem"
6367 rlRun " cp $( x509Key webhook) $CERTDIR /webhook-key.pem"
64- # rlRun "cp $(x509Cert agent) $CERTDIR/agent-cert.pem"
65- # rlRun "cp $(x509Key agent) $CERTDIR/agent-key.pem"
68+ rlRun " cp $( x509Cert agent) $CERTDIR /agent-cert.pem"
69+ rlRun " cp $( x509Key agent) $CERTDIR /agent-key.pem"
6670 # assign cert ownership to keylime user if it exists
6771 id keylime && rlRun " chown -R keylime:keylime $CERTDIR "
6872
@@ -94,8 +98,8 @@ rlJournalStart
9498 rlRun " limeUpdateConf registrar server_key registrar-key.pem"
9599 # agent
96100 rlRun " limeUpdateConf agent trusted_client_ca '\" ['${CERTDIR} /intermediate-cacert.pem', '${CERTDIR} /cacert.pem']\" '"
97- rlRun " limeUpdateConf agent server_key '\" agent-key.pem\" '"
98- rlRun " limeUpdateConf agent server_cert '\" agent-cert.pem\" '"
101+ rlRun " limeUpdateConf agent server_key '\" ${CERTDIR} / agent-key.pem\" '"
102+ rlRun " limeUpdateConf agent server_cert '\" ${CERTDIR} / agent-cert.pem\" '"
99103 if [ -n " $KEYLIME_TEST_DISABLE_REVOCATION " ]; then
100104 rlRun " limeUpdateConf revocations enabled_revocation_notifications '[]'"
101105 rlRun " limeUpdateConf agent enable_revocation_notifications false"
0 commit comments