001/* 002 * (C) Copyright 2010 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Wojciech Sulejman 018 */ 019package org.nuxeo.ecm.platform.signature.api.pki; 020 021import java.io.InputStream; 022import java.security.KeyStore; 023 024import org.nuxeo.ecm.platform.signature.api.exception.CertException; 025 026/** 027 * Allows interaction with CA root-related PKI objects: certificates, keys, keystore & certificate files 028 * 029 * @author <a href="mailto:[email protected]">Wojciech Sulejman</a> 030 */ 031public interface RootService { 032 033 public KeyStore getRootKeyStore(); 034 035 public String getRootKeystoreFilePath(); 036 037 public String getRootKeystorePassword(); 038 039 public String getRootKeyAlias(); 040 041 public String getRootKeyPassword(); 042 043 public String getRootCertificateAlias(); 044 045 public boolean isRootSetup(); 046 047 public byte[] getRootPublicCertificate() throws CertException; 048 049 public InputStream getRootKeystoreIS() throws CertException; 050 051 public void setRootKeyStore(KeyStore rootKeyStore); 052 053 public void setRootKeystoreFilePath(String rootKeystoreFilePath); 054 055 public void setRootKeystorePassword(String rootKeystorePassword); 056 057 public void setRootKeyAlias(String rootKeyAlias); 058 059 public void setRootKeyPassword(String rootKeyPassword); 060 061 public void setRootCertificateAlias(String rootCertificateAlias); 062}