Class KeyGenInfo
java.lang.Object
com.netscape.certsrv.base.KeyGenInfo
The
KeyGenInfo represents the information generated by
the KeyGen tag of the HTML forms. It provides the parsing and accessing
mechanisms.
SignedPublicKeyAndChallenge ::= SEQUENCE {
publicKeyAndChallenge PublicKeyAndChallenge,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING
}
PublicKeyAndChallenge ::= SEQUENCE {
spki SubjectPublicKeyInfo,
challenge IA5STRING
}
- Version:
- $Revision$, $Date$
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct empty KeyGenInfo.KeyGenInfo(String spkac) Construct KeyGenInfo using the SignedPublicKeyAndChallenge string representation. -
Method Summary
Modifier and TypeMethodDescriptionvoidInitialize using the SPKAC stringbyte[]encode()Der encoded into bufferorg.mozilla.jss.netscape.security.x509.AlgorithmIdGet Algorithm IDGet Challenge phrase in string formatorg.mozilla.jss.netscape.security.util.DerValueGet Challenge phrase in DerValue formorg.mozilla.jss.netscape.security.util.DerValueGet SPKI in DerValue formbyte[]Get Signatureorg.mozilla.jss.netscape.security.x509.X509KeygetSPKI()Get SPKI as X509KeytoString()String representation of KenGenInfobooleanvalidateChallenge(String challenge) Validate Signature and Challenge Phrase
-
Constructor Details
-
KeyGenInfo
public KeyGenInfo()Construct empty KeyGenInfo. Need to call decode function later to initialize. -
KeyGenInfo
Construct KeyGenInfo using the SignedPublicKeyAndChallenge string representation.- Parameters:
spkac- SignedPublicKeyAndChallenge string representation- Throws:
IOException
-
-
Method Details
-
decode
Initialize using the SPKAC string- Parameters:
spkac- SPKAC string from the end user- Throws:
IOException
-
encode
public byte[] encode()Der encoded into buffer- Returns:
- Der encoded buffer
-
getDerSPKI
public org.mozilla.jss.netscape.security.util.DerValue getDerSPKI()Get SPKI in DerValue form- Returns:
- SPKI in DerValue form
-
getSPKI
public org.mozilla.jss.netscape.security.x509.X509Key getSPKI()Get SPKI as X509Key- Returns:
- SPKI in X509Key form
-
getDerChallenge
public org.mozilla.jss.netscape.security.util.DerValue getDerChallenge()Get Challenge phrase in DerValue form- Returns:
- Challenge in DerValue form. null if none.
-
getChallenge
Get Challenge phrase in string format- Returns:
- challenge phrase. null if none.
-
getSignature
public byte[] getSignature()Get Signature- Returns:
- signature
-
getAlgorithmId
public org.mozilla.jss.netscape.security.x509.AlgorithmId getAlgorithmId()Get Algorithm ID- Returns:
- the algorithm id
-
validateChallenge
Validate Signature and Challenge Phrase- Parameters:
challenge- phrase; null if none- Returns:
- true if validated; otherwise, false
-
toString
-