From: <Fed...@ff...> - 2012-10-09 09:25:43
|
Hi again, Just wanted to inform you, in case anyone else might be interested, that I have tested the rest API to communicate to PrivacyCA.com, and they seem to work. Here is the code: public class PrivacyCAaik { public static void main(String[] args){ //First retrieve the PrivacyCA certificate of the level you want String[] arg1 = new String[5]; arg1[0] = "rest_cacert"; arg1[1] = "--level"; arg1[2] = "1"; arg1[3] = "--cacert"; arg1[4] = "cacertLevel1"; PKIClient.main(arg1); //Then create the AIK String[] arg=new String[11]; arg[0]="rest_aik_create"; arg[1]="--cacert"; arg[2]="cacertLevel1"; arg[3]="-a"; arg[4]="aiksecret"; arg[5]="-l"; arg[6]="aikRest"; arg[7]="-o"; arg[8]="YOUR_TPM_OWNER_SECRET"; arg[9]="--level"; arg[10]="1";//MUST BE THE SAME AS THE CACERT OR YOU GET 403 RESPONSE CODE PKIClient.main(arg); } } Federico |