From 2d2fcf74f7bf6705f786004d68adaba4be33b14a Mon Sep 17 00:00:00 2001
From: nterranova <nicholas.terranova@cnaf.infn.it>
Date: Wed, 14 Mar 2018 17:02:29 +0100
Subject: [PATCH] README modified in certs, added awk commands for splitting

---
 t/certs/README.md | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/t/certs/README.md b/t/certs/README.md
index b23d8ee..248197e 100644
--- a/t/certs/README.md
+++ b/t/certs/README.md
@@ -11,6 +11,13 @@ To obtain such certificates the following command is used:
 
 	VOMS_CLIENTS_JAVA_OPTIONS="-Dvoms.fake.vo=test.vo -Dvoms.fake=true -Dvoms.fake.aaCert=<path_to_cert>/voms_example.cert.pem -Dvoms.fake.aaKey=<path_to_key>/voms_example.key.pem" voms-proxy-init3 -voms test.vo -cert <path_to_test0>/test0.p12 --valid <validity>
 
+Once VOMS proxy certificates are generated in a `*.pem` format, they need to be split in certificates and key to be used in Openresty tests. `*.cert.pem` and `*.key.pem` files are obtained by simpling typing
+
+	awk '/BEGIN RSA PRIVATE KEY/,/END RSA PRIVATE KEY/' <name>.pem > <name>.key.pem
+	awk '/BEGIN CERTIFICATE/,/END CERTIFICATE/' <name>.pem > <name>.cert.pem
+
+in the `certs` folder, where `<name>` could be for instance `0,1,2` etc.
+
 *voms\_example.cert.pem* and *voms\_example.ket.pem* can be found in the `certs` folder. 
 
 To perform correctly the VOMS AC validation, a \*.lsc or \*.pem file is needed in `/etc/grid-security/vomsdir`, see [VOMS client 3.3.0 User Guide](http://italiangrid.github.io/voms/documentation/voms-clients-guide/3.0.3/) for further details. An example of *voms.example.lsc* can be found in `vomsdir/test.vo`.
-- 
GitLab