コード例 #1
0
 private static PKIMessage parseBytes(byte[] encoding) throws IOException {
   try {
     return PKIMessage.getInstance(ASN1Primitive.fromByteArray(encoding));
   } catch (ClassCastException e) {
     throw new CertIOException("malformed data: " + e.getMessage(), e);
   } catch (IllegalArgumentException e) {
     throw new CertIOException("malformed data: " + e.getMessage(), e);
   }
 }
コード例 #2
0
 /**
  * Return true if this message has protection bits on it. A return value of true indicates the
  * message can be used to construct a ProtectedPKIMessage.
  *
  * @return true if message has protection, false otherwise.
  */
 public boolean hasProtection() {
   return pkiMessage.getHeader().getProtectionAlg() != null;
 }
コード例 #3
0
 public PKIBody getBody() {
   return pkiMessage.getBody();
 }
コード例 #4
0
 public PKIHeader getHeader() {
   return pkiMessage.getHeader();
 }