List of usage examples for org.eclipse.jgit.transport PushCertificate getSignature
public String getSignature()
From source file:com.google.gerrit.gpg.PushCertificateChecker.java
License:Apache License
private PGPSignature readSignature(PushCertificate cert) throws IOException { ArmoredInputStream in = new ArmoredInputStream( new ByteArrayInputStream(Constants.encode(cert.getSignature()))); PGPObjectFactory factory = new BcPGPObjectFactory(in); Object obj;//from w w w. ja v a 2s . c om while ((obj = factory.nextObject()) != null) { if (obj instanceof PGPSignatureList) { PGPSignatureList sigs = (PGPSignatureList) obj; if (!sigs.isEmpty()) { return sigs.get(0); } } } return null; }