| <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>SignKeyHolder.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Coverage Report</a> > <a href="index.source.html" class="el_package">org.apache.rahas.impl.util</a> > <span class="el_source">SignKeyHolder.java</span></div><h1>SignKeyHolder.java</h1><pre class="source lang-java linenums">/* |
| * Copyright 2004,2005 The Apache Software Foundation. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| package org.apache.rahas.impl.util; |
| |
| |
| import org.opensaml.xml.security.credential.Credential; |
| import org.opensaml.xml.security.credential.CredentialContextSet; |
| import org.opensaml.xml.security.credential.UsageType; |
| import org.opensaml.xml.security.x509.X509Credential; |
| |
| import javax.crypto.SecretKey; |
| import java.security.PrivateKey; |
| import java.security.PublicKey; |
| import java.security.cert.X509CRL; |
| import java.security.cert.X509Certificate; |
| import java.util.Arrays; |
| import java.util.Collection; |
| |
| /** |
| * This class is used to store the signing credentials. |
| */ |
| public class SignKeyHolder implements X509Credential { |
| |
| <span class="fc" id="L38"> private String signatureAlgorithm = null;</span> |
| |
| <span class="fc" id="L40"> private X509Certificate[] issuerCerts = null;</span> |
| |
| <span class="fc" id="L42"> private PrivateKey issuerPK = null;</span> |
| |
| |
| public String getSignatureAlgorithm() { |
| <span class="fc" id="L46"> return signatureAlgorithm;</span> |
| } |
| |
| public void setSignatureAlgorithm(String signatureAlgorithm) { |
| <span class="fc" id="L50"> this.signatureAlgorithm = signatureAlgorithm;</span> |
| <span class="fc" id="L51"> }</span> |
| |
| |
| public X509Certificate[] getIssuerCerts() { |
| <span class="nc" id="L55"> return issuerCerts;</span> |
| } |
| |
| public void setIssuerCerts(X509Certificate[] issuerCerts) { |
| <span class="fc" id="L59"> this.issuerCerts = issuerCerts;</span> |
| <span class="fc" id="L60"> }</span> |
| |
| public PrivateKey getIssuerPK() { |
| <span class="nc" id="L63"> return issuerPK;</span> |
| } |
| |
| public void setIssuerPK(PrivateKey issuerPK) { |
| <span class="fc" id="L67"> this.issuerPK = issuerPK;</span> |
| <span class="fc" id="L68"> }</span> |
| |
| <span class="fc" id="L70"> public SignKeyHolder(){</span> |
| <span class="fc" id="L71"> }</span> |
| |
| |
| public X509Certificate getEntityCertificate() { |
| <span class="fc" id="L75"> return issuerCerts[0];</span> |
| } |
| |
| |
| public Collection<X509Certificate> getEntityCertificateChain() { |
| <span class="nc" id="L80"> return Arrays.asList(issuerCerts);</span> |
| } |
| |
| public Collection<X509CRL> getCRLs() { |
| <span class="nc" id="L84"> return null;</span> |
| } |
| |
| public String getEntityId() { |
| <span class="nc" id="L88"> return null;</span> |
| } |
| |
| public UsageType getUsageType() { |
| <span class="nc" id="L92"> return null;</span> |
| } |
| |
| public Collection<String> getKeyNames() { |
| <span class="nc" id="L96"> return null;</span> |
| } |
| |
| public PublicKey getPublicKey() { |
| <span class="nc" id="L100"> return null;</span> |
| } |
| |
| public PrivateKey getPrivateKey() { |
| <span class="fc" id="L104"> return issuerPK;</span> |
| } |
| |
| public SecretKey getSecretKey() { |
| <span class="nc" id="L108"> return null;</span> |
| } |
| |
| public CredentialContextSet getCredentalContextSet() { |
| <span class="nc" id="L112"> return null;</span> |
| } |
| |
| public Class<? extends Credential> getCredentialType() { |
| <span class="nc" id="L116"> return null;</span> |
| } |
| } |
| </pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.5.201505241946</span></div></body></html> |