Package org.eclipse.jgit.transport
Class PushCertificate
java.lang.Object
org.eclipse.jgit.transport.PushCertificate
The required information to verify the push.
A valid certificate will not return null from any getter methods; callers may assume that any null value indicates a missing or invalid certificate.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Verification result of the nonce returned during push. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<ReceiveCommand> private final String
private final PushCertificate.NonceStatus
private final String
private final PushCertificateIdent
private final String
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionPushCertificate
(String version, PushCertificateIdent pusher, String pushee, String nonce, PushCertificate.NonceStatus nonceStatus, List<ReceiveCommand> commands, String signature) -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
boolean
Get the list of commands as one string to be feed into the signature verifier.getNonce()
Get the raw nonce value that was presented by the pusher.Get verification status of the nonce embedded in the certificate.Get URL of the repository the push was originally sent to.Get the raw line that signed the cert, as a string.Get identity of the pusher who signed the cert.Get the raw signatureGet the certificate version string.int
hashCode()
toString()
private StringBuilder
toText()
Get text payload of the certificate for the signature verifier.Get original text payload plus signature
-
Field Details
-
version
-
pusher
-
pushee
-
nonce
-
nonceStatus
-
commands
-
signature
-
-
Constructor Details
-
PushCertificate
PushCertificate(String version, PushCertificateIdent pusher, String pushee, String nonce, PushCertificate.NonceStatus nonceStatus, List<ReceiveCommand> commands, String signature)
-
-
Method Details
-
getVersion
Get the certificate version string.- Returns:
- the certificate version string.
- Since:
- 4.1
-
getPusher
Get the raw line that signed the cert, as a string.- Returns:
- the raw line that signed the cert, as a string.
- Since:
- 4.0
-
getPusherIdent
Get identity of the pusher who signed the cert.- Returns:
- identity of the pusher who signed the cert.
- Since:
- 4.1
-
getPushee
Get URL of the repository the push was originally sent to.- Returns:
- URL of the repository the push was originally sent to.
- Since:
- 4.0
-
getNonce
Get the raw nonce value that was presented by the pusher.- Returns:
- the raw nonce value that was presented by the pusher.
- Since:
- 4.1
-
getNonceStatus
Get verification status of the nonce embedded in the certificate.- Returns:
- verification status of the nonce embedded in the certificate.
- Since:
- 4.0
-
getCommands
Get the list of commands as one string to be feed into the signature verifier.- Returns:
- the list of commands as one string to be feed into the signature verifier.
- Since:
- 4.1
-
getSignature
Get the raw signature- Returns:
- the raw signature, consisting of the lines received between the
lines
"----BEGIN GPG SIGNATURE-----\n"
and"----END GPG SIGNATURE-----\n
", inclusive. - Since:
- 4.0
-
toText
Get text payload of the certificate for the signature verifier.- Returns:
- text payload of the certificate for the signature verifier.
- Since:
- 4.1
-
toTextWithSignature
Get original text payload plus signature- Returns:
- original text payload plus signature; the final output will be
valid as input to
PushCertificateParser.fromString(String)
. - Since:
- 4.1
-
toStringBuilder
-
hashCode
public int hashCode() -
equals
-
commandsEqual
-
toString
-