removed un-needed files

This commit is contained in:
iadgovuser26 2023-07-20 12:50:01 -04:00
parent 172236a75b
commit 3a72f8ad4d
5 changed files with 0 additions and 125 deletions

View File

@ -51,13 +51,6 @@ dependencies {
implementation 'org.junit.jupiter:junit-jupiter:5.4.2'
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper:10.1.5'
// implementation 'org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.0'
// implementation 'jakarta.servlet:jakarta.servlet-api:6.0.0'
// implementation 'jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.0'
// implementation 'jakarta.servlet.jsp:jakarta.servlet.jsp-api:3.0.0'
// implementation 'jakarta.el:jakarta.el-api:5.0.0'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
annotationProcessor 'org.projectlombok:lombok'

View File

@ -36,7 +36,6 @@ dependencies {
implementation libs.commons.codec
implementation libs.commons.lang3
implementation libs.minimal.json
implementation libs.jakarta.api
implementation 'org.apache.logging.log4j:log4j-core:2.19.0'
implementation 'org.apache.logging.log4j:log4j-api:2.19.0'

View File

@ -1,27 +0,0 @@
#!/bin/bash
# Create aca.poperties file
pki_password=$1
rm -f /etc/hirs/aca.properties
aca_prop_file="/etc/hirs/aca.properties"
echo '# *** ACA Directories ***
aca.directories.root = /etc/hirs/
aca.directories.certificates = ${aca.directories.root}/certificates' > $aca_prop_file
echo '# *** Certificate and Key Properties ***
aca.setup.keys.rsa.keySize = 3072
aca.setup.keys.ecc.keySize = 512
aca.setup.certificates.validity = 3652
aca.setup.certificates.subjectName = HIRS_AttestationCA
aca.setup.certificates.expiration = ${aca.setup.certificates.validity}' >> $aca_prop_file
echo '# *** Keystore properties ***
aca.keyStore.alias = HIRS_ACA_KEY
aca.keyStore.rsa.alias = hirs_leaf_ca1_rsa_3072_sha384
aca.keyStore.ecc.alias = hirs_leaf_ca1_ecc_512_sha384
aca.keyStore.location = ${aca.directories.certificates}/keyStore.jks
aca.keyStore.password = '$pki_password >> $aca_prop_file

View File

@ -1,9 +0,0 @@
# *** ACA Directories ***
aca.directories.root = /etc/hirs/
aca.directories.certificates = ${aca.directories.root}/certificates
# *** Certificate and Key Properties ***
aca.setup.keys.rsa.keySize = 3072
aca.setup.keys.ecc.keySize = 512
aca.setup.certificates.validity = 3652
aca.setup.certificates.subjectName = HIRS_AttestationCA
aca.setup.certificates.expiration = ${aca.setup.certificates.validity}

View File

@ -1,81 +0,0 @@
#!/bin/bash
CN=$1
PASS=$2
ACTOR="HIRS"
ACTOR_ALT=${ACTOR// /_}
ASYM_ALG="rsa"
ASYM_SIZE=3072
KSIZE="3k"
HASH_ALG="sha384"
CERT_FOLDER="/etc/hirs/certificates/HIRS/$ASYM_ALG"_"$KSIZE"_"$HASH_ALG"_certs
#CERT_FOLDER="."
EXTENSION="server_extensions"
TRUSTSTORE="/etc/hirs/certificates/HIRS/TrustStore.jks"
echo "CERT_FOLDER is $CERT_FOLDER"
if [ -z "${CN}" ] || [ -z "${PASS}" ] || [ "${CN}" == "-h" ] || [ "${CN}" == "--help" ]; then
echo "parameter missing to pki_tls_update.sh, exiting"
exit 1;
fi
TLS_DN="/C=US/ST=MD/L=Columbia/O="$ACTOR"/CN=$CN"
TLS_SERVER="$CERT_FOLDER"/"$ACTOR_ALT"_aca_tls_"$ASYM_ALG"_"$KSIZE"_"$HASH_ALG"
PKI_CA3="$CERT_FOLDER"/"$ACTOR_ALT"_leaf_ca3_"$ASYM_ALG"_"$KSIZE"_"$HASH_ALG"
echo "TLS_SERVER is $TLS_SERVER"
create_cert () {
CERT_PATH="$1"
ISSUER="$2"
SUBJ_DN="$3"
ISSUER_KEY="$ISSUER".key
ISSUER_CERT="$ISSUER".pem
ALIAS=${CERT_PATH#*/} # Use filename without path as an alias
pushd /etc/hirs/certificates/HIRS
# if [ "$CERT_TYPE" == "rim_signer" ]; then
# EXTENSION="signer_extensions"
# else
# EXTENSION="ca_extensions"
# fi
echo "Updating cert for "$CERT_PATH".pem using $ISSUER_KEY with a DN="$SUBJ_DN" using $EXTENSION."
if [ "$ASYM_ALG" == "rsa" ]; then
openssl req -newkey rsa:"$ASYM_SIZE" \
-keyout "$CERT_PATH".key \
-out "$CERT_PATH".csr -subj "$SUBJ_DN" \
-passout pass:"$PASS"
#&> /dev/null
else
openssl ecparam -genkey -name "$ECC_NAME" -out "$CERT_PATH".key &> /dev/null
openssl req -new -key "$CERT_PATH".key -out "$CERT_PATH".csr -$HASH_ALG -subj "$SUBJ_DN" &> /dev/null
fi
openssl ca -config ca.conf \
-keyfile "$ISSUER_KEY" \
-md $HASH_ALG \
-cert "$ISSUER_CERT" \
-extensions "$EXTENSION" \
-out "$CERT_PATH".pem \
-in "$CERT_PATH".csr \
-passin pass:"$PASS" \
-batch \
-notext
popd
#&> /dev/null
# Increment the cert serial number
awk -F',' '{printf("%s\t%d\n",$1,$2+1)}' ./ca/serial.txt &> /dev/null
# remove csr file
rm -f "$CERT_PATH".csr
# remove all cert from TrustStore.jks
keytool -delete -noprompt -alias hirs_aca_tls_rsa_3k_sha384 -keystore $TRUSTSTORE -storepass $PASS
# insert new cert into TrustStore.jks with same alias
keytool -import -file ""$CERT_PATH".pem" -alias hirs_aca_tls_rsa_3k_sha384 -keystore $TRUSTSTORE -storepass $PASS
}
create_cert "$TLS_SERVER" "$PKI_CA3" "$TLS_DN"