00001
00002
00003
00004
00005
00006
00007
00008
00009 package com.orionsec.jpkif;
00010
00011 public class CPKIFSignedData {
00012 private long swigCPtr;
00013 protected boolean swigCMemOwn;
00014
00015 public CPKIFSignedData(long cPtr, boolean cMemoryOwn) {
00016 swigCMemOwn = cMemoryOwn;
00017 swigCPtr = cPtr;
00018 }
00019
00020 public static long getCPtr(CPKIFSignedData 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) {
00030 if (swigCMemOwn) {
00031 swigCMemOwn = false;
00032 pkif_moduleJNI.delete_CPKIFSignedData(swigCPtr);
00033 }
00034 swigCPtr = 0;
00035 }
00036 }
00037
00038 public CPKIFSignedData() {
00039 this(pkif_moduleJNI.new_CPKIFSignedData(), true);
00040 }
00041
00042 public CPKIFSignedData.CMSVersion GetVersion() {
00043 return CPKIFSignedData.CMSVersion.swigToEnum(pkif_moduleJNI.CPKIFSignedData_GetVersion(swigCPtr, this));
00044 }
00045
00046 public void SetEncapsulatedContent(CPKIFEncapsulatedContentInfoPtr ecip) {
00047 pkif_moduleJNI.CPKIFSignedData_SetEncapsulatedContent(swigCPtr, this, CPKIFEncapsulatedContentInfoPtr.getCPtr(ecip), ecip);
00048 }
00049
00050 public CPKIFEncapsulatedContentInfoPtr GetEncapsulatedContent() {
00051 return new CPKIFEncapsulatedContentInfoPtr(pkif_moduleJNI.CPKIFSignedData_GetEncapsulatedContent(swigCPtr, this), true);
00052 }
00053
00054 public void UpdateMessage(byte[] buf, int bufLen) {
00055 pkif_moduleJNI.CPKIFSignedData_UpdateMessage(swigCPtr, this, buf, bufLen);
00056 }
00057
00058 public void AddCertificate(CPKIFCertificatePtr cert) {
00059 pkif_moduleJNI.CPKIFSignedData_AddCertificate(swigCPtr, this, CPKIFCertificatePtr.getCPtr(cert), cert);
00060 }
00061
00062 public void GetCertificates(CPKIFCertificateList certs) {
00063 pkif_moduleJNI.CPKIFSignedData_GetCertificates(swigCPtr, this, CPKIFCertificateList.getCPtr(certs), certs);
00064 }
00065
00066 public void AddCRL(CPKIFCRLPtr crl) {
00067 pkif_moduleJNI.CPKIFSignedData_AddCRL(swigCPtr, this, CPKIFCRLPtr.getCPtr(crl), crl);
00068 }
00069
00070 public void GetCRLs(CPKIFCRLList crls) {
00071 pkif_moduleJNI.CPKIFSignedData_GetCRLs(swigCPtr, this, CPKIFCRLList.getCPtr(crls), crls);
00072 }
00073
00074 public void AddSignerInfo(CPKIFSignerInfoPtr si) {
00075 pkif_moduleJNI.CPKIFSignedData_AddSignerInfo(swigCPtr, this, CPKIFSignerInfoPtr.getCPtr(si), si);
00076 }
00077
00078 public void GetSignerInfos(CPKIFSignerInfos sis) {
00079 pkif_moduleJNI.CPKIFSignedData_GetSignerInfos(swigCPtr, this, CPKIFSignerInfos.getCPtr(sis), sis);
00080 }
00081
00082 public CPKIFBufferPtr Encode() {
00083 return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFSignedData_Encode(swigCPtr, this), true);
00084 }
00085
00086 public void Decode(CPKIFBufferPtr buf) {
00087 pkif_moduleJNI.CPKIFSignedData_Decode(swigCPtr, this, CPKIFBufferPtr.getCPtr(buf), buf);
00088 }
00089
00090 public boolean Verify(int signerIndex, SWIGTYPE_p_CMSVerificationStatus status, CMSPathValidationStatus minStatus) {
00091 return pkif_moduleJNI.CPKIFSignedData_Verify__SWIG_0(swigCPtr, this, signerIndex, SWIGTYPE_p_CMSVerificationStatus.getCPtr(status), minStatus.swigValue());
00092 }
00093
00094 public boolean Verify(int signerIndex, SWIGTYPE_p_CMSVerificationStatus status) {
00095 return pkif_moduleJNI.CPKIFSignedData_Verify__SWIG_1(swigCPtr, this, signerIndex, SWIGTYPE_p_CMSVerificationStatus.getCPtr(status));
00096 }
00097
00098 public boolean Verify(int signerIndex, SWIGTYPE_p_CMSVerificationStatus status, CPKIFCertificatePtr signersCert, CMSPathValidationStatus minStatus) {
00099 return pkif_moduleJNI.CPKIFSignedData_Verify__SWIG_2(swigCPtr, this, signerIndex, SWIGTYPE_p_CMSVerificationStatus.getCPtr(status), CPKIFCertificatePtr.getCPtr(signersCert), signersCert, minStatus.swigValue());
00100 }
00101
00102 public boolean Verify(int signerIndex, SWIGTYPE_p_CMSVerificationStatus status, CPKIFCertificatePtr signersCert) {
00103 return pkif_moduleJNI.CPKIFSignedData_Verify__SWIG_3(swigCPtr, this, signerIndex, SWIGTYPE_p_CMSVerificationStatus.getCPtr(status), CPKIFCertificatePtr.getCPtr(signersCert), signersCert);
00104 }
00105
00106 public void SetKeyUsageChecker(CPKIFFuncStoragePtr kuChecker) {
00107 pkif_moduleJNI.CPKIFSignedData_SetKeyUsageChecker(swigCPtr, this, CPKIFFuncStoragePtr.getCPtr(kuChecker), kuChecker);
00108 }
00109
00110 public void SetPathSettings(CPKIFPathSettingsPtr settings) {
00111 pkif_moduleJNI.CPKIFSignedData_SetPathSettings(swigCPtr, this, CPKIFPathSettingsPtr.getCPtr(settings), settings);
00112 }
00113
00114 public CPKIFCertificatePathPtr GetPath() {
00115 return new CPKIFCertificatePathPtr(pkif_moduleJNI.CPKIFSignedData_GetPath(swigCPtr, this), true);
00116 }
00117
00118 public CPKIFPathValidationResultsPtr GetValidationResults() {
00119 return new CPKIFPathValidationResultsPtr(pkif_moduleJNI.CPKIFSignedData_GetValidationResults(swigCPtr, this), true);
00120 }
00121
00122 public void GetSignersCert(int signerIndex, CPKIFCertificatePtr cert) {
00123 pkif_moduleJNI.CPKIFSignedData_GetSignersCert__SWIG_0(swigCPtr, this, signerIndex, CPKIFCertificatePtr.getCPtr(cert), cert);
00124 }
00125
00126 public long GetNumberOfSigners() {
00127 return pkif_moduleJNI.CPKIFSignedData_GetNumberOfSigners(swigCPtr, this);
00128 }
00129
00130 public CPKIFSignerInfoPtr GetSignersInfo(int signerIndex) {
00131 return new CPKIFSignerInfoPtr(pkif_moduleJNI.CPKIFSignedData_GetSignersInfo(swigCPtr, this, signerIndex), true);
00132 }
00133
00134 public void ClearContent(boolean removeMediatorAssociations) {
00135 pkif_moduleJNI.CPKIFSignedData_ClearContent__SWIG_0(swigCPtr, this, removeMediatorAssociations);
00136 }
00137
00138 public void ClearContent() {
00139 pkif_moduleJNI.CPKIFSignedData_ClearContent__SWIG_1(swigCPtr, this);
00140 }
00141
00142 public CPKIFBufferPtr GetSignersCert(CPKIFBufferPtr tmpSignerInfoBuf) {
00143 return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFSignedData_GetSignersCert__SWIG_1(swigCPtr, this, CPKIFBufferPtr.getCPtr(tmpSignerInfoBuf), tmpSignerInfoBuf), true);
00144 }
00145
00146 public void AddMediator(IPKIFColleaguePtr m) {
00147 pkif_moduleJNI.CPKIFSignedData_AddMediator(swigCPtr, this, IPKIFColleaguePtr.getCPtr(m), m);
00148 }
00149
00150 public IPKIFColleaguePtr GetMediator() {
00151 return new IPKIFColleaguePtr(pkif_moduleJNI.CPKIFSignedData_GetMediator(swigCPtr, this), true);
00152 }
00153
00154 public final static class CMSVersion {
00155 public final static CMSVersion CMSv0 = new CMSVersion("CMSv0", pkif_moduleJNI.CPKIFSignedData_CMSv0_get());
00156 public final static CMSVersion CMSv1 = new CMSVersion("CMSv1", pkif_moduleJNI.CPKIFSignedData_CMSv1_get());
00157 public final static CMSVersion CMSv2 = new CMSVersion("CMSv2", pkif_moduleJNI.CPKIFSignedData_CMSv2_get());
00158 public final static CMSVersion CMSv3 = new CMSVersion("CMSv3", pkif_moduleJNI.CPKIFSignedData_CMSv3_get());
00159 public final static CMSVersion CMSv4 = new CMSVersion("CMSv4", pkif_moduleJNI.CPKIFSignedData_CMSv4_get());
00160
00161 public final int swigValue() {
00162 return swigValue;
00163 }
00164
00165 public String toString() {
00166 return swigName;
00167 }
00168
00169 public static CMSVersion swigToEnum(int swigValue) {
00170 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00171 return swigValues[swigValue];
00172 for (int i = 0; i < swigValues.length; i++)
00173 if (swigValues[i].swigValue == swigValue)
00174 return swigValues[i];
00175 throw new IllegalArgumentException("No enum " + CMSVersion.class + " with value " + swigValue);
00176 }
00177
00178 private CMSVersion(String swigName) {
00179 this.swigName = swigName;
00180 this.swigValue = swigNext++;
00181 }
00182
00183 private CMSVersion(String swigName, int swigValue) {
00184 this.swigName = swigName;
00185 this.swigValue = swigValue;
00186 swigNext = swigValue+1;
00187 }
00188
00189 private CMSVersion(String swigName, CMSVersion swigEnum) {
00190 this.swigName = swigName;
00191 this.swigValue = swigEnum.swigValue;
00192 swigNext = this.swigValue+1;
00193 }
00194
00195 private static CMSVersion[] swigValues = { CMSv0, CMSv1, CMSv2, CMSv3, CMSv4 };
00196 private static int swigNext = 0;
00197 private final int swigValue;
00198 private final String swigName;
00199 }
00200
00201 }