| 1 7 8 9 package org.enhydra.oyster.cms; 10 11 import org.enhydra.oyster.exception.SMIMEException; 12 import org.enhydra.oyster.der.DERClassContextSpecificPr; 13 14 15 35 public class SignedAttributes extends DERClassContextSpecificPr { 36 37 40 private int attributeIndicator = 0; 41 42 46 public SignedAttributes () throws SMIMEException 47 { 48 super(0, true); 49 } 50 51 57 public void addSignedAttribute (byte[] content0) throws SMIMEException { 58 super.addContent(content0); 59 attributeIndicator++; 60 } 61 62 69 public byte[] getSignedAttribute () throws SMIMEException { 70 if (attributeIndicator == 0) 71 throw new SMIMEException(this, 1025); 72 return super.getDEREncoded(); 73 } 74 } 75 76 77 78 | Popular Tags |