001/* 002 * (C) Copyright 2010 Nuxeo SA (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Wojciech Sulejman 016 */ 017package org.nuxeo.ecm.platform.signature.api.pki; 018 019import java.io.InputStream; 020import java.security.KeyStore; 021 022import org.nuxeo.ecm.platform.signature.api.exception.CertException; 023 024/** 025 * Allows interaction with CA root-related PKI objects: certificates, keys, keystore & certificate files 026 * 027 * @author <a href="mailto:ws@nuxeo.com">Wojciech Sulejman</a> 028 */ 029public interface RootService { 030 031 public KeyStore getRootKeyStore(); 032 033 public String getRootKeystoreFilePath(); 034 035 public String getRootKeystorePassword(); 036 037 public String getRootKeyAlias(); 038 039 public String getRootKeyPassword(); 040 041 public String getRootCertificateAlias(); 042 043 public boolean isRootSetup(); 044 045 public byte[] getRootPublicCertificate() throws CertException; 046 047 public InputStream getRootKeystoreIS() throws CertException; 048 049 public void setRootKeyStore(KeyStore rootKeyStore); 050 051 public void setRootKeystoreFilePath(String rootKeystoreFilePath); 052 053 public void setRootKeystorePassword(String rootKeystorePassword); 054 055 public void setRootKeyAlias(String rootKeyAlias); 056 057 public void setRootKeyPassword(String rootKeyPassword); 058 059 public void setRootCertificateAlias(String rootCertificateAlias); 060}