public class PushCertificate
extends java.lang.Object
A valid certificate will not return null from any getter methods; callers may assume that any null value indicates a missing or invalid certificate.
Modifier and Type | Class and Description |
---|---|
static class |
PushCertificate.NonceStatus
Verification result of the nonce returned during push.
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<ReceiveCommand> |
commands |
private java.lang.String |
nonce |
private PushCertificate.NonceStatus |
nonceStatus |
private java.lang.String |
pushee |
private PushCertificateIdent |
pusher |
private java.lang.String |
signature |
private java.lang.String |
version |
Constructor and Description |
---|
PushCertificate(java.lang.String version,
PushCertificateIdent pusher,
java.lang.String pushee,
java.lang.String nonce,
PushCertificate.NonceStatus nonceStatus,
java.util.List<ReceiveCommand> commands,
java.lang.String signature) |
Modifier and Type | Method and Description |
---|---|
private static boolean |
commandsEqual(PushCertificate c1,
PushCertificate c2) |
boolean |
equals(java.lang.Object o) |
java.util.List<ReceiveCommand> |
getCommands()
Get the list of commands as one string to be feed into the signature
verifier.
|
java.lang.String |
getNonce()
Get the raw nonce value that was presented by the pusher.
|
PushCertificate.NonceStatus |
getNonceStatus()
Get verification status of the nonce embedded in the certificate.
|
java.lang.String |
getPushee()
Get URL of the repository the push was originally sent to.
|
java.lang.String |
getPusher()
Get the raw line that signed the cert, as a string.
|
PushCertificateIdent |
getPusherIdent()
Get identity of the pusher who signed the cert.
|
java.lang.String |
getSignature()
Get the raw signature
|
java.lang.String |
getVersion()
Get the certificate version string.
|
int |
hashCode() |
java.lang.String |
toString() |
private java.lang.StringBuilder |
toStringBuilder() |
java.lang.String |
toText()
Get text payload of the certificate for the signature verifier.
|
java.lang.String |
toTextWithSignature()
Get original text payload plus signature
|
private final java.lang.String version
private final PushCertificateIdent pusher
private final java.lang.String pushee
private final java.lang.String nonce
private final PushCertificate.NonceStatus nonceStatus
private final java.util.List<ReceiveCommand> commands
private final java.lang.String signature
PushCertificate(java.lang.String version, PushCertificateIdent pusher, java.lang.String pushee, java.lang.String nonce, PushCertificate.NonceStatus nonceStatus, java.util.List<ReceiveCommand> commands, java.lang.String signature)
public java.lang.String getVersion()
public java.lang.String getPusher()
public PushCertificateIdent getPusherIdent()
public java.lang.String getPushee()
public java.lang.String getNonce()
public PushCertificate.NonceStatus getNonceStatus()
public java.util.List<ReceiveCommand> getCommands()
public java.lang.String getSignature()
"----BEGIN GPG SIGNATURE-----\n"
and
"----END GPG SIGNATURE-----\n
", inclusive.public java.lang.String toText()
public java.lang.String toTextWithSignature()
PushCertificateParser.fromString(String)
.private java.lang.StringBuilder toStringBuilder()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
private static boolean commandsEqual(PushCertificate c1, PushCertificate c2)
public java.lang.String toString()
toString
in class java.lang.Object