Skip navigation links

Oracle Fusion Middleware Security Engine Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10674-05


oracle.security.crypto.cert
Class SPKAC

java.lang.Object
  extended by oracle.security.crypto.cert.SPKAC

All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class SPKAC
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object, java.io.Externalizable

An implementation of Signed Public Key And Challenge (SPKAC), which is used by Netscape Navigator browser to request certificates.

The SPKAC class can be used by the X509 class to generate X509 certificates.

See Also:
Serialized Form

Constructor Summary
SPKAC()
          Creates a new empty instance.
SPKAC(java.io.InputStream is)
          Construct a SPKAC from a DER-encoded input stream.
SPKAC(oracle.security.crypto.core.KeyPair kp)
          Creates a new SPKAC.
SPKAC(oracle.security.crypto.core.KeyPair kp, oracle.security.crypto.core.RandomBitsSource rbs)
          Creates a new SPKAC.
SPKAC(java.lang.String challenge)
          Construct a SPKAC with the specified challenge expected.
SPKAC(java.lang.String challenge, java.io.InputStream is)
          Construct a SPKAC from a DER-encoded input stream with a given expected challenge.
SPKAC(java.lang.String challenge, oracle.security.crypto.core.KeyPair kp)
          Creates a new SPKAC object with the specified challenge and key pair.
SPKAC(java.lang.String challenge, oracle.security.crypto.core.KeyPair kp, oracle.security.crypto.core.RandomBitsSource rbs)
           
SPKAC(java.lang.String challenge, java.lang.String data)
          Construct a SPKAC from a base64-encoded string (as returned by Netscape Navigator) with a given expected challenge.

 

Method Summary
 java.lang.String getChallenge()
          Returns the challenge string.
 oracle.security.crypto.core.PublicKey getPublicKey()
          Get the public key.
 void input(java.io.InputStream is)
          Inputs this SPKAC from a stream in binary DER-encoded form.
 void input(java.lang.String data)
          Input from a base64-encoded string.
 int length()
          Returns length.
 void output(java.io.OutputStream os)
          Output to the specified output stream.
 void readExternal(java.io.ObjectInput is)
           
 java.lang.String toBase64()
          Converts this SPKAC into a base64-encoded string.
 void writeExternal(java.io.ObjectOutput os)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SPKAC

public SPKAC()
Creates a new empty instance. This constructor is to be used with serialization or with the input method.

SPKAC

public SPKAC(oracle.security.crypto.core.KeyPair kp)
Creates a new SPKAC. Sets the challenge to an empty string.

SPKAC

public SPKAC(oracle.security.crypto.core.KeyPair kp,
             oracle.security.crypto.core.RandomBitsSource rbs)
Creates a new SPKAC. Sets the challenge to an empty string.
Parameters:
kp - the key pair
rbs - the random bits source to be used for the signing operation, if needed

SPKAC

public SPKAC(java.lang.String challenge,
             oracle.security.crypto.core.KeyPair kp)
Creates a new SPKAC object with the specified challenge and key pair.

SPKAC

public SPKAC(java.lang.String challenge,
             oracle.security.crypto.core.KeyPair kp,
             oracle.security.crypto.core.RandomBitsSource rbs)

SPKAC

public SPKAC(java.lang.String challenge)
Construct a SPKAC with the specified challenge expected.

SPKAC

public SPKAC(java.io.InputStream is)
      throws java.io.IOException
Construct a SPKAC from a DER-encoded input stream.
Throws:
java.io.IOException

SPKAC

public SPKAC(java.lang.String challenge,
             java.io.InputStream is)
      throws java.io.IOException
Construct a SPKAC from a DER-encoded input stream with a given expected challenge.
Throws:
java.io.IOException

SPKAC

public SPKAC(java.lang.String challenge,
             java.lang.String data)
      throws java.io.IOException
Construct a SPKAC from a base64-encoded string (as returned by Netscape Navigator) with a given expected challenge.
Throws:
java.io.IOException

Method Detail

getPublicKey

public oracle.security.crypto.core.PublicKey getPublicKey()
Get the public key.

getChallenge

public java.lang.String getChallenge()
Returns the challenge string.

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Output to the specified output stream.
Specified by:
output in interface oracle.security.crypto.util.Streamable
Throws:
java.io.IOException

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Inputs this SPKAC from a stream in binary DER-encoded form.
Specified by:
input in interface oracle.security.crypto.util.Streamable
Throws:
java.io.IOException - if there was an I/O error, or the SPKAC is invalid (e.g., the signature is incorrect, or the challenge does not equal the expected value).

input

public void input(java.lang.String data)
           throws java.io.IOException
Input from a base64-encoded string.
Throws:
java.io.IOException

length

public int length()
Returns length.
Specified by:
length in interface oracle.security.crypto.util.Streamable

toBase64

public java.lang.String toBase64()
                          throws java.io.IOException
Converts this SPKAC into a base64-encoded string.
Throws:
java.io.IOException

writeExternal

public void writeExternal(java.io.ObjectOutput os)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput is)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

Skip navigation links

Oracle Fusion Middleware Security Engine Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10674-05


Copyright © 2005, 2013, Oracle. All rights reserved.