| java.lang.Object org.apache.geronimo.crypto.CaUtils
CaUtils | public class CaUtils (Code) | | This class implements some utility methods used by CA
version: $Rev: 617735 $ $Date: 2008-02-01 17:20:02 -0800 (Fri, 01 Feb 2008) $ |
Method Summary | |
public static String | base64Certificate(Certificate cert) This method returns base64 encoded text of a given certificate. | public static String | base64Text(byte[] data, String header, String footer, int lineSize) This method encodes a given byte array into base64 along with specified header and footers. | public static PublicKey | getPublicKeyObject(SubjectPublicKeyInfo pubKeyInfo) | public static X509Name | getSubjectX509Name(Certificate cert) | public static X509Name | getX509Name(X500Principal principal) | public static X509Name | getX509Name(String cn, String ou, String o, String l, String st, String c) This method creates a X509Name object using the name attributes specified. | public static Map | processPKCS10Request(String certreq) This method processes a certificate request and returns a map containing subject
and public key in the request. | public static Map | processSPKAC(String spkac) This method processes a DER encoded SignedPublicKeyAndChallenge in base64 format. | public static void | storeInBase64(OutputStream fout, byte[] data, String header, String footer, int lineSize) This method encodes a given byte array into base64 along with specified header and footers and writes
the output to a specified OutputStream. | public static void | storeInBase64(String outfile, byte[] data, String header, String footer, int lineSize) This method encodes a given byte array into base64 along with specified header and footers and writes
the output to a specified file. |
B64_LINE_SIZE | final public static int B64_LINE_SIZE(Code) | | |
CERT_REQ_FOOTER | final public static String CERT_REQ_FOOTER(Code) | | |
CERT_REQ_HEADER | final public static String CERT_REQ_HEADER(Code) | | |
CERT_REQ_PUBLICKEY | final public static String CERT_REQ_PUBLICKEY(Code) | | |
CERT_REQ_PUBLICKEY_OBJ | final public static String CERT_REQ_PUBLICKEY_OBJ(Code) | | |
CERT_REQ_SUBJECT | final public static String CERT_REQ_SUBJECT(Code) | | |
CERT_REQ_VERSION | final public static String CERT_REQ_VERSION(Code) | | |
PKAC_CHALLENGE | final public static String PKAC_CHALLENGE(Code) | | |
base64Text | public static String base64Text(byte[] data, String header, String footer, int lineSize) throws Exception(Code) | | This method encodes a given byte array into base64 along with specified header and footers.
Parameters: data - The byte array to be encoded in base64 Parameters: header - Header for base64 encoded text Parameters: footer - Footer for base64 encoded text Parameters: lineSize - Maximum line size to split base64 encoded text if required |
getPublicKeyObject | public static PublicKey getPublicKeyObject(SubjectPublicKeyInfo pubKeyInfo) throws Exception(Code) | | This method creates a java.security.PublicKey object based on the public key information given in SubjectPublicKeyInfo
Parameters: pubKeyInfo - SubjectPublicKeyInfo instance containing the public key information. |
getX509Name | public static X509Name getX509Name(String cn, String ou, String o, String l, String st, String c)(Code) | | This method creates a X509Name object using the name attributes specified.
Parameters: cn - Common Name Parameters: ou - Organization Unit Parameters: o - Organization Parameters: l - Locality Parameters: st - State Parameters: c - Country |
storeInBase64 | public static void storeInBase64(OutputStream fout, byte[] data, String header, String footer, int lineSize) throws Exception(Code) | | This method encodes a given byte array into base64 along with specified header and footers and writes
the output to a specified OutputStream.
Parameters: fout - Output stream to write the encoded text Parameters: data - The byte array to be encoded in base64 Parameters: header - Header for base64 encoded text Parameters: footer - Footer for base64 encoded text Parameters: lineSize - Maximum line size to split base64 encoded text if required |
storeInBase64 | public static void storeInBase64(String outfile, byte[] data, String header, String footer, int lineSize) throws Exception(Code) | | This method encodes a given byte array into base64 along with specified header and footers and writes
the output to a specified file.
Parameters: outfile - File name to write the output to Parameters: data - The byte array to be encoded in base64 Parameters: header - Header for base64 encoded text Parameters: footer - Footer for base64 encoded text Parameters: lineSize - Maximum line size to split base64 encoded text if required |
|
|