File setup-cadir.patch of Package libest

diff --git a/example/server/ESTcommon.sh b/example/server/ESTcommon.sh
index e58d1c9..3289ce7 100644
--- a/example/server/ESTcommon.sh
+++ b/example/server/ESTcommon.sh
@@ -11,7 +11,7 @@
 
 # for detailed debugging
 EST_SCRIPTNAME=$0
-EST_LOGGING=estserver.scripts.log
+EST_LOGGING=/var/log/estserver.scripts.log
 
 # make bash exit if an uninitialized variable is used
 set -u
@@ -20,7 +20,7 @@ set -u
 # also note that these must match the equivalent settings
 # within each associated config file
 export EST_OPENSSL_EXTCACNF=extExampleCA.cnf
-EST_OPENSSL_EXTCADIR=extCA
+EST_OPENSSL_EXTCADIR=/etc/est/server/CA
 export EST_OPENSSL_EXTCACERT=$EST_OPENSSL_EXTCADIR/cacert.crt
 EST_OPENSSL_EXTCAPRIVDIR=$EST_OPENSSL_EXTCADIR/private
 EST_OPENSSL_EXTCANEWCERTSDIR=$EST_OPENSSL_EXTCADIR/newcerts
@@ -35,8 +35,8 @@ EST_OPENSSLCMD_EXTCAECPARAMSFILE=$EST_OPENSSL_EXTCADIR/prime256v1.pem
 EST_OPENSSLCMD_EXTCANEWKEY_PARAM="-newkey ec:$EST_OPENSSLCMD_EXTCAECPARAMSFILE"
 #EST_OPENSSLCMD_EXTCANEWKEY_PARAM=" "
 
-export EST_OPENSSL_CACNF=estExampleCA.cnf
-EST_OPENSSL_CADIR=estCA
+export EST_OPENSSL_CACNF=/etc/est/server/CA.cnf
+EST_OPENSSL_CADIR=/etc/est/server/CA
 export EST_OPENSSL_CACERT=$EST_OPENSSL_CADIR/cacert.crt
 EST_OPENSSL_CAPRIVDIR=$EST_OPENSSL_CADIR/private
 EST_OPENSSL_CANEWCERTSDIR=$EST_OPENSSL_CADIR/newcerts
diff --git a/example/server/createCA.sh b/example/server/createCA.sh
index c2a8097..a66bf68 100755
--- a/example/server/createCA.sh
+++ b/example/server/createCA.sh
@@ -98,7 +98,7 @@ echo "#################################################################"
 # re-using the same NEWKEY_PARAM as is used for our CA
 eval $OPENSSLCMD req -new -sha256 -nodes -out $EST_SERVER_CERTREQ $EST_OPENSSLCMD_CANEWKEY_PARAM -keyout $EST_SERVER_PRIVKEY -subj $EST_SERVER_SUBJ -config $EST_OPENSSL_CACNF
 iferrorlogandexit "Unable to create est server CSR" 1
-$OPENSSLCMD ca -md sha256 -out $EST_SERVER_CERT -batch -config $EST_OPENSSL_CACNF -extfile ./ext.cnf -infiles $EST_SERVER_CERTREQ 
+$OPENSSLCMD ca -md sha256 -out $EST_SERVER_CERT -batch -config $EST_OPENSSL_CACNF -extfile /etc/est/server/ext.cnf -infiles $EST_SERVER_CERTREQ 
 iferrorlogandexit "Unable to create est server certificate" 1
 $OPENSSLCMD x509 -sha256 -in $EST_SERVER_CERT -text
 # the mongoose https server wants to recieve the server certificate in
@@ -111,7 +111,7 @@ cat $EST_SERVER_PRIVKEY >> $EST_SERVER_CERTANDKEY
 
 echo "#################################################################"
 echo "####Creating combined trusted cert file"
-cat estCA/cacert.crt extCA/cacert.crt > trustedcerts.crt
+cat /etc/est/server/CA/cacert.crt /etc/est/server/CA/cacert.crt > /etc/est/server/trustedcerts.crt
 
 echo "#################################################################"
 echo "####Setting up and launching the estServer"
@@ -123,7 +123,7 @@ echo "estuser:estrealm:36807fa200741bb0e8fb04fcf08e2de6" > $EST_OPENSSL_CADIR/es
 
 # merging the two ca certs into one file so that the est server can be configured
 # to use both when validating client certificates
-combinefiles extCA/cacert.crt estCA/cacert.crt estCA/multicacerts.crt
+combinefiles /etc/est/server/CA/cacert.crt /etc/est/server/CA/cacert.crt /etc/est/server/CA/multicacerts.crt
 
 
 
diff --git a/example/server/estExampleCA.cnf b/example/server/estExampleCA.cnf
index 2fb2306..2439593 100644
--- a/example/server/estExampleCA.cnf
+++ b/example/server/estExampleCA.cnf
@@ -11,7 +11,7 @@ default_ca      = CA_default            # The default ca section
 
 [ CA_default ]
 # Some of these values are duplicates of the settings in the estScript_variables.sh file (keep them in sync!)
-dir            = ./estCA               # top dir (aka EST_OPENSSL_CADIR)
+dir            = /etc/est/server/CA    # top dir (aka EST_OPENSSL_CADIR)
 database       = $dir/index.txt        # index file (aka EST_OPENSSL_CADATABASE)
 new_certs_dir  = $dir/newcerts         # new certs dir
 
openSUSE Build Service is sponsored by