CGI-SE-Trusted-Services / c2c-common

http://pvendil.github.io/c2c-common/
GNU Affero General Public License v3.0
45 stars 19 forks source link

Cannot validate any output from the ITS Demo #1

Closed lismore closed 8 years ago

lismore commented 8 years ago

I modified the ITSDemo.java file to write generated CA/Certs/Keys/Messages to a file.

image

The ITSDemo.java JUnit test passes - output looks good

image

I am trying to use the following site as referenced in the documentation to verify the output

https://werkzeug.dcaiti.tu-berlin.de/etsi/ts103097/

No matter what data I enter here from the output of the ITSDemo test will not validate. Is there any more information on how /what to take from the generated output so that it can be successfully validated.

best regards

Patrick

lismore commented 8 years ago

Ok found a solution,

By calling Hex.encode on certificate.getEncoded() I was able to get the correct Hex to validate.

new String(Hex.encode(rootCACertificate.getEncoded()))

File file2 = new File("c:\\pki\\LismoreRootCA1.crt");

                // if file doesnt exists, then create it
                if (!file2.exists()) {
                file2.createNewFile();
                }

                FileWriter fw2 = new FileWriter(file2.getAbsoluteFile());
                BufferedWriter bw2 = new BufferedWriter(fw2);
                bw2.write(new String(Hex.encode(rootCACertificate.getEncoded())));
                bw2.close();
certservice-se-bambo commented 8 years ago

Hi

Sorry for not responding earlier. I was on vacation and couldn't respond until today. Glad to hear that your fixed your problem. Let me know if you run into any other issues.