Skip to content

Commit 2c18f0a

Browse files
authored
Merge branch 'master' into patch-2
2 parents 40a6d82 + b84331a commit 2c18f0a

34 files changed

Lines changed: 2112 additions & 8 deletions

.github/labeler.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
dependencies:
2+
- changed-files:
3+
- any-glob-to-any-file:
4+
- 'build.gradle'
5+
- 'build-publishing.gradle'
6+
- 'settings.gradle'
7+
- 'gradle/**'
8+
- 'mise.toml'
9+
- 'gradlew'
10+
- 'gradlew.bat'
11+
12+
infrastructure:
13+
- changed-files:
14+
- any-glob-to-any-file:
15+
- '.github/**'
16+
17+
documentation:
18+
- changed-files:
19+
- any-glob-to-any-file:
20+
- 'README.adoc'
21+
- 'CONTRIBUTORS'
22+
- 'NOTICE'
23+
- 'LICENSE'
24+
- 'LICENSE_HEADER'
25+
- 'examples/**'

.github/release-drafter.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name-template: 'SSHJ $RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
4+
categories:
5+
- title: '🔒 Security'
6+
labels:
7+
- 'security'
8+
- title: '🐛 Bug Fixes'
9+
labels:
10+
- 'bug'
11+
- 'fix'
12+
- title: '✨ New Features'
13+
labels:
14+
- 'enhancement'
15+
- 'feature'
16+
- title: '📦 Dependency Updates'
17+
labels:
18+
- 'dependencies'
19+
- 'dependency-upgrade'
20+
- title: '🔨 Improvements'
21+
labels:
22+
- 'improvement'
23+
- 'refactoring'
24+
- 'cleanup'
25+
- title: '📝 Documentation'
26+
labels:
27+
- 'documentation'
28+
- title: '🏗️ Infrastructure'
29+
labels:
30+
- 'ci'
31+
- 'build'
32+
- 'infrastructure'
33+
34+
change-template: '* $TITLE (#$NUMBER) @$AUTHOR'
35+
change-title-escapes: '\<*_&'
36+
37+
version-resolver:
38+
major:
39+
labels:
40+
- 'major'
41+
minor:
42+
labels:
43+
- 'minor'
44+
- 'enhancement'
45+
- 'feature'
46+
patch:
47+
labels:
48+
- 'patch'
49+
- 'bug'
50+
- 'fix'
51+
- 'security'
52+
- 'dependencies'
53+
default: minor
54+
55+
template: |
56+
## Changes
57+
58+
$CHANGES
59+
60+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

.github/workflows/labeler.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Labeler
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
label-by-files:
13+
name: Label by changed files
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/labeler@v5
17+
with:
18+
repo-token: ${{ secrets.GITHUB_TOKEN }}
19+
sync-labels: false
20+
21+
label-by-title:
22+
name: Label by PR title
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/github-script@v7
26+
with:
27+
script: |
28+
const title = context.payload.pull_request.title.toLowerCase();
29+
30+
const rules = [
31+
{ label: 'security', re: /\b(cve|security|vulnerability|exploit|terrapin)\b/ },
32+
{ label: 'bug', re: /\b(fix(es|ed|ing)?|bug|regression|broken|crash)\b/ },
33+
{ label: 'enhancement', re: /\b(add(s|ed|ing)?|support(s|ed|ing)?|implement(s|ed)?|feature)\b/ },
34+
{ label: 'dependencies', re: /\b(upgrad(e|es|ed|ing)|bump(s|ed)?|depend(ency|encies))\b/ },
35+
{ label: 'improvement', re: /\b(refactor(ed|ing)?|clean(up)?|improv(e|es|ed|ing)|remov(e|es|ed|ing)|replac(e|es|ed|ing))\b/ },
36+
];
37+
38+
const toAdd = rules.filter(r => r.re.test(title)).map(r => r.label);
39+
if (toAdd.length === 0) return;
40+
41+
await github.rest.issues.addLabels({
42+
owner: context.repo.owner,
43+
repo: context.repo.repo,
44+
issue_number: context.payload.pull_request.number,
45+
labels: toAdd,
46+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, reopened, synchronize]
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
update_release_draft:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: release-drafter/release-drafter@v6
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,10 @@ jobs:
4747
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNINGPASSWORD }}
4848
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
4949
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
50+
- name: Publish GitHub Release
51+
uses: release-drafter/release-drafter@v6
52+
with:
53+
publish: true
54+
tag: ${{ github.ref_name }}
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.adoc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ In the `examples` directory, there is a separate Maven project that shows how th
5757

5858
* reading known_hosts files for host key verification
5959
* publickey, password and keyboard-interactive authentication
60+
* FIDO/U2F security keys (`sk-ecdsa-sha2-nistp256@openssh.com`, `sk-ssh-ed25519@openssh.com`) via a pluggable `SecurityKeySigner`
6061
* SSH agent authentication over the `SSH_AUTH_SOCK` unix-domain socket (RSA, ECDSA, Ed25519, and FIDO/U2F security keys)
6162
+
6263
NOTE: The built-in unix-domain socket transport requires a Java 16+ runtime. On older runtimes, supply your own `AgentConnection` implementation.
@@ -82,7 +83,8 @@ key exchange::
8283
`diffie-hellman-group16-sha256`, `diffie-hellman-group16-sha384@ssh.com`, `diffie-hellman-group16-sha512@ssh.com`, `diffie-hellman-group18-sha512@ssh.com`
8384

8485
signatures::
85-
`ssh-rsa`, `ssh-dss`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, `ecdsa-sha2-nistp521`, `ssh-ed25519`, `ssh-rsa2-256`, `ssh-rsa2-512`
86+
`ssh-rsa`, `ssh-dss`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, `ecdsa-sha2-nistp521`, `ssh-ed25519`, `ssh-rsa2-256`, `ssh-rsa2-512`,
87+
`sk-ecdsa-sha2-nistp256@openssh.com`, `sk-ssh-ed25519@openssh.com` (FIDO/U2F security keys)
8688

8789
mac::
8890
`hmac-md5`, `hmac-md5-96`, `hmac-sha1`, `hmac-sha1-96`, `hmac-sha2-256`, `hmac-sha2-512`, `hmac-ripemd160`, `hmac-ripemd160@openssh.com`
@@ -92,7 +94,7 @@ compression::
9294
`zlib` and `zlib@openssh.com` (delayed zlib)
9395

9496
private key files::
95-
`pkcs5`, `pkcs8`, `openssh-key-v1`, `ssh-rsa-cert-v01@openssh.com`, `ssh-dsa-cert-v01@openssh.com`
97+
`pkcs5`, `pkcs8`, `openssh-key-v1` (including FIDO/U2F `sk-ecdsa-sha2-nistp256@openssh.com` and `sk-ssh-ed25519@openssh.com` keys), `ssh-rsa-cert-v01@openssh.com`, `ssh-dsa-cert-v01@openssh.com`
9698

9799
If you need something that is not included, it shouldn't be too hard to add (do contribute it!)
98100

@@ -113,6 +115,10 @@ Issue tracker: https://github.com/hierynomus/sshj/issues
113115
Fork away!
114116

115117
== Release history
118+
Starting from version 0.40.0, release notes are published as https://github.com/hierynomus/sshj/releases[GitHub Releases].
119+
120+
The history below covers releases up to and including 0.39.0.
121+
116122
SSHJ 0.39.0 (2024-02-20)::
117123
* Upgraded dependencies
118124
* Remove hard dependencies on BouncyCastle, making it optional.

src/main/java/com/hierynomus/sshj/key/KeyAlgorithms.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
package com.hierynomus.sshj.key;
1717

1818
import com.hierynomus.sshj.signature.SignatureEdDSA;
19+
import com.hierynomus.sshj.signature.SignatureSkEcdsa;
20+
import com.hierynomus.sshj.signature.SignatureSkEd25519;
1921
import net.schmizz.sshj.common.KeyType;
2022
import net.schmizz.sshj.signature.Signature;
2123
import net.schmizz.sshj.signature.SignatureDSA;
@@ -38,6 +40,8 @@ public class KeyAlgorithms {
3840
public static Factory ECDSASHANistp521CertV01() { return new Factory(KeyType.ECDSA521_CERT.toString(), new SignatureECDSA.Factory521(), KeyType.ECDSA521_CERT); }
3941
public static Factory EdDSA25519() { return new Factory(KeyType.ED25519.toString(), new SignatureEdDSA.Factory(), KeyType.ED25519); }
4042
public static Factory EdDSA25519CertV01() { return new Factory(KeyType.ED25519_CERT.toString(), new SignatureEdDSA.Factory(), KeyType.ED25519_CERT); }
43+
public static Factory SkSSHEd25519() { return new Factory(KeyType.SK_ED25519.toString(), new SignatureSkEd25519.Factory(), KeyType.SK_ED25519); }
44+
public static Factory SkECDSANistp256() { return new Factory(KeyType.SK_ECDSA.toString(), new SignatureSkEcdsa.Factory(), KeyType.SK_ECDSA); }
4145

4246
public static class Factory implements net.schmizz.sshj.common.Factory.Named<KeyAlgorithm> {
4347

0 commit comments

Comments
 (0)