Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.javax.net.ssl
Class PrivateCredentials  view PrivateCredentials download PrivateCredentials.java

java.lang.Object
  extended bygnu.javax.net.ssl.PrivateCredentials
All Implemented Interfaces:
javax.net.ssl.ManagerFactoryParameters

public class PrivateCredentials
extends java.lang.Object
implements javax.net.ssl.ManagerFactoryParameters

An instance of a manager factory parameters for holding a single certificate/private key pair, encoded in PEM format.


Field Summary
static java.lang.String BEGIN_DSA
           
static java.lang.String BEGIN_RSA
           
private  java.util.List certChains
           
static java.lang.String END_DSA
           
static java.lang.String END_RSA
           
private  java.util.List privateKeys
           
 
Constructor Summary
PrivateCredentials()
           
 
Method Summary
 void add(java.io.InputStream certChain, java.io.InputStream privateKey)
           
private  byte[] decryptKey(byte[] ct, java.lang.String cipher, byte[] salt)
           
private  byte[] deriveKey(byte[] salt, int keylen)
           
 void destroy()
           
 java.util.List getCertChains()
           
 java.util.List getPrivateKeys()
           
 boolean isDestroyed()
           
private  java.lang.String readLine(java.io.InputStream in)
           
private  byte[] toByteArray(java.lang.String hex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEGIN_DSA

public static final java.lang.String BEGIN_DSA
See Also:
Constant Field Values

END_DSA

public static final java.lang.String END_DSA
See Also:
Constant Field Values

BEGIN_RSA

public static final java.lang.String BEGIN_RSA
See Also:
Constant Field Values

END_RSA

public static final java.lang.String END_RSA
See Also:
Constant Field Values

privateKeys

private java.util.List privateKeys

certChains

private java.util.List certChains
Constructor Detail

PrivateCredentials

public PrivateCredentials()
Method Detail

add

public void add(java.io.InputStream certChain,
                java.io.InputStream privateKey)
         throws java.security.cert.CertificateException,
                java.security.InvalidKeyException,
                java.security.spec.InvalidKeySpecException,
                java.io.IOException,
                java.security.NoSuchAlgorithmException,
                gnu.javax.crypto.pad.WrongPaddingException

getPrivateKeys

public java.util.List getPrivateKeys()

getCertChains

public java.util.List getCertChains()

destroy

public void destroy()

isDestroyed

public boolean isDestroyed()

readLine

private java.lang.String readLine(java.io.InputStream in)
                           throws java.io.IOException

decryptKey

private byte[] decryptKey(byte[] ct,
                          java.lang.String cipher,
                          byte[] salt)
                   throws java.io.IOException,
                          java.security.InvalidKeyException,
                          gnu.javax.crypto.pad.WrongPaddingException

deriveKey

private byte[] deriveKey(byte[] salt,
                         int keylen)
                  throws java.io.IOException

toByteArray

private byte[] toByteArray(java.lang.String hex)