|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ch.othello.openscep.ScepClient
Scep Client
$Id: ScepClient.java,v 1.54 2002/02/28 01:22:16 urut Exp $ $Log: ScepClient.java,v $ Revision 1.54 2002/02/28 01:22:16 urut debug info Revision 1.53 2002/02/27 06:53:19 urut modified setting of subject in Signed structure Revision 1.52 2002/02/27 04:21:27 urut first working spkac version Revision 1.51 2002/02/27 04:11:09 alani loadCA now only accepts a String Revision 1.50 2002/02/25 04:45:35 urut set subjectScep from cmd line to test out various effects Revision 1.49 2002/02/25 04:23:39 urut first working version for MS browsers there is still a problem in here as subjectSCEP needs to be set to the subject of the actual PKCS#10 request. seems to be a bug in OpenScep. Revision 1.48 2002/02/24 22:30:57 alani added reconstruction of certReq to setCertReqOrig if the type is pkcs10 Revision 1.47 2002/02/24 06:42:17 urut extracting of public key from pkcs#10 changed (only for v1!) Revision 1.46 2002/02/23 22:59:42 alani added extraction of subject to setCertReq Revision 1.44 2002/02/22 12:38:55 urut modifications to process SUCCESS response to v2 request Revision 1.43 2002/02/22 10:35:31 urut first v2 working release (pkcs#10 only) major mods,in particular: - md5 hash calculation for proxyIdentifier - requestPayload, Attributes is tagged object Revision 1.42 2002/02/22 07:34:37 alani refactored setCaCert and fixed get & set StateData Revision 1.41 2002/02/22 03:18:07 urut adjusted scep library to openscep 0.4.0: -proxyIdentification Envelope Removed -calculation of hash for requestPayload changed -messageTyp in v2 is different Revision 1.40 2002/02/22 01:31:38 alani added new methods setSubject(String) and setScepSubject(String) Revision 1.39 2002/02/16 01:14:45 urut replaced all read-only accessed files with URL's file:///...... removed option caCert , only caCertURL is available now Revision 1.38 2002/02/16 00:40:20 urut awfull lot of fixes,among them: - computation of transactionID for v2 - spkac processing in cmd line client - new filetyp unknown for debug files - subject in cmd client - lots of fixes for v2 protocoll handling Revision 1.37 2002/02/15 13:21:12 urut first complete implementation of scep v2 Revision 1.36 2002/02/15 10:12:20 urut changed endEntityxxxx -> scepxxxx (because of v2 scep) Revision 1.35 2002/02/15 06:11:09 urut merge with alani lots of mods for incorporating full support for HTTP communication with SCEPD; Httpd client is now capable of reading multipart-mime (sort of....??) messages Revision 1.34 2002/02/14 16:39:40 alani added a few methods & attributes needed by the http proxy Revision 1.33 2002/02/13 12:55:22 alani some changes Revision 1.32 2002/02/12 19:33:23 urut replaced all println statements Revision 1.31 2002/02/12 14:01:17 urut cmd client improved Revision 1.30 2002/02/07 17:08:50 urut ability to send scep request over http added Revision 1.29 2002/02/07 13:16:34 urut finished http CA cert get Revision 1.28 2002/02/07 12:40:56 urut moved util-stuff to Utils.java CA get implemented Revision 1.27 2002/01/31 14:07:32 urut adjustments for new SignedData (that takes certificates as Sequences) Revision 1.26 2002/01/31 11:29:45 urut new cmd option "-certificate" Revision 1.25 2002/01/24 00:11:31 urut new flag -response added Revision 1.24 2002/01/23 19:10:24 urut fixed computation of MD5 fingerprint Revision 1.23 2002/01/17 19:44:00 urut added attribute certReqOrig, which contains the original PKCS#10 request (because CertificationRequest is buggy) Revision 1.22 2002/01/17 11:52:37 urut extract publicKey from pkcs#10 request if available, if not load it from file (new function, called from CmdClient ) Revision 1.21 2002/01/15 21:20:11 urut Modified EvelopedData: is now embedded in ia ContentInfo structure (required by PKCS7) Modified transactionID (set to fix id for testing because it needs to be printable) added missing attributes to signerInfo added messageTyp=19 for PKCSReq ScepClient uses now DERObject as attribute type to store envelope. Revision 1.20 2002/01/10 20:22:01 urut bug fixing Revision 1.19 2002/01/10 16:17:40 urut fixed some bugs Revision 1.18 2002/01/10 15:54:23 urut load pkcs#10 Revision 1.17 2002/01/10 15:09:38 alani new attribute distinguishedName in ScepClient, scepReq now generates a transactionId Revision 1.15 2002/01/10 14:43:44 urut merge Revision 1.14 2002/01/10 14:37:26 urut merge Revision 1.13 2002/01/10 14:19:43 alani improved certRequest Revision 1.10 2002/01/08 21:00:29 urut added javadoc header with cvs tags to every file Revision 1.9 2002/01/08 11:41:19 urut added tags
Field Summary | |
private org.bouncycastle.asn1.x509.X509CertificateStructure |
caCert
|
private org.bouncycastle.asn1.x509.RSAPublicKeyStructure |
caPubKey
|
private String |
caUrl
|
private URL |
certificate
|
private org.bouncycastle.asn1.pkcs.CertificationRequest |
certReq
|
private org.bouncycastle.asn1.DERObject |
certReqOrig
|
private org.bouncycastle.asn1.DERPrintableString |
challenge
|
(package private) static String |
COMMAND_PACKAGE
|
private String |
communityString
|
private StateData |
lnkStateData
|
private org.bouncycastle.asn1.DERObject |
pkcsCertReqEnvelope
|
(package private) org.bouncycastle.asn1.pkcs.SignedData |
pkcsCertReqSigned
|
private org.bouncycastle.asn1.pkcs.ContentInfo |
pkiMessage
|
private org.bouncycastle.asn1.DERObject |
proxyCertReq
|
private org.bouncycastle.asn1.DEROctetString |
proxyIdentification
|
private String |
request
|
private org.bouncycastle.asn1.DERObject |
requestPayload
|
private int |
requestType
|
private org.bouncycastle.asn1.DERObject |
responseFile
|
private org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure |
scepPrivateKey
|
private org.bouncycastle.asn1.x509.RSAPublicKeyStructure |
scepPublicKey
|
private int |
scepVersion
|
private SecureRandom |
secureRandom
|
(package private) org.bouncycastle.asn1.DERInteger |
serial
|
private org.bouncycastle.asn1.x509.X509CertificateStructure |
signedEndEntityCertificate
|
private org.bouncycastle.asn1.x509.X509Name |
subject
|
private org.bouncycastle.asn1.x509.X509Name |
subjectScep
|
private org.bouncycastle.asn1.x509.TBSCertificateStructure |
tbsCACert
|
private org.bouncycastle.asn1.DERPrintableString |
transactionId
|
static int |
TYPE_PKCS10
|
static int |
TYPE_SPKAC
|
private String |
url
|
static int |
VERSION1
|
static int |
VERSION2
|
Constructor Summary | |
ScepClient()
|
Method Summary | |
static void |
debugOut(String str)
|
boolean |
Execute(String command)
|
String |
getBase64SignedEndEntityCertificate()
|
org.bouncycastle.asn1.x509.X509CertificateStructure |
getCaCert()
|
org.bouncycastle.asn1.x509.RSAPublicKeyStructure |
getCaPubKey()
Gets the caPubKey. |
URL |
getCertificate()
Getter for property certificate. |
org.bouncycastle.asn1.pkcs.CertificationRequest |
getCertReq()
Gets the certReq. |
org.bouncycastle.asn1.DERObject |
getCertReqEnvelope()
Gets the pkcsCertReqEnvelope. |
org.bouncycastle.asn1.DERObject |
getCertReqOrig()
Gets the certReqOrig |
org.bouncycastle.asn1.DERPrintableString |
getChallenge()
Gets the challenge. |
String |
getCommunityString()
Getter for property communityString. |
org.bouncycastle.asn1.pkcs.ContentInfo |
getPkiMessage()
Getter for property pkiMessage. |
org.bouncycastle.asn1.DEROctetString |
getProxyIdentification()
Getter for property proxyIdentification. |
String |
getRequest()
Getter for property request. |
org.bouncycastle.asn1.DERObject |
getRequestPayload()
Getter for property requestPayload. |
int |
getRequestType()
Gets the requestType. |
org.bouncycastle.asn1.DERObject |
getResponseFile()
Getter for property responseFile. |
org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure |
getScepPrivateKey()
Gets the scepPrivateKey. |
org.bouncycastle.asn1.x509.RSAPublicKeyStructure |
getScepPublicKey()
Gets the scepPublicKey. |
int |
getScepVersion()
Gets the scepVersion. |
SecureRandom |
getSecureRandom()
Gets the secureRandom. |
org.bouncycastle.asn1.x509.X509CertificateStructure |
getSignedEndEntityCertificate()
Getter for property signedEndEntityCertificate. |
StateData |
getStateData()
|
org.bouncycastle.asn1.x509.X509Name |
getSubject()
Getter for property subject. |
org.bouncycastle.asn1.x509.X509Name |
getSubjectScep()
Getter for property subjectScep. |
org.bouncycastle.asn1.DERPrintableString |
getTransactionId()
|
String |
getUrl()
Gets the url. |
boolean |
loadCA(String url)
|
private boolean |
loadCA(URL url)
Load CA Cert from URL |
void |
loadPrivateKey(URL url)
Load CA Certificate from File |
void |
loadPublicKey(URL url)
|
void |
loadRequest(URL url)
|
void |
loadResponseFile(String filename)
|
int |
post(org.bouncycastle.asn1.DERObject der,
String operation)
send DERObject to scep server (http req) |
void |
setCaCert(org.bouncycastle.asn1.x509.X509CertificateStructure caCert)
|
void |
setCaPubKey(org.bouncycastle.asn1.x509.RSAPublicKeyStructure caPubKey)
Sets the caPubKey. |
void |
setCertificate(URL certificate)
|
void |
setCertReq(org.bouncycastle.asn1.pkcs.CertificationRequest certReq)
Sets the certReq. |
void |
setCertReq(String certReq)
|
void |
setCertReqEnvelope(org.bouncycastle.asn1.DERObject envelope)
Sets the pkcsCertReqEnvelope. |
void |
setCertReqOrig(org.bouncycastle.asn1.DERObject certReqOrig)
Sets the certReqOrig. |
void |
setCertReqOrig(String certReqOrig)
|
void |
setChallenge(org.bouncycastle.asn1.DERPrintableString challenge)
Sets the challenge. |
void |
setChallenge(String challenge)
Sets the challenge. |
void |
setCommunityString(String communityString)
|
void |
setPkiMessage(org.bouncycastle.asn1.pkcs.ContentInfo pkiMessage)
|
void |
setProxyIdentification(org.bouncycastle.asn1.DEROctetString proxyIdentification)
Setter for property proxyIdentification. |
void |
setRequest(String request)
|
void |
setRequestPayload(org.bouncycastle.asn1.DERObject requestPayload)
|
void |
setRequestType(int requestType)
Sets the requestType. |
void |
setResponseFile(org.bouncycastle.asn1.DERObject responseFile)
Setter for property responseFile. |
void |
setScepPrivateKey(org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure scepPrivateKey)
Sets the scepPrivateKey. |
void |
setScepPublicKey(org.bouncycastle.asn1.x509.RSAPublicKeyStructure scepPublicKey)
Sets the scepPublicKey. |
void |
setScepVersion(int scepVersion)
Sets the scepVersion. |
void |
setSecureRandom(SecureRandom secureRandom)
Sets the secureRandom. |
void |
setSignedEndEntityCertificate(org.bouncycastle.asn1.x509.X509CertificateStructure signedEndEntityCertificate)
Setter for property signedEndEntityCertificate. |
void |
setStateData(StateData data)
|
void |
setSubject(String subject)
|
void |
setSubject(org.bouncycastle.asn1.x509.X509Name subject)
|
void |
setSubjectScep(String subject)
|
void |
setSubjectScep(org.bouncycastle.asn1.x509.X509Name subjectScep)
|
void |
setTransactionId(org.bouncycastle.asn1.DERPrintableString transId)
|
void |
setUrl(String url)
Sets the url. |
void |
storeCertificate(String filename)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final String COMMAND_PACKAGE
private org.bouncycastle.asn1.x509.X509CertificateStructure signedEndEntityCertificate
private org.bouncycastle.asn1.x509.X509CertificateStructure caCert
private String caUrl
private org.bouncycastle.asn1.x509.TBSCertificateStructure tbsCACert
private org.bouncycastle.asn1.DERObject pkcsCertReqEnvelope
private org.bouncycastle.asn1.DERPrintableString transactionId
private org.bouncycastle.asn1.DERPrintableString challenge
private org.bouncycastle.asn1.x509.RSAPublicKeyStructure caPubKey
private org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure scepPrivateKey
private org.bouncycastle.asn1.x509.RSAPublicKeyStructure scepPublicKey
private org.bouncycastle.asn1.pkcs.CertificationRequest certReq
private org.bouncycastle.asn1.DERObject proxyCertReq
private org.bouncycastle.asn1.DERObject certReqOrig
private org.bouncycastle.asn1.x509.X509Name subject
private String url
private String request
private org.bouncycastle.asn1.x509.X509Name subjectScep
private org.bouncycastle.asn1.DERObject requestPayload
private org.bouncycastle.asn1.DEROctetString proxyIdentification
private SecureRandom secureRandom
private org.bouncycastle.asn1.pkcs.ContentInfo pkiMessage
private org.bouncycastle.asn1.DERObject responseFile
private String communityString
org.bouncycastle.asn1.pkcs.SignedData pkcsCertReqSigned
org.bouncycastle.asn1.DERInteger serial
public static int TYPE_PKCS10
public static int TYPE_SPKAC
public static int VERSION1
public static int VERSION2
private int requestType
private int scepVersion
private URL certificate
private StateData lnkStateData
Constructor Detail |
public ScepClient()
Method Detail |
public void setCaCert(org.bouncycastle.asn1.x509.X509CertificateStructure caCert)
public org.bouncycastle.asn1.x509.X509CertificateStructure getCaCert()
public org.bouncycastle.asn1.DERObject getCertReqOrig()
public void setCertReqOrig(org.bouncycastle.asn1.DERObject certReqOrig)
certReqOrig
- The certReqOri to setpublic void setCertReqOrig(String certReqOrig)
public org.bouncycastle.asn1.pkcs.CertificationRequest getCertReq()
public void setCertReq(org.bouncycastle.asn1.pkcs.CertificationRequest certReq)
certReq
- The certReq to setpublic void setCertReq(String certReq)
public org.bouncycastle.asn1.DERObject getCertReqEnvelope()
public void setCertReqEnvelope(org.bouncycastle.asn1.DERObject envelope)
public void setTransactionId(org.bouncycastle.asn1.DERPrintableString transId)
public org.bouncycastle.asn1.DERPrintableString getTransactionId()
public org.bouncycastle.asn1.x509.RSAPublicKeyStructure getCaPubKey()
public void setCaPubKey(org.bouncycastle.asn1.x509.RSAPublicKeyStructure caPubKey)
caPubKey
- The caPubKey to setpublic org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure getScepPrivateKey()
public void setScepPrivateKey(org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure scepPrivateKey)
scepPrivateKey
- The scepPrivateKey to setpublic org.bouncycastle.asn1.x509.RSAPublicKeyStructure getScepPublicKey()
public void setScepPublicKey(org.bouncycastle.asn1.x509.RSAPublicKeyStructure scepPublicKey)
scepPublicKey
- The scepPublicKey to setpublic org.bouncycastle.asn1.DERPrintableString getChallenge()
public void setChallenge(org.bouncycastle.asn1.DERPrintableString challenge)
challenge
- The challenge to setpublic void setChallenge(String challenge)
challenge
- The challenge to setpublic String getUrl()
public void setUrl(String url)
url
- The url to setpublic SecureRandom getSecureRandom()
public void setSecureRandom(SecureRandom secureRandom)
secureRandom
- The secureRandom to setpublic void loadResponseFile(String filename) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public boolean loadCA(String url) throws IOException
IOException
private boolean loadCA(URL url) throws IOException
IOException
public int post(org.bouncycastle.asn1.DERObject der, String operation) throws IOException
IOException
public void loadPrivateKey(URL url) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public void loadPublicKey(URL url) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public void loadRequest(URL url) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public static void debugOut(String str)
public boolean Execute(String command) throws IOException, ScepError, ScepPending
IOException
ScepError
ScepPending
public org.bouncycastle.asn1.DERObject getResponseFile()
public void setResponseFile(org.bouncycastle.asn1.DERObject responseFile)
responseFile
- New value of property responseFile.public org.bouncycastle.asn1.x509.X509CertificateStructure getSignedEndEntityCertificate()
public String getBase64SignedEndEntityCertificate()
public void setSignedEndEntityCertificate(org.bouncycastle.asn1.x509.X509CertificateStructure signedEndEntityCertificate)
signedEndEntityCertificate
- New value of property signedEndEntityCertificate.public void storeCertificate(String filename) throws Exception
Exception
public org.bouncycastle.asn1.pkcs.ContentInfo getPkiMessage()
public void setPkiMessage(org.bouncycastle.asn1.pkcs.ContentInfo pkiMessage)
public String getRequest()
public void setRequest(String request)
public int getRequestType()
public void setRequestType(int requestType)
requestType
- The requestType to setpublic int getScepVersion()
public void setScepVersion(int scepVersion)
scepVersion
- The scepVersion to setpublic String getCommunityString()
public void setCommunityString(String communityString)
public org.bouncycastle.asn1.DERObject getRequestPayload()
public void setRequestPayload(org.bouncycastle.asn1.DERObject requestPayload)
public org.bouncycastle.asn1.DEROctetString getProxyIdentification()
public void setProxyIdentification(org.bouncycastle.asn1.DEROctetString proxyIdentification)
public org.bouncycastle.asn1.x509.X509Name getSubjectScep()
public void setSubjectScep(org.bouncycastle.asn1.x509.X509Name subjectScep)
public void setSubjectScep(String subject)
public org.bouncycastle.asn1.x509.X509Name getSubject()
public void setSubject(String subject)
public void setSubject(org.bouncycastle.asn1.x509.X509Name subject)
public StateData getStateData() throws ScepError
ScepError
public void setStateData(StateData data)
public URL getCertificate()
public void setCertificate(URL certificate)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |