re-merge libkeychain

This commit is contained in:
Vincent Breitmoser
2019-11-15 11:55:00 +01:00
parent d3e48db520
commit 864fbc95ea
37 changed files with 3 additions and 153 deletions

View File

@@ -0,0 +1,38 @@
/**
* Copyright (c) 2016 Vincent Breitmoser
*
* Licensed under the Bouncy Castle License (MIT license). See LICENSE file for details.
*/
package org.bouncycastle.openpgp.jcajce;
import java.io.IOException;
import java.io.InputStream;
import org.bouncycastle.openpgp.PGPMarker;
/** This class wraps the regular PGPObjectFactory, changing its behavior to
* ignore all PGPMarker packets it encounters while reading. These packets
* carry no semantics of their own, and should be ignored according to
* RFC 4880.
*
* @see https://tools.ietf.org/html/rfc4880#section-5.8
* @see org.bouncycastle.openpgp.PGPMarker
*
*/
public class JcaSkipMarkerPGPObjectFactory extends JcaPGPObjectFactory {
public JcaSkipMarkerPGPObjectFactory(InputStream in) {
super(in);
}
@Override
public Object nextObject() throws IOException {
Object o = super.nextObject();
while (o instanceof PGPMarker) {
o = super.nextObject();
}
return o;
}
}