示例#1
0
  /**
   * @param signerInformation {@code SignerInformation}
   * @return {@code DERTaggedObject} representing the signed attributes
   * @throws DSSException in case of a decoding problem
   */
  public static DERTaggedObject getSignedAttributes(final SignerInformation signerInformation)
      throws DSSException {

    try {
      final byte[] encodedSignedAttributes = signerInformation.getEncodedSignedAttributes();
      if (encodedSignedAttributes == null) {
        return null;
      }
      final ASN1Set asn1Set = DSSASN1Utils.toASN1Primitive(encodedSignedAttributes);
      return new DERTaggedObject(false, 0, asn1Set);
    } catch (IOException e) {
      throw new DSSException(e);
    }
  }
 public byte[] getEncodedSignedAttrs() throws IOException {
   return firstSignerInfo.getEncodedSignedAttributes();
 }