throw new IllegalArgumentException("Missing XKMSKeyPass property.");
throw new IllegalArgumentException("Missing XKMSKeyStorePass property.");
   public void init(CA ca) throws Exception {   	 m_log.debug("XKMSCAService : init ");	 // lookup keystore passwords           String keystorepass = ServiceLocator.getInstance().getString("java:comp/env/XKMSKeyStorePass");      	 if (keystorepass == null)	   throw new IllegalArgumentException("Missing XKMSKeyPass property.");        	  // Currently only RSA keys are supported	 XKMSCAServiceInfo info = (XKMSCAServiceInfo) getExtendedCAServiceInfo();                         	 // Create XKMS KeyStore	    	 KeyStore keystore = KeyStore.getInstance("PKCS12", "BC");	 keystore.load(null, null);                                    	 KeyPair xKMSkeys = KeyTools.genKeys(info.getKeySpec(), info.getKeyAlgorithm());	   	  	 Certificate xKMSCertificate =	  ca.generateCertificate(new UserDataVO("NOUSERNAME", 	                                          											info.getSubjectDN(),											0, 											info.getSubjectAltName(),											"NOEMAIL",											0,0,0,0, null,null,0,0,null)																																						   , xKMSkeys.getPublic(),						   -1, // KeyUsage						   ca.getValidity(), 						   new XKMSCertificateProfile());	  	 xKMScertificatechain = new ArrayList();	 xKMScertificatechain.add(xKMSCertificate);	 xKMScertificatechain.addAll(ca.getCertificateChain());	 this.xKMSkey = xKMSkeys.getPrivate(); 	  	 	  	  	  	       keystore.setKeyEntry(PRIVATESIGNKEYALIAS,xKMSkeys.getPrivate(),null,(Certificate[]) xKMScertificatechain.toArray(new Certificate[xKMScertificatechain.size()]));                   java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();     keystore.store(baos, keystorepass.toCharArray());     data.put(XKMSKEYSTORE, new String(Base64.encode(baos.toByteArray())));           // Store XKMS KeyStore      	 setStatus(info.getStatus());	 this.info = new XKMSCAServiceInfo(info.getStatus(),									  getSubjectDN(),									  getSubjectAltName(), 									  (String)data.get(KEYSPEC), 									  (String) data.get(KEYALGORITHM),	                                  xKMScertificatechain);         }   