|
|
@ -49,55 +49,33 @@ package org.eclipse.jgit.transport; |
|
|
|
* @since 4.0 |
|
|
|
* @since 4.0 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class PushCertificate { |
|
|
|
public class PushCertificate { |
|
|
|
|
|
|
|
/** The tuple "name <email>" as presented in the push certificate. */ |
|
|
|
/** The tuple "name <email>" as presented in the push certificate */ |
|
|
|
|
|
|
|
String pusher; |
|
|
|
String pusher; |
|
|
|
|
|
|
|
|
|
|
|
/** The remote URL the signed push goes to */ |
|
|
|
/** The remote URL the signed push goes to. */ |
|
|
|
String pushee; |
|
|
|
String pushee; |
|
|
|
|
|
|
|
|
|
|
|
/** What we think about the returned signed nonce */ |
|
|
|
/** What we think about the returned signed nonce. */ |
|
|
|
NonceStatus nonceStatus; |
|
|
|
NonceStatus nonceStatus; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** Verification result of the nonce returned during push. */ |
|
|
|
* |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public enum NonceStatus { |
|
|
|
public enum NonceStatus { |
|
|
|
/** |
|
|
|
/** Nonce was not expected, yet client sent one anyway. */ |
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
UNSOLICITED, |
|
|
|
UNSOLICITED, |
|
|
|
/** |
|
|
|
/** Nonce is invalid and did not match server's expectations. */ |
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
BAD, |
|
|
|
BAD, |
|
|
|
/** |
|
|
|
/** Nonce is required, but was not sent by client. */ |
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
MISSING, |
|
|
|
MISSING, |
|
|
|
/** |
|
|
|
/** Received nonce is valid. */ |
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
OK, |
|
|
|
OK, |
|
|
|
/** |
|
|
|
/** Received nonce is valid and within the accepted slop window. */ |
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
SLOP |
|
|
|
SLOP |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
String commandList; |
|
|
|
String commandList; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
String signature; |
|
|
|
String signature; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
|
|
|
|
* @return the signature, consisting of the lines received between the lines |
|
|
|
* @return the signature, consisting of the lines received between the lines |
|
|
|
* '----BEGIN GPG SIGNATURE-----\n' and the '----END GPG |
|
|
|
* '----BEGIN GPG SIGNATURE-----\n' and the '----END GPG |
|
|
|
* SIGNATURE-----\n' |
|
|
|
* SIGNATURE-----\n' |
|
|
@ -115,22 +93,19 @@ public class PushCertificate { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @return the pushedCertPusher |
|
|
|
* @return the tuple "name <email>" as presented by the client in the |
|
|
|
|
|
|
|
* push certificate. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public String getPusher() { |
|
|
|
public String getPusher() { |
|
|
|
return pusher; |
|
|
|
return pusher; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** @return URL of the repository the push was originally sent to. */ |
|
|
|
* @return the pushedCertPushee |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public String getPushee() { |
|
|
|
public String getPushee() { |
|
|
|
return pushee; |
|
|
|
return pushee; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** @return verification status of the nonce embedded in the certificate. */ |
|
|
|
* @return the pushCertNonceStatus |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public NonceStatus getNonceStatus() { |
|
|
|
public NonceStatus getNonceStatus() { |
|
|
|
return nonceStatus; |
|
|
|
return nonceStatus; |
|
|
|
} |
|
|
|
} |
|
|
|