您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

GPG signature verification via BouncyCastle Add a GpgSignatureVerifier interface, plus a factory to create instances thereof that is provided via the ServiceLoader mechanism. Implement the new interface for BouncyCastle. A verifier maintains an internal LRU cache of previously found public keys to speed up verifying multiple objects (tag or commits). Mergetags are not handled. Provide a new VerifySignatureCommand in org.eclipse.jgit.api together with a factory method Git.verifySignature(). The command can verify signatures on tags or commits, and can be limited to accept only tags or commits. Provide a new public WrongObjectTypeException thrown when the command is limited to either tags or commits and a name resolves to some other object kind. In jgit.pgm, implement "git tag -v", "git log --show-signature", and "git show --show-signature". The output is similar to command-line gpg invoked via git, but not identical. In particular, lines are not prefixed by "gpg:" but by "bc:". Trust levels for public keys are read from the keys' trust packets, not from GPG's internal trust database. A trust packet may or may not be set. Command-line GPG produces more warning lines depending on the trust level, warning about keys with a trust level below "full". There are no unit tests because JGit still doesn't have any setup to do signing unit tests; this would require at least a faked .gpg directory with pre-created key rings and keys, and a way to make the BouncyCastle classes use that directory instead of the default. See bug 547538 and also bug 544847. Tested manually with a small test repository containing signed and unsigned commits and tags, with signatures made with different keys and made by command-line git using GPG 2.2.25 and by JGit using BouncyCastle 1.65. Bug: 547751 Change-Id: If7e34aeed6ca6636a92bf774d893d98f6d459181 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 年前
GPG signature verification via BouncyCastle Add a GpgSignatureVerifier interface, plus a factory to create instances thereof that is provided via the ServiceLoader mechanism. Implement the new interface for BouncyCastle. A verifier maintains an internal LRU cache of previously found public keys to speed up verifying multiple objects (tag or commits). Mergetags are not handled. Provide a new VerifySignatureCommand in org.eclipse.jgit.api together with a factory method Git.verifySignature(). The command can verify signatures on tags or commits, and can be limited to accept only tags or commits. Provide a new public WrongObjectTypeException thrown when the command is limited to either tags or commits and a name resolves to some other object kind. In jgit.pgm, implement "git tag -v", "git log --show-signature", and "git show --show-signature". The output is similar to command-line gpg invoked via git, but not identical. In particular, lines are not prefixed by "gpg:" but by "bc:". Trust levels for public keys are read from the keys' trust packets, not from GPG's internal trust database. A trust packet may or may not be set. Command-line GPG produces more warning lines depending on the trust level, warning about keys with a trust level below "full". There are no unit tests because JGit still doesn't have any setup to do signing unit tests; this would require at least a faked .gpg directory with pre-created key rings and keys, and a way to make the BouncyCastle classes use that directory instead of the default. See bug 547538 and also bug 544847. Tested manually with a small test repository containing signed and unsigned commits and tags, with signatures made with different keys and made by command-line git using GPG 2.2.25 and by JGit using BouncyCastle 1.65. Bug: 547751 Change-Id: If7e34aeed6ca6636a92bf774d893d98f6d459181 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 年前
GPG signature verification via BouncyCastle Add a GpgSignatureVerifier interface, plus a factory to create instances thereof that is provided via the ServiceLoader mechanism. Implement the new interface for BouncyCastle. A verifier maintains an internal LRU cache of previously found public keys to speed up verifying multiple objects (tag or commits). Mergetags are not handled. Provide a new VerifySignatureCommand in org.eclipse.jgit.api together with a factory method Git.verifySignature(). The command can verify signatures on tags or commits, and can be limited to accept only tags or commits. Provide a new public WrongObjectTypeException thrown when the command is limited to either tags or commits and a name resolves to some other object kind. In jgit.pgm, implement "git tag -v", "git log --show-signature", and "git show --show-signature". The output is similar to command-line gpg invoked via git, but not identical. In particular, lines are not prefixed by "gpg:" but by "bc:". Trust levels for public keys are read from the keys' trust packets, not from GPG's internal trust database. A trust packet may or may not be set. Command-line GPG produces more warning lines depending on the trust level, warning about keys with a trust level below "full". There are no unit tests because JGit still doesn't have any setup to do signing unit tests; this would require at least a faked .gpg directory with pre-created key rings and keys, and a way to make the BouncyCastle classes use that directory instead of the default. See bug 547538 and also bug 544847. Tested manually with a small test repository containing signed and unsigned commits and tags, with signatures made with different keys and made by command-line git using GPG 2.2.25 and by JGit using BouncyCastle 1.65. Bug: 547751 Change-Id: If7e34aeed6ca6636a92bf774d893d98f6d459181 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 年前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright (C) 2018, 2021 Salesforce and others
  3. *
  4. * This program and the accompanying materials are made available under the
  5. * terms of the Eclipse Distribution License v. 1.0 which is available at
  6. * https://www.eclipse.org/org/documents/edl-v10.php.
  7. *
  8. * SPDX-License-Identifier: BSD-3-Clause
  9. */
  10. package org.eclipse.jgit.gpg.bc.internal;
  11. import org.eclipse.jgit.nls.NLS;
  12. import org.eclipse.jgit.nls.TranslationBundle;
  13. /**
  14. * Externalized text messages for localization.
  15. */
  16. public final class BCText extends TranslationBundle {
  17. /**
  18. * Get an instance of this translation bundle.
  19. *
  20. * @return an instance of this translation bundle
  21. */
  22. public static BCText get() {
  23. return NLS.getBundleFor(BCText.class);
  24. }
  25. // @formatter:off
  26. /***/ public String corrupt25519Key;
  27. /***/ public String credentialPassphrase;
  28. /***/ public String cryptCipherError;
  29. /***/ public String cryptWrongDecryptedLength;
  30. /***/ public String gpgFailedToParseSecretKey;
  31. /***/ public String gpgNoCredentialsProvider;
  32. /***/ public String gpgNoKeygrip;
  33. /***/ public String gpgNoKeyring;
  34. /***/ public String gpgNoKeyInLegacySecring;
  35. /***/ public String gpgNoPublicKeyFound;
  36. /***/ public String gpgNoSecretKeyForPublicKey;
  37. /***/ public String gpgNoSuchAlgorithm;
  38. /***/ public String gpgNotASigningKey;
  39. /***/ public String gpgKeyInfo;
  40. /***/ public String gpgSigningCancelled;
  41. /***/ public String nonSignatureError;
  42. /***/ public String secretKeyTooShort;
  43. /***/ public String sexprHexNotClosed;
  44. /***/ public String sexprHexOdd;
  45. /***/ public String sexprStringInvalidEscape;
  46. /***/ public String sexprStringInvalidEscapeAtEnd;
  47. /***/ public String sexprStringInvalidHexEscape;
  48. /***/ public String sexprStringInvalidOctalEscape;
  49. /***/ public String sexprStringNotClosed;
  50. /***/ public String sexprUnhandled;
  51. /***/ public String signatureInconsistent;
  52. /***/ public String signatureKeyLookupError;
  53. /***/ public String signatureNoKeyInfo;
  54. /***/ public String signatureNoPublicKey;
  55. /***/ public String signatureParseError;
  56. /***/ public String signatureVerificationError;
  57. /***/ public String unableToSignCommitNoSecretKey;
  58. /***/ public String uncompressed25519Key;
  59. /***/ public String unknownCurve;
  60. /***/ public String unknownCurveParameters;
  61. /***/ public String unknownKeyType;
  62. }