PageRenderTime 106ms CodeModel.GetById 2ms RepoModel.GetById 0ms app.codeStats 1ms

/projects/jruby-1.7.3/src/org/jruby/ext/openssl/impl/SignEnvelope.java

https://gitlab.com/essere.lab.public/qualitas.class-corpus
Java | 200 lines | 59 code | 22 blank | 119 comment | 0 complexity | e32c389e9ffa36bb95174ebd3a9f02cd MD5 | raw file
  1. /***** BEGIN LICENSE BLOCK *****
  2. * Version: EPL 1.0/GPL 2.0/LGPL 2.1
  3. *
  4. * The contents of this file are subject to the Common Public
  5. * License Version 1.0 (the "License"); you may not use this file
  6. * except in compliance with the License. You may obtain a copy of
  7. * the License at http://www.eclipse.org/legal/cpl-v10.html
  8. *
  9. * Software distributed under the License is distributed on an "AS
  10. * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  11. * implied. See the License for the specific language governing
  12. * rights and limitations under the License.
  13. *
  14. * Copyright (C) 2008 Ola Bini <ola.bini@gmail.com>
  15. *
  16. * Alternatively, the contents of this file may be used under the terms of
  17. * either of the GNU General Public License Version 2 or later (the "GPL"),
  18. * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  19. * in which case the provisions of the GPL or the LGPL are applicable instead
  20. * of those above. If you wish to allow use of your version of this file only
  21. * under the terms of either the GPL or the LGPL, and not to allow others to
  22. * use your version of this file under the terms of the EPL, indicate your
  23. * decision by deleting the provisions above and replace them with the notice
  24. * and other provisions required by the GPL or the LGPL. If you do not delete
  25. * the provisions above, a recipient may use your version of this file under
  26. * the terms of any one of the EPL, the GPL or the LGPL.
  27. ***** END LICENSE BLOCK *****/
  28. package org.jruby.ext.openssl.impl;
  29. import java.security.cert.X509CRL;
  30. import java.util.ArrayList;
  31. import java.util.Collection;
  32. import java.util.HashSet;
  33. import java.util.Set;
  34. import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
  35. import org.jruby.ext.openssl.x509store.X509AuxCertificate;
  36. /** PKCS7_SIGN_ENVELOPE
  37. *
  38. * @author <a href="mailto:ola.bini@gmail.com">Ola Bini</a>
  39. */
  40. public class SignEnvelope {
  41. private int version;
  42. /**
  43. * Describe encContent here.
  44. */
  45. private EncContent encData = new EncContent();
  46. /**
  47. * Describe crl here.
  48. */
  49. private Collection<X509CRL> crl = new ArrayList<X509CRL>();
  50. /**
  51. * Describe cert here.
  52. */
  53. private Collection<X509AuxCertificate> cert = new ArrayList<X509AuxCertificate>();
  54. /**
  55. * Describe mdAlgs here.
  56. */
  57. private Set<AlgorithmIdentifier> mdAlgs = new HashSet<AlgorithmIdentifier>();
  58. /**
  59. * Describe signerInfo here.
  60. */
  61. private Collection<SignerInfoWithPkey> signerInfo = new ArrayList<SignerInfoWithPkey>();
  62. /**
  63. * Describe recipientInfo here.
  64. */
  65. private Collection<RecipInfo> recipientInfo = new ArrayList<RecipInfo>();
  66. /**
  67. * Get the <code>Version</code> value.
  68. *
  69. * @return an <code>int</code> value
  70. */
  71. public final int getVersion() {
  72. return version;
  73. }
  74. /**
  75. * Set the <code>Version</code> value.
  76. *
  77. * @param newVersion The new Version value.
  78. */
  79. public final void setVersion(final int newVersion) {
  80. this.version = newVersion;
  81. }
  82. /**
  83. * Get the <code>EncData</code> value.
  84. *
  85. * @return an <code>EncContent</code> value
  86. */
  87. public final EncContent getEncData() {
  88. return encData;
  89. }
  90. /**
  91. * Set the <code>EncData</code> value.
  92. *
  93. * @param newEncContent The new EncContent value.
  94. */
  95. public final void setEncData(final EncContent newEncData) {
  96. this.encData = newEncData;
  97. }
  98. /**
  99. * Get the <code>RecipientInfo</code> value.
  100. *
  101. * @return a <code>Collection<RecipInfo></code> value
  102. */
  103. public final Collection<RecipInfo> getRecipientInfo() {
  104. return recipientInfo;
  105. }
  106. /**
  107. * Set the <code>RecipientInfo</code> value.
  108. *
  109. * @param newRecipientInfo The new RecipientInfo value.
  110. */
  111. public final void setRecipientInfo(final Collection<RecipInfo> newRecipientInfo) {
  112. this.recipientInfo = newRecipientInfo;
  113. }
  114. /**
  115. * Get the <code>SignerInfoWithPkey</code> value.
  116. *
  117. * @return a <code>Collection<SignerInfoWithPkey></code> value
  118. */
  119. public final Collection<SignerInfoWithPkey> getSignerInfo() {
  120. return signerInfo;
  121. }
  122. /**
  123. * Set the <code>SignerInfoWithPkey</code> value.
  124. *
  125. * @param newSignerInfo The new SignerInfo value.
  126. */
  127. public final void setSignerInfo(final Collection<SignerInfoWithPkey> newSignerInfo) {
  128. this.signerInfo = newSignerInfo;
  129. }
  130. /**
  131. * Get the <code>MdAlgs</code> value.
  132. *
  133. * @return a <code>Set<AlgorithmIdentifier></code> value
  134. */
  135. public final Set<AlgorithmIdentifier> getMdAlgs() {
  136. return mdAlgs;
  137. }
  138. /**
  139. * Set the <code>MdAlgs</code> value.
  140. *
  141. * @param newMdAlgs The new MdAlgs value.
  142. */
  143. public final void setMdAlgs(final Set<AlgorithmIdentifier> newMdAlgs) {
  144. this.mdAlgs = newMdAlgs;
  145. }
  146. /**
  147. * Get the <code>Cert</code> value.
  148. *
  149. * @return a <code>Collection<X509AuxCertificate></code> value
  150. */
  151. public final Collection<X509AuxCertificate> getCert() {
  152. return cert;
  153. }
  154. /**
  155. * Set the <code>Cert</code> value.
  156. *
  157. * @param newCert The new Cert value.
  158. */
  159. public final void setCert(final Collection<X509AuxCertificate> newCert) {
  160. this.cert = newCert;
  161. }
  162. /**
  163. * Get the <code>Crl</code> value.
  164. *
  165. * @return a <code>Collection<X509CRL></code> value
  166. */
  167. public final Collection<X509CRL> getCrl() {
  168. return crl;
  169. }
  170. /**
  171. * Set the <code>Crl</code> value.
  172. *
  173. * @param newCrl The new Crl value.
  174. */
  175. public final void setCrl(final Collection<X509CRL> newCrl) {
  176. this.crl = newCrl;
  177. }
  178. }// SignEnvelope