summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-01-11 12:57:53 -0500
committerAde Lee <alee@redhat.com>2012-01-11 13:49:04 -0500
commit10cfe7756e967ac91c66d33b392aeab9cf3780fb (patch)
treed5ac9b58442265d2ce5ef60e31f041ddacba1b4f /pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java
parentedcb24f65cc3700e75d0a1d14dc2483f210b0ee4 (diff)
downloadpki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.gz
pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.xz
pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.zip
Formatting (no line wrap in comments or code)
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java')
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java44
1 files changed, 22 insertions, 22 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java b/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java
index 17efca771..23cb1957a 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.io.IOException;
import netscape.security.util.DerInputStream;
@@ -25,27 +24,27 @@ import netscape.security.util.DerValue;
import netscape.security.x509.AlgorithmId;
import netscape.security.x509.X509Key;
-
/**
- *
+ *
* The <code>KeyGenInfo</code> represents the information generated by
* the KeyGen tag of the HTML forms. It provides the parsing and accessing
- * mechanisms.<p>
- *
+ * mechanisms.
+ * <p>
+ *
* <pre>
* SignedPublicKeyAndChallenge ::= SEQUENCE {
* publicKeyAndChallenge PublicKeyAndChallenge,
* signatureAlgorithm AlgorithmIdentifier,
* signature BIT STRING
* }
- *
+ *
* PublicKeyAndChallenge ::= SEQUENCE {
* spki SubjectPublicKeyInfo,
* challenge IA5STRING
* }
- *</pre>
- *
- *
+ * </pre>
+ *
+ *
* @version $Revision$, $Date$
*/
@@ -79,11 +78,11 @@ public class KeyGenInfo {
/**
* Construct KeyGenInfo using the SignedPublicKeyAndChallenge
* string representation.
- *
+ *
* @param spkac SignedPublicKeyAndChallenge string representation
*/
public KeyGenInfo(String spkac)
- throws IOException {
+ throws IOException {
decode(spkac);
}
@@ -93,7 +92,7 @@ public class KeyGenInfo {
/**
* Initialize using the SPKAC string
- *
+ *
* @param spkac SPKAC string from the end user
*/
public void decode(String spkac) throws IOException {
@@ -104,7 +103,7 @@ public class KeyGenInfo {
/**
* Der encoded into buffer
- *
+ *
* @return Der encoded buffer
*/
public byte[] encode() {
@@ -113,7 +112,7 @@ public class KeyGenInfo {
/**
* Get SPKI in DerValue form
- *
+ *
* @return SPKI in DerValue form
*/
public DerValue getDerSPKI() {
@@ -122,7 +121,7 @@ public class KeyGenInfo {
/**
* Get SPKI as X509Key
- *
+ *
* @return SPKI in X509Key form
*/
public X509Key getSPKI() {
@@ -131,7 +130,7 @@ public class KeyGenInfo {
/**
* Get Challenge phrase in DerValue form
- *
+ *
* @return Challenge in DerValue form. null if none.
*/
public DerValue getDerChallenge() {
@@ -140,7 +139,7 @@ public class KeyGenInfo {
/**
* Get Challenge phrase in string format
- *
+ *
* @return challenge phrase. null if none.
*/
public String getChallenge() {
@@ -149,6 +148,7 @@ public class KeyGenInfo {
/**
* Get Signature
+ *
* @return signature
*/
public byte[] getSignature() {
@@ -157,6 +157,7 @@ public class KeyGenInfo {
/**
* Get Algorithm ID
+ *
* @return the algorithm id
*/
public AlgorithmId getAlgorithmId() {
@@ -165,7 +166,7 @@ public class KeyGenInfo {
/**
* Validate Signature and Challenge Phrase
- *
+ *
* @param challenge phrase; null if none
* @return true if validated; otherwise, false
*/
@@ -180,7 +181,7 @@ public class KeyGenInfo {
/**
* String representation of KenGenInfo
- *
+ *
* @return string representation of KeGenInfo
*/
public String toString() {
@@ -194,13 +195,13 @@ public class KeyGenInfo {
*==========================================================*/
private byte[] base64Decode(String spkac)
- throws IOException {
+ throws IOException {
return com.netscape.osutil.OSUtil.AtoB(spkac);
}
private void derDecode(byte spkac[])
- throws IOException {
+ throws IOException {
DerInputStream derIn = new DerInputStream(spkac);
/* get SPKAC Algorithm & Signature */
@@ -224,4 +225,3 @@ public class KeyGenInfo {
}
}
-