anon.crypto
Class X509AuthorityKeyIdentifier

java.lang.Object
  extended by anon.crypto.AbstractX509Extension
      extended by anon.crypto.AbstractX509KeyIdentifier
          extended by anon.crypto.X509AuthorityKeyIdentifier

public class X509AuthorityKeyIdentifier
extends AbstractX509KeyIdentifier

The Authority Public Key Identifier as specified in RFC 5280 is calcluated the same way as the SubjectKeyIdentifier.

Author:
Robert Hirschberger
See Also:
http://tools.ietf.org/html/rfc5280

Field Summary
static java.lang.String IDENTIFIER
           
private  org.bouncycastle.asn1.x509.GeneralNames m_names
          the optional name of the issuer
private  java.math.BigInteger m_serial
          the optional serial number of the issuing certificate
 
Fields inherited from class anon.crypto.AbstractX509KeyIdentifier
m_value
 
Constructor Summary
X509AuthorityKeyIdentifier(org.bouncycastle.asn1.DERSequence a_extension)
          Creates an extension from a BouncyCastle DER sequence.
X509AuthorityKeyIdentifier(IMyPublicKey a_publicKey)
          Creates a new X509AuthorityKeyIdentifier from a public key.
X509AuthorityKeyIdentifier(IMyPublicKey a_publicKey, org.bouncycastle.asn1.x509.GeneralNames a_name, java.math.BigInteger a_serial)
          Creates a new X509AuthorityKeyIdentifier from a public key, a name and a certificate serial
X509AuthorityKeyIdentifier(IMyPublicKey a_publicKey, X509DistinguishedName a_name, java.math.BigInteger a_serial)
          Creates a new X509AuthorityKeyIdentifier from a public key, a distinguished name and a certificate serial
 
Method Summary
private static byte[] createDEROctets(IMyPublicKey a_publicKey, org.bouncycastle.asn1.x509.GeneralNames a_name, java.math.BigInteger a_serial)
          Generates the octets to hand over to the super class
private  void createValue()
          Calculate the AuthorityKeyIdentifier value.
 java.lang.String getName()
          Returns "AuthorityKeyIdentifier".
 java.util.Vector getValues()
          Returns a Vector containing the keyIdentifier and if available the name of the certificate issuer und the serial number of the issuing certificate.
 
Methods inherited from class anon.crypto.AbstractX509KeyIdentifier
getValue, getValueWithoutColon
 
Methods inherited from class anon.crypto.AbstractX509Extension
equals, getBCExtension, getDEROctets, getIdentifier, getInstance, hashCode, isCritical, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

IDENTIFIER

public static final java.lang.String IDENTIFIER

m_serial

private java.math.BigInteger m_serial
the optional serial number of the issuing certificate


m_names

private org.bouncycastle.asn1.x509.GeneralNames m_names
the optional name of the issuer

Constructor Detail

X509AuthorityKeyIdentifier

public X509AuthorityKeyIdentifier(IMyPublicKey a_publicKey)
Creates a new X509AuthorityKeyIdentifier from a public key.

Parameters:
a_publicKey - the issuer's public key

X509AuthorityKeyIdentifier

public X509AuthorityKeyIdentifier(IMyPublicKey a_publicKey,
                                  org.bouncycastle.asn1.x509.GeneralNames a_name,
                                  java.math.BigInteger a_serial)
Creates a new X509AuthorityKeyIdentifier from a public key, a name and a certificate serial

Parameters:
a_publicKey - the issuer's public key
a_name - the issuer's name
a_serial - the issuing certificate's serial number

X509AuthorityKeyIdentifier

public X509AuthorityKeyIdentifier(IMyPublicKey a_publicKey,
                                  X509DistinguishedName a_name,
                                  java.math.BigInteger a_serial)
Creates a new X509AuthorityKeyIdentifier from a public key, a distinguished name and a certificate serial

Parameters:
a_publicKey - the issuer's public key
a_name - the issuer's distinguished name
a_serial - the issuing certificate's serial number

X509AuthorityKeyIdentifier

public X509AuthorityKeyIdentifier(org.bouncycastle.asn1.DERSequence a_extension)
Creates an extension from a BouncyCastle DER sequence. For internal use only.

Parameters:
a_extension - a DERSequence
Method Detail

getName

public java.lang.String getName()
Returns "AuthorityKeyIdentifier".

Specified by:
getName in class AbstractX509Extension
Returns:
"AuthorityKeyIdentifier"

createDEROctets

private static byte[] createDEROctets(IMyPublicKey a_publicKey,
                                      org.bouncycastle.asn1.x509.GeneralNames a_name,
                                      java.math.BigInteger a_serial)
Generates the octets to hand over to the super class

Parameters:
a_publicKey - the issuer's public key
a_name - the issuer's name
a_serial - the issuing certificate's serial number
Returns:

createValue

private void createValue()
Calculate the AuthorityKeyIdentifier value. The keyIdentifier is the stored as a String in m_value


getValues

public java.util.Vector getValues()
Returns a Vector containing the keyIdentifier and if available the name of the certificate issuer und the serial number of the issuing certificate.

Overrides:
getValues in class AbstractX509KeyIdentifier
Returns:
Vector a Vector of Strings containing the AuthorityKeyIdentifiers values