Back to index

nordugrid-arc-nox  1.1.0~rc6
Credential.java
Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 1.3.36
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package nordugrid.arc;
00010 
00011 public class Credential {
00012   private long swigCPtr;
00013   protected boolean swigCMemOwn;
00014 
00015   protected Credential(long cPtr, boolean cMemoryOwn) {
00016     swigCMemOwn = cMemoryOwn;
00017     swigCPtr = cPtr;
00018   }
00019 
00020   protected static long getCPtr(Credential obj) {
00021     return (obj == null) ? 0 : obj.swigCPtr;
00022   }
00023 
00024   protected void finalize() {
00025     delete();
00026   }
00027 
00028   public synchronized void delete() {
00029     if(swigCPtr != 0 && swigCMemOwn) {
00030       swigCMemOwn = false;
00031       arcJNI.delete_Credential(swigCPtr);
00032     }
00033     swigCPtr = 0;
00034   }
00035 
00036   public Credential() {
00037     this(arcJNI.new_Credential__SWIG_0(), true);
00038   }
00039 
00040   public Credential(int keybits) {
00041     this(arcJNI.new_Credential__SWIG_1(keybits), true);
00042   }
00043 
00044   public Credential(String CAfile, String CAkey, String CAserial, boolean CAcreateserial, String extfile, String extsect, String passphrase4key) {
00045     this(arcJNI.new_Credential__SWIG_2(CAfile, CAkey, CAserial, CAcreateserial, extfile, extsect, passphrase4key), true);
00046   }
00047 
00048   public Credential(String CAfile, String CAkey, String CAserial, boolean CAcreateserial, String extfile, String extsect) {
00049     this(arcJNI.new_Credential__SWIG_3(CAfile, CAkey, CAserial, CAcreateserial, extfile, extsect), true);
00050   }
00051 
00052   public Credential(Time start, Period lifetime, int keybits, String proxyversion, String policylang, String policy, int pathlength) {
00053     this(arcJNI.new_Credential__SWIG_4(Time.getCPtr(start), start, Period.getCPtr(lifetime), lifetime, keybits, proxyversion, policylang, policy, pathlength), true);
00054   }
00055 
00056   public Credential(Time start, Period lifetime, int keybits, String proxyversion, String policylang, String policy) {
00057     this(arcJNI.new_Credential__SWIG_5(Time.getCPtr(start), start, Period.getCPtr(lifetime), lifetime, keybits, proxyversion, policylang, policy), true);
00058   }
00059 
00060   public Credential(Time start, Period lifetime, int keybits, String proxyversion, String policylang) {
00061     this(arcJNI.new_Credential__SWIG_6(Time.getCPtr(start), start, Period.getCPtr(lifetime), lifetime, keybits, proxyversion, policylang), true);
00062   }
00063 
00064   public Credential(Time start, Period lifetime, int keybits, String proxyversion) {
00065     this(arcJNI.new_Credential__SWIG_7(Time.getCPtr(start), start, Period.getCPtr(lifetime), lifetime, keybits, proxyversion), true);
00066   }
00067 
00068   public Credential(Time start, Period lifetime, int keybits) {
00069     this(arcJNI.new_Credential__SWIG_8(Time.getCPtr(start), start, Period.getCPtr(lifetime), lifetime, keybits), true);
00070   }
00071 
00072   public Credential(Time start, Period lifetime) {
00073     this(arcJNI.new_Credential__SWIG_9(Time.getCPtr(start), start, Period.getCPtr(lifetime), lifetime), true);
00074   }
00075 
00076   public Credential(Time start) {
00077     this(arcJNI.new_Credential__SWIG_10(Time.getCPtr(start), start), true);
00078   }
00079 
00080   public Credential(String cert, String key, String cadir, String cafile, String passphrase4key, boolean is_file) {
00081     this(arcJNI.new_Credential__SWIG_11(cert, key, cadir, cafile, passphrase4key, is_file), true);
00082   }
00083 
00084   public Credential(String cert, String key, String cadir, String cafile, String passphrase4key) {
00085     this(arcJNI.new_Credential__SWIG_12(cert, key, cadir, cafile, passphrase4key), true);
00086   }
00087 
00088   public Credential(String cert, String key, String cadir, String cafile) {
00089     this(arcJNI.new_Credential__SWIG_13(cert, key, cadir, cafile), true);
00090   }
00091 
00092   public static void InitProxyCertInfo() {
00093     arcJNI.Credential_InitProxyCertInfo();
00094   }
00095 
00096   public static boolean IsCredentialsValid(UserConfig usercfg) {
00097     return arcJNI.Credential_IsCredentialsValid(UserConfig.getCPtr(usercfg), usercfg);
00098   }
00099 
00100   public void AddCertExtObj(SWIGTYPE_p_std__string sn, SWIGTYPE_p_std__string oid) {
00101     arcJNI.Credential_AddCertExtObj(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(sn), SWIGTYPE_p_std__string.getCPtr(oid));
00102   }
00103 
00104   public void LogError() {
00105     arcJNI.Credential_LogError(swigCPtr, this);
00106   }
00107 
00108   public boolean GetVerification() {
00109     return arcJNI.Credential_GetVerification(swigCPtr, this);
00110   }
00111 
00112   public SWIGTYPE_p_EVP_PKEY GetPrivKey() {
00113     long cPtr = arcJNI.Credential_GetPrivKey(swigCPtr, this);
00114     return (cPtr == 0) ? null : new SWIGTYPE_p_EVP_PKEY(cPtr, false);
00115   }
00116 
00117   public SWIGTYPE_p_EVP_PKEY GetPubKey() {
00118     long cPtr = arcJNI.Credential_GetPubKey(swigCPtr, this);
00119     return (cPtr == 0) ? null : new SWIGTYPE_p_EVP_PKEY(cPtr, false);
00120   }
00121 
00122   public SWIGTYPE_p_X509 GetCert() {
00123     long cPtr = arcJNI.Credential_GetCert(swigCPtr, this);
00124     return (cPtr == 0) ? null : new SWIGTYPE_p_X509(cPtr, false);
00125   }
00126 
00127   public SWIGTYPE_p_X509_REQ GetCertReq() {
00128     long cPtr = arcJNI.Credential_GetCertReq(swigCPtr, this);
00129     return (cPtr == 0) ? null : new SWIGTYPE_p_X509_REQ(cPtr, false);
00130   }
00131 
00132   public SWIGTYPE_p_void GetCertChain() {
00133     long cPtr = arcJNI.Credential_GetCertChain(swigCPtr, this);
00134     return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
00135   }
00136 
00137   public int GetCertNumofChain() {
00138     return arcJNI.Credential_GetCertNumofChain(swigCPtr, this);
00139   }
00140 
00141   public Credformat getFormat(SWIGTYPE_p_BIO in, boolean is_file) {
00142     return Credformat.swigToEnum(arcJNI.Credential_getFormat__SWIG_0(swigCPtr, this, SWIGTYPE_p_BIO.getCPtr(in), is_file));
00143   }
00144 
00145   public Credformat getFormat(SWIGTYPE_p_BIO in) {
00146     return Credformat.swigToEnum(arcJNI.Credential_getFormat__SWIG_1(swigCPtr, this, SWIGTYPE_p_BIO.getCPtr(in)));
00147   }
00148 
00149   public String GetDN() {
00150     return arcJNI.Credential_GetDN(swigCPtr, this);
00151   }
00152 
00153   public String GetIdentityName() {
00154     return arcJNI.Credential_GetIdentityName(swigCPtr, this);
00155   }
00156 
00157   public SWIGTYPE_p_ArcCredential__certType GetType() {
00158     return new SWIGTYPE_p_ArcCredential__certType(arcJNI.Credential_GetType(swigCPtr, this), true);
00159   }
00160 
00161   public String GetProxyPolicy() {
00162     return arcJNI.Credential_GetProxyPolicy(swigCPtr, this);
00163   }
00164 
00165   public void SetProxyPolicy(String proxyversion, String policylang, String policy, int pathlength) {
00166     arcJNI.Credential_SetProxyPolicy(swigCPtr, this, proxyversion, policylang, policy, pathlength);
00167   }
00168 
00169   public boolean OutputPrivatekey(SWIGTYPE_p_std__string content, boolean encryption, String passphrase) {
00170     return arcJNI.Credential_OutputPrivatekey__SWIG_0(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content), encryption, passphrase);
00171   }
00172 
00173   public boolean OutputPrivatekey(SWIGTYPE_p_std__string content, boolean encryption) {
00174     return arcJNI.Credential_OutputPrivatekey__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content), encryption);
00175   }
00176 
00177   public boolean OutputPrivatekey(SWIGTYPE_p_std__string content) {
00178     return arcJNI.Credential_OutputPrivatekey__SWIG_2(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content));
00179   }
00180 
00181   public boolean OutputPublickey(SWIGTYPE_p_std__string content) {
00182     return arcJNI.Credential_OutputPublickey(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content));
00183   }
00184 
00185   public boolean OutputCertificate(SWIGTYPE_p_std__string content, boolean is_der) {
00186     return arcJNI.Credential_OutputCertificate__SWIG_0(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content), is_der);
00187   }
00188 
00189   public boolean OutputCertificate(SWIGTYPE_p_std__string content) {
00190     return arcJNI.Credential_OutputCertificate__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content));
00191   }
00192 
00193   public boolean OutputCertificateChain(SWIGTYPE_p_std__string content, boolean is_der) {
00194     return arcJNI.Credential_OutputCertificateChain__SWIG_0(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content), is_der);
00195   }
00196 
00197   public boolean OutputCertificateChain(SWIGTYPE_p_std__string content) {
00198     return arcJNI.Credential_OutputCertificateChain__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content));
00199   }
00200 
00201   public Period GetLifeTime() {
00202     return new Period(arcJNI.Credential_GetLifeTime(swigCPtr, this), true);
00203   }
00204 
00205   public Time GetStartTime() {
00206     return new Time(arcJNI.Credential_GetStartTime(swigCPtr, this), true);
00207   }
00208 
00209   public Time GetEndTime() {
00210     return new Time(arcJNI.Credential_GetEndTime(swigCPtr, this), true);
00211   }
00212 
00213   public void SetLifeTime(Period period) {
00214     arcJNI.Credential_SetLifeTime(swigCPtr, this, Period.getCPtr(period), period);
00215   }
00216 
00217   public void SetStartTime(Time start_time) {
00218     arcJNI.Credential_SetStartTime(swigCPtr, this, Time.getCPtr(start_time), start_time);
00219   }
00220 
00221   public boolean AddExtension(String name, String data, boolean crit) {
00222     return arcJNI.Credential_AddExtension__SWIG_0(swigCPtr, this, name, data, crit);
00223   }
00224 
00225   public boolean AddExtension(String name, String data) {
00226     return arcJNI.Credential_AddExtension__SWIG_1(swigCPtr, this, name, data);
00227   }
00228 
00229   public boolean AddExtension(String name, SWIGTYPE_p_p_char binary, boolean crit) {
00230     return arcJNI.Credential_AddExtension__SWIG_2(swigCPtr, this, name, SWIGTYPE_p_p_char.getCPtr(binary), crit);
00231   }
00232 
00233   public boolean AddExtension(String name, SWIGTYPE_p_p_char binary) {
00234     return arcJNI.Credential_AddExtension__SWIG_3(swigCPtr, this, name, SWIGTYPE_p_p_char.getCPtr(binary));
00235   }
00236 
00237   public boolean GenerateEECRequest(SWIGTYPE_p_BIO reqbio, SWIGTYPE_p_BIO keybio, String dn) {
00238     return arcJNI.Credential_GenerateEECRequest__SWIG_0(swigCPtr, this, SWIGTYPE_p_BIO.getCPtr(reqbio), SWIGTYPE_p_BIO.getCPtr(keybio), dn);
00239   }
00240 
00241   public boolean GenerateEECRequest(SWIGTYPE_p_BIO reqbio, SWIGTYPE_p_BIO keybio) {
00242     return arcJNI.Credential_GenerateEECRequest__SWIG_1(swigCPtr, this, SWIGTYPE_p_BIO.getCPtr(reqbio), SWIGTYPE_p_BIO.getCPtr(keybio));
00243   }
00244 
00245   public boolean GenerateEECRequest(SWIGTYPE_p_std__string reqcontent, SWIGTYPE_p_std__string keycontent, String dn) {
00246     return arcJNI.Credential_GenerateEECRequest__SWIG_2(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(reqcontent), SWIGTYPE_p_std__string.getCPtr(keycontent), dn);
00247   }
00248 
00249   public boolean GenerateEECRequest(SWIGTYPE_p_std__string reqcontent, SWIGTYPE_p_std__string keycontent) {
00250     return arcJNI.Credential_GenerateEECRequest__SWIG_3(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(reqcontent), SWIGTYPE_p_std__string.getCPtr(keycontent));
00251   }
00252 
00253   public boolean GenerateEECRequest(String request_filename, String key_filename, String dn) {
00254     return arcJNI.Credential_GenerateEECRequest__SWIG_4(swigCPtr, this, request_filename, key_filename, dn);
00255   }
00256 
00257   public boolean GenerateEECRequest(String request_filename, String key_filename) {
00258     return arcJNI.Credential_GenerateEECRequest__SWIG_5(swigCPtr, this, request_filename, key_filename);
00259   }
00260 
00261   public boolean GenerateRequest(SWIGTYPE_p_BIO bio, boolean if_der) {
00262     return arcJNI.Credential_GenerateRequest__SWIG_0(swigCPtr, this, SWIGTYPE_p_BIO.getCPtr(bio), if_der);
00263   }
00264 
00265   public boolean GenerateRequest(SWIGTYPE_p_BIO bio) {
00266     return arcJNI.Credential_GenerateRequest__SWIG_1(swigCPtr, this, SWIGTYPE_p_BIO.getCPtr(bio));
00267   }
00268 
00269   public boolean GenerateRequest(SWIGTYPE_p_std__string content, boolean if_der) {
00270     return arcJNI.Credential_GenerateRequest__SWIG_2(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content), if_der);
00271   }
00272 
00273   public boolean GenerateRequest(SWIGTYPE_p_std__string content) {
00274     return arcJNI.Credential_GenerateRequest__SWIG_3(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content));
00275   }
00276 
00277   public boolean GenerateRequest(String filename, boolean if_der) {
00278     return arcJNI.Credential_GenerateRequest__SWIG_4(swigCPtr, this, filename, if_der);
00279   }
00280 
00281   public boolean GenerateRequest(String filename) {
00282     return arcJNI.Credential_GenerateRequest__SWIG_5(swigCPtr, this, filename);
00283   }
00284 
00285   public boolean InquireRequest(SWIGTYPE_p_BIO reqbio, boolean if_eec, boolean if_der) {
00286     return arcJNI.Credential_InquireRequest__SWIG_0(swigCPtr, this, SWIGTYPE_p_BIO.getCPtr(reqbio), if_eec, if_der);
00287   }
00288 
00289   public boolean InquireRequest(SWIGTYPE_p_BIO reqbio, boolean if_eec) {
00290     return arcJNI.Credential_InquireRequest__SWIG_1(swigCPtr, this, SWIGTYPE_p_BIO.getCPtr(reqbio), if_eec);
00291   }
00292 
00293   public boolean InquireRequest(SWIGTYPE_p_BIO reqbio) {
00294     return arcJNI.Credential_InquireRequest__SWIG_2(swigCPtr, this, SWIGTYPE_p_BIO.getCPtr(reqbio));
00295   }
00296 
00297   public boolean InquireRequest(SWIGTYPE_p_std__string content, boolean if_eec, boolean if_der) {
00298     return arcJNI.Credential_InquireRequest__SWIG_3(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content), if_eec, if_der);
00299   }
00300 
00301   public boolean InquireRequest(SWIGTYPE_p_std__string content, boolean if_eec) {
00302     return arcJNI.Credential_InquireRequest__SWIG_4(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content), if_eec);
00303   }
00304 
00305   public boolean InquireRequest(SWIGTYPE_p_std__string content) {
00306     return arcJNI.Credential_InquireRequest__SWIG_5(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(content));
00307   }
00308 
00309   public boolean InquireRequest(String filename, boolean if_eec, boolean if_der) {
00310     return arcJNI.Credential_InquireRequest__SWIG_6(swigCPtr, this, filename, if_eec, if_der);
00311   }
00312 
00313   public boolean InquireRequest(String filename, boolean if_eec) {
00314     return arcJNI.Credential_InquireRequest__SWIG_7(swigCPtr, this, filename, if_eec);
00315   }
00316 
00317   public boolean InquireRequest(String filename) {
00318     return arcJNI.Credential_InquireRequest__SWIG_8(swigCPtr, this, filename);
00319   }
00320 
00321   public boolean SignRequest(Credential proxy, SWIGTYPE_p_BIO outputbio, boolean if_der) {
00322     return arcJNI.Credential_SignRequest__SWIG_0(swigCPtr, this, Credential.getCPtr(proxy), proxy, SWIGTYPE_p_BIO.getCPtr(outputbio), if_der);
00323   }
00324 
00325   public boolean SignRequest(Credential proxy, SWIGTYPE_p_BIO outputbio) {
00326     return arcJNI.Credential_SignRequest__SWIG_1(swigCPtr, this, Credential.getCPtr(proxy), proxy, SWIGTYPE_p_BIO.getCPtr(outputbio));
00327   }
00328 
00329   public boolean SignRequest(Credential proxy, SWIGTYPE_p_std__string content, boolean if_der) {
00330     return arcJNI.Credential_SignRequest__SWIG_2(swigCPtr, this, Credential.getCPtr(proxy), proxy, SWIGTYPE_p_std__string.getCPtr(content), if_der);
00331   }
00332 
00333   public boolean SignRequest(Credential proxy, SWIGTYPE_p_std__string content) {
00334     return arcJNI.Credential_SignRequest__SWIG_3(swigCPtr, this, Credential.getCPtr(proxy), proxy, SWIGTYPE_p_std__string.getCPtr(content));
00335   }
00336 
00337   public boolean SignRequest(Credential proxy, String filename, boolean foamat) {
00338     return arcJNI.Credential_SignRequest__SWIG_4(swigCPtr, this, Credential.getCPtr(proxy), proxy, filename, foamat);
00339   }
00340 
00341   public boolean SignRequest(Credential proxy, String filename) {
00342     return arcJNI.Credential_SignRequest__SWIG_5(swigCPtr, this, Credential.getCPtr(proxy), proxy, filename);
00343   }
00344 
00345   public boolean SignEECRequest(Credential eec, String DN, SWIGTYPE_p_BIO outputbio) {
00346     return arcJNI.Credential_SignEECRequest__SWIG_0(swigCPtr, this, Credential.getCPtr(eec), eec, DN, SWIGTYPE_p_BIO.getCPtr(outputbio));
00347   }
00348 
00349   public boolean SignEECRequest(Credential eec, String DN, SWIGTYPE_p_std__string content) {
00350     return arcJNI.Credential_SignEECRequest__SWIG_1(swigCPtr, this, Credential.getCPtr(eec), eec, DN, SWIGTYPE_p_std__string.getCPtr(content));
00351   }
00352 
00353   public boolean SignEECRequest(Credential eec, String DN, String filename) {
00354     return arcJNI.Credential_SignEECRequest__SWIG_2(swigCPtr, this, Credential.getCPtr(eec), eec, DN, filename);
00355   }
00356 
00357 }