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:ws@nuxeo.com">Wojciech Sulejman</a> 030 */ 031public interface RootService { 032 033 KeyStore getRootKeyStore(); 034 035 String getRootKeystoreFilePath(); 036 037 String getRootKeystorePassword(); 038 039 String getRootKeyAlias(); 040 041 String getRootKeyPassword(); 042 043 String getRootCertificateAlias(); 044 045 boolean isRootSetup(); 046 047 byte[] getRootPublicCertificate() throws CertException; 048 049 InputStream getRootKeystoreIS() throws CertException; 050 051 void setRootKeyStore(KeyStore rootKeyStore); 052 053 void setRootKeystoreFilePath(String rootKeystoreFilePath); 054 055 void setRootKeystorePassword(String rootKeystorePassword); 056 057 void setRootKeyAlias(String rootKeyAlias); 058 059 void setRootKeyPassword(String rootKeyPassword); 060 061 void setRootCertificateAlias(String rootCertificateAlias); 062}