mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/gitea to 1.22.2-1
This commit is contained in:
parent
1327ab92ad
commit
4d4cc05f0a
3 changed files with 7 additions and 200 deletions
|
@ -1,6 +1,6 @@
|
|||
pkgbase = gitea
|
||||
pkgdesc = Painless self-hosted Git service, community managed.
|
||||
pkgver = 1.22.1
|
||||
pkgver = 1.22.2
|
||||
pkgrel = 1
|
||||
url = https://gitea.io
|
||||
arch = x86_64
|
||||
|
@ -20,11 +20,10 @@ pkgbase = gitea
|
|||
optdepends = sqlite: SQLite support
|
||||
options = !lto
|
||||
backup = etc/gitea/app.ini
|
||||
source = git+https://github.com/go-gitea/gitea.git#tag=v1.22.1?signed
|
||||
source = git+https://github.com/go-gitea/gitea.git#tag=v1.22.2?signed
|
||||
source = gitea.tmpfiles
|
||||
source = gitea.service
|
||||
source = gitea.sysusers
|
||||
source = disable_failing_tests.patch
|
||||
validpgpkeys = B56E3C7437A49E136862F5DE9D8A57ADAA232E95
|
||||
validpgpkeys = D8F9672D77C0BB60A024C23EDFDE60A0093EB926
|
||||
validpgpkeys = BA66F67FD73F7058D712D308C3B7C91B632F738A
|
||||
|
@ -32,10 +31,9 @@ pkgbase = gitea
|
|||
validpgpkeys = D2CF76DA95F201E9901532AB3CDE74631F13A748
|
||||
validpgpkeys = 82A110A44DF1A28D50C093BFB853ADA5DA7BBF7A
|
||||
validpgpkeys = FE7C3EAEB8CD8290390B12AD3DECE05F6D9A647C
|
||||
sha256sums = c0c5e682c8abe7baae35b7c9bed7c270a36090c977741443f71b89334a7b9129
|
||||
sha256sums = 8243b03ea6b742a283a0d178d96e6b1dd611b1f3f277f13fd5ce4317eba7eaa2
|
||||
sha256sums = 1521fd7edc3830c695698ffe9835709f1408040b5ec989f07410972c894fa8ba
|
||||
sha256sums = 0725aa3d9c556229b473ee5a12a922a1ebbb88aeb02cffd0252756c8bd531959
|
||||
sha256sums = 7e7b798b8ce035c1fb55993ece41c5efb6cad5922708866804fa50ada0cf9fa5
|
||||
sha256sums = 462f54e0137312b04d911cfec1fa2318a1fb2c89d908935986ea70ffc14f1d31
|
||||
|
||||
pkgname = gitea
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# - don't check repo signature until author puts his keys on keyservers
|
||||
|
||||
pkgname=gitea
|
||||
pkgver=1.22.1
|
||||
pkgver=1.22.2
|
||||
pkgrel=1
|
||||
pkgdesc="Painless self-hosted Git service, community managed."
|
||||
arch=(x86_64)
|
||||
|
@ -33,13 +33,11 @@ backup=('etc/gitea/app.ini')
|
|||
source=(git+https://github.com/go-gitea/gitea.git#tag=v${pkgver}
|
||||
gitea.tmpfiles
|
||||
gitea.service
|
||||
gitea.sysusers
|
||||
disable_failing_tests.patch)
|
||||
sha256sums=('c0c5e682c8abe7baae35b7c9bed7c270a36090c977741443f71b89334a7b9129'
|
||||
gitea.sysusers)
|
||||
sha256sums=('8243b03ea6b742a283a0d178d96e6b1dd611b1f3f277f13fd5ce4317eba7eaa2'
|
||||
'1521fd7edc3830c695698ffe9835709f1408040b5ec989f07410972c894fa8ba'
|
||||
'0725aa3d9c556229b473ee5a12a922a1ebbb88aeb02cffd0252756c8bd531959'
|
||||
'7e7b798b8ce035c1fb55993ece41c5efb6cad5922708866804fa50ada0cf9fa5'
|
||||
'462f54e0137312b04d911cfec1fa2318a1fb2c89d908935986ea70ffc14f1d31')
|
||||
'7e7b798b8ce035c1fb55993ece41c5efb6cad5922708866804fa50ada0cf9fa5')
|
||||
validpgpkeys=(
|
||||
B56E3C7437A49E136862F5DE9D8A57ADAA232E95 # Matti Ranta <matti@mdranta.net>, retrieved from https://github.com/techknowlogick.gpg
|
||||
D8F9672D77C0BB60A024C23EDFDE60A0093EB926 # Lauris Bukšis-Haberkorns <lauris@nix.lv>, retrieved from https://github.com/lafriks.gpg
|
||||
|
@ -52,9 +50,6 @@ validpgpkeys=(
|
|||
|
||||
prepare() {
|
||||
cd ${pkgname}
|
||||
# Patch to disable failing tests that rely on weak ssh keys (DSA-1024)
|
||||
# See https://github.com/go-gitea/gitea/issues/31624
|
||||
patch -Np1 < "${srcdir}/disable_failing_tests.patch"
|
||||
make deps
|
||||
}
|
||||
|
||||
|
|
|
@ -1,186 +0,0 @@
|
|||
diff --git a/models/asymkey/ssh_key_test.go b/models/asymkey/ssh_key_test.go
|
||||
index d3e886b97f..1243e31552 100644
|
||||
--- a/models/asymkey/ssh_key_test.go
|
||||
+++ b/models/asymkey/ssh_key_test.go
|
||||
@@ -18,56 +18,56 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
-func Test_SSHParsePublicKey(t *testing.T) {
|
||||
- testCases := []struct {
|
||||
- name string
|
||||
- skipSSHKeygen bool
|
||||
- keyType string
|
||||
- length int
|
||||
- content string
|
||||
- }{
|
||||
- {"dsa-1024", false, "dsa", 1024, "ssh-dss AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3ibZ2OkQ3S0SqDIa0HXSEJ1zaExQdmbO+Ux/wsytWZmCczWOVsaszBZSl90q8UnWlSH6P+/YA+RWJm5SFtuV9PtGIhyZgoNuz5kBQ7K139wuQsecdKktISwTakzAAAAFQCzKsO2JhNKlL+wwwLGOcLffoAmkwAAAIBpK7/3xvduajLBD/9vASqBQIHrgK2J+wiQnIb/Wzy0UsVmvfn8A+udRbBo+csM8xrSnlnlJnjkJS3qiM5g+eTwsLIV1IdKPEwmwB+VcP53Cw6lSyWyJcvhFb0N6s08NZysLzvj0N+ZC/FnhKTLzIyMtkHf/IrPCwlM+pV/M/96YgAAAIEAqQcGn9CKgzgPaguIZooTAOQdvBLMI5y0bQjOW6734XOpqQGf/Kra90wpoasLKZjSYKNPjE+FRUOrStLrxcNs4BeVKhy2PYTRnybfYVk1/dmKgH6P1YSRONsGKvTsH6c5IyCRG0ncCgYeF8tXppyd642982daopE7zQ/NPAnJfag= nocomment"},
|
||||
- {"rsa-1024", false, "rsa", 1024, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDAu7tvIvX6ZHrRXuZNfkR3XLHSsuCK9Zn3X58lxBcQzuo5xZgB6vRwwm/QtJuF+zZPtY5hsQILBLmF+BZ5WpKZp1jBeSjH2G7lxet9kbcH+kIVj0tPFEoyKI9wvWqIwC4prx/WVk2wLTJjzBAhyNxfEq7C9CeiX9pQEbEqJfkKCQ== nocomment\n"},
|
||||
- {"rsa-2048", false, "rsa", 2048, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMZXh+1OBUwSH9D45wTaxErQIN9IoC9xl7MKJkqvTvv6O5RR9YW/IK9FbfjXgXsppYGhsCZo1hFOOsXHMnfOORqu/xMDx4yPuyvKpw4LePEcg4TDipaDFuxbWOqc/BUZRZcXu41QAWfDLrInwsltWZHSeG7hjhpacl4FrVv9V1pS6Oc5Q1NxxEzTzuNLS/8diZrTm/YAQQ/+B+mzWI3zEtF4miZjjAljWd1LTBPvU23d29DcBmmFahcZ441XZsTeAwGxG/Q6j8NgNXj9WxMeWwxXV2jeAX/EBSpZrCVlCQ1yJswT6xCp8TuBnTiGWYMBNTbOZvPC4e0WI2/yZW/s5F nocomment"},
|
||||
- {"ecdsa-256", false, "ecdsa", 256, "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFQacN3PrOll7PXmN5B/ZNVahiUIqI05nbBlZk1KXsO3d06ktAWqbNflv2vEmA38bTFTfJ2sbn2B5ksT52cDDbA= nocomment"},
|
||||
- {"ecdsa-384", false, "ecdsa", 384, "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBINmioV+XRX1Fm9Qk2ehHXJ2tfVxW30ypUWZw670Zyq5GQfBAH6xjygRsJ5wWsHXBsGYgFUXIHvMKVAG1tpw7s6ax9oA+dJOJ7tj+vhn8joFqT+sg3LYHgZkHrfqryRasQ== nocomment"},
|
||||
- {"ecdsa-sk", true, "ecdsa-sk", 256, "sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBGXEEzWmm1dxb+57RoK5KVCL0w2eNv9cqJX2AGGVlkFsVDhOXHzsadS3LTK4VlEbbrDMJdoti9yM8vclA8IeRacAAAAEc3NoOg== nocomment"},
|
||||
- {"ed25519-sk", true, "ed25519-sk", 256, "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIE7kM1R02+4ertDKGKEDcKG0s+2vyDDcIvceJ0Gqv5f1AAAABHNzaDo= nocomment"},
|
||||
- }
|
||||
-
|
||||
- for _, tc := range testCases {
|
||||
- t.Run(tc.name, func(t *testing.T) {
|
||||
- t.Run("Native", func(t *testing.T) {
|
||||
- keyTypeN, lengthN, err := SSHNativeParsePublicKey(tc.content)
|
||||
- assert.NoError(t, err)
|
||||
- assert.Equal(t, tc.keyType, keyTypeN)
|
||||
- assert.EqualValues(t, tc.length, lengthN)
|
||||
- })
|
||||
- if tc.skipSSHKeygen {
|
||||
- return
|
||||
- }
|
||||
- t.Run("SSHKeygen", func(t *testing.T) {
|
||||
- keyTypeK, lengthK, err := SSHKeyGenParsePublicKey(tc.content)
|
||||
- if err != nil {
|
||||
- // Some servers do not support ecdsa format.
|
||||
- if !strings.Contains(err.Error(), "line 1 too long:") {
|
||||
- assert.FailNow(t, "%v", err)
|
||||
- }
|
||||
- }
|
||||
- assert.Equal(t, tc.keyType, keyTypeK)
|
||||
- assert.EqualValues(t, tc.length, lengthK)
|
||||
- })
|
||||
- t.Run("SSHParseKeyNative", func(t *testing.T) {
|
||||
- keyTypeK, lengthK, err := SSHNativeParsePublicKey(tc.content)
|
||||
- if err != nil {
|
||||
- assert.FailNow(t, "%v", err)
|
||||
- }
|
||||
- assert.Equal(t, tc.keyType, keyTypeK)
|
||||
- assert.EqualValues(t, tc.length, lengthK)
|
||||
- })
|
||||
- })
|
||||
- }
|
||||
-}
|
||||
+//func Test_SSHParsePublicKey(t *testing.T) {
|
||||
+// testCases := []struct {
|
||||
+// name string
|
||||
+// skipSSHKeygen bool
|
||||
+// keyType string
|
||||
+// length int
|
||||
+// content string
|
||||
+// }{
|
||||
+// {"dsa-1024", false, "dsa", 1024, "ssh-dss AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3ibZ2OkQ3S0SqDIa0HXSEJ1zaExQdmbO+Ux/wsytWZmCczWOVsaszBZSl90q8UnWlSH6P+/YA+RWJm5SFtuV9PtGIhyZgoNuz5kBQ7K139wuQsecdKktISwTakzAAAAFQCzKsO2JhNKlL+wwwLGOcLffoAmkwAAAIBpK7/3xvduajLBD/9vASqBQIHrgK2J+wiQnIb/Wzy0UsVmvfn8A+udRbBo+csM8xrSnlnlJnjkJS3qiM5g+eTwsLIV1IdKPEwmwB+VcP53Cw6lSyWyJcvhFb0N6s08NZysLzvj0N+ZC/FnhKTLzIyMtkHf/IrPCwlM+pV/M/96YgAAAIEAqQcGn9CKgzgPaguIZooTAOQdvBLMI5y0bQjOW6734XOpqQGf/Kra90wpoasLKZjSYKNPjE+FRUOrStLrxcNs4BeVKhy2PYTRnybfYVk1/dmKgH6P1YSRONsGKvTsH6c5IyCRG0ncCgYeF8tXppyd642982daopE7zQ/NPAnJfag= nocomment"},
|
||||
+// {"rsa-1024", false, "rsa", 1024, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDAu7tvIvX6ZHrRXuZNfkR3XLHSsuCK9Zn3X58lxBcQzuo5xZgB6vRwwm/QtJuF+zZPtY5hsQILBLmF+BZ5WpKZp1jBeSjH2G7lxet9kbcH+kIVj0tPFEoyKI9wvWqIwC4prx/WVk2wLTJjzBAhyNxfEq7C9CeiX9pQEbEqJfkKCQ== nocomment\n"},
|
||||
+// {"rsa-2048", false, "rsa", 2048, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMZXh+1OBUwSH9D45wTaxErQIN9IoC9xl7MKJkqvTvv6O5RR9YW/IK9FbfjXgXsppYGhsCZo1hFOOsXHMnfOORqu/xMDx4yPuyvKpw4LePEcg4TDipaDFuxbWOqc/BUZRZcXu41QAWfDLrInwsltWZHSeG7hjhpacl4FrVv9V1pS6Oc5Q1NxxEzTzuNLS/8diZrTm/YAQQ/+B+mzWI3zEtF4miZjjAljWd1LTBPvU23d29DcBmmFahcZ441XZsTeAwGxG/Q6j8NgNXj9WxMeWwxXV2jeAX/EBSpZrCVlCQ1yJswT6xCp8TuBnTiGWYMBNTbOZvPC4e0WI2/yZW/s5F nocomment"},
|
||||
+// {"ecdsa-256", false, "ecdsa", 256, "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFQacN3PrOll7PXmN5B/ZNVahiUIqI05nbBlZk1KXsO3d06ktAWqbNflv2vEmA38bTFTfJ2sbn2B5ksT52cDDbA= nocomment"},
|
||||
+// {"ecdsa-384", false, "ecdsa", 384, "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBINmioV+XRX1Fm9Qk2ehHXJ2tfVxW30ypUWZw670Zyq5GQfBAH6xjygRsJ5wWsHXBsGYgFUXIHvMKVAG1tpw7s6ax9oA+dJOJ7tj+vhn8joFqT+sg3LYHgZkHrfqryRasQ== nocomment"},
|
||||
+// {"ecdsa-sk", true, "ecdsa-sk", 256, "sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBGXEEzWmm1dxb+57RoK5KVCL0w2eNv9cqJX2AGGVlkFsVDhOXHzsadS3LTK4VlEbbrDMJdoti9yM8vclA8IeRacAAAAEc3NoOg== nocomment"},
|
||||
+// {"ed25519-sk", true, "ed25519-sk", 256, "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIE7kM1R02+4ertDKGKEDcKG0s+2vyDDcIvceJ0Gqv5f1AAAABHNzaDo= nocomment"},
|
||||
+// }
|
||||
+//
|
||||
+// for _, tc := range testCases {
|
||||
+// t.Run(tc.name, func(t *testing.T) {
|
||||
+// t.Run("Native", func(t *testing.T) {
|
||||
+// keyTypeN, lengthN, err := SSHNativeParsePublicKey(tc.content)
|
||||
+// assert.NoError(t, err)
|
||||
+// assert.Equal(t, tc.keyType, keyTypeN)
|
||||
+// assert.EqualValues(t, tc.length, lengthN)
|
||||
+// })
|
||||
+// if tc.skipSSHKeygen {
|
||||
+// return
|
||||
+// }
|
||||
+// t.Run("SSHKeygen", func(t *testing.T) {
|
||||
+// keyTypeK, lengthK, err := SSHKeyGenParsePublicKey(tc.content)
|
||||
+// if err != nil {
|
||||
+// // Some servers do not support ecdsa format.
|
||||
+// if !strings.Contains(err.Error(), "line 1 too long:") {
|
||||
+// assert.FailNow(t, "%v", err)
|
||||
+// }
|
||||
+// }
|
||||
+// assert.Equal(t, tc.keyType, keyTypeK)
|
||||
+// assert.EqualValues(t, tc.length, lengthK)
|
||||
+// })
|
||||
+// t.Run("SSHParseKeyNative", func(t *testing.T) {
|
||||
+// keyTypeK, lengthK, err := SSHNativeParsePublicKey(tc.content)
|
||||
+// if err != nil {
|
||||
+// assert.FailNow(t, "%v", err)
|
||||
+// }
|
||||
+// assert.Equal(t, tc.keyType, keyTypeK)
|
||||
+// assert.EqualValues(t, tc.length, lengthK)
|
||||
+// })
|
||||
+// })
|
||||
+// }
|
||||
+//}
|
||||
|
||||
func Test_CheckPublicKeyString(t *testing.T) {
|
||||
oldValue := setting.SSH.MinimumKeySizeCheck
|
||||
@@ -163,40 +163,40 @@ AAAAC3NzaC1lZDI1NTE5AAAAICV0MGX/W9IvLA4FXpIuUcdDcbj5KX4syHgsTy7soVgf
|
||||
}
|
||||
}
|
||||
|
||||
-func Test_calcFingerprint(t *testing.T) {
|
||||
- testCases := []struct {
|
||||
- name string
|
||||
- skipSSHKeygen bool
|
||||
- fp string
|
||||
- content string
|
||||
- }{
|
||||
- {"dsa-1024", false, "SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc", "ssh-dss AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3ibZ2OkQ3S0SqDIa0HXSEJ1zaExQdmbO+Ux/wsytWZmCczWOVsaszBZSl90q8UnWlSH6P+/YA+RWJm5SFtuV9PtGIhyZgoNuz5kBQ7K139wuQsecdKktISwTakzAAAAFQCzKsO2JhNKlL+wwwLGOcLffoAmkwAAAIBpK7/3xvduajLBD/9vASqBQIHrgK2J+wiQnIb/Wzy0UsVmvfn8A+udRbBo+csM8xrSnlnlJnjkJS3qiM5g+eTwsLIV1IdKPEwmwB+VcP53Cw6lSyWyJcvhFb0N6s08NZysLzvj0N+ZC/FnhKTLzIyMtkHf/IrPCwlM+pV/M/96YgAAAIEAqQcGn9CKgzgPaguIZooTAOQdvBLMI5y0bQjOW6734XOpqQGf/Kra90wpoasLKZjSYKNPjE+FRUOrStLrxcNs4BeVKhy2PYTRnybfYVk1/dmKgH6P1YSRONsGKvTsH6c5IyCRG0ncCgYeF8tXppyd642982daopE7zQ/NPAnJfag= nocomment"},
|
||||
- {"rsa-1024", false, "SHA256:vSnDkvRh/xM6kMxPidLgrUhq3mCN7CDaronCEm2joyQ", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDAu7tvIvX6ZHrRXuZNfkR3XLHSsuCK9Zn3X58lxBcQzuo5xZgB6vRwwm/QtJuF+zZPtY5hsQILBLmF+BZ5WpKZp1jBeSjH2G7lxet9kbcH+kIVj0tPFEoyKI9wvWqIwC4prx/WVk2wLTJjzBAhyNxfEq7C9CeiX9pQEbEqJfkKCQ== nocomment\n"},
|
||||
- {"rsa-2048", false, "SHA256:ZHD//a1b9VuTq9XSunAeYjKeU1xDa2tBFZYrFr2Okkg", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMZXh+1OBUwSH9D45wTaxErQIN9IoC9xl7MKJkqvTvv6O5RR9YW/IK9FbfjXgXsppYGhsCZo1hFOOsXHMnfOORqu/xMDx4yPuyvKpw4LePEcg4TDipaDFuxbWOqc/BUZRZcXu41QAWfDLrInwsltWZHSeG7hjhpacl4FrVv9V1pS6Oc5Q1NxxEzTzuNLS/8diZrTm/YAQQ/+B+mzWI3zEtF4miZjjAljWd1LTBPvU23d29DcBmmFahcZ441XZsTeAwGxG/Q6j8NgNXj9WxMeWwxXV2jeAX/EBSpZrCVlCQ1yJswT6xCp8TuBnTiGWYMBNTbOZvPC4e0WI2/yZW/s5F nocomment"},
|
||||
- {"ecdsa-256", false, "SHA256:Bqx/xgWqRKLtkZ0Lr4iZpgb+5lYsFpSwXwVZbPwuTRw", "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFQacN3PrOll7PXmN5B/ZNVahiUIqI05nbBlZk1KXsO3d06ktAWqbNflv2vEmA38bTFTfJ2sbn2B5ksT52cDDbA= nocomment"},
|
||||
- {"ecdsa-384", false, "SHA256:4qfJOgJDtUd8BrEjyVNdI8IgjiZKouztVde43aDhe1E", "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBINmioV+XRX1Fm9Qk2ehHXJ2tfVxW30ypUWZw670Zyq5GQfBAH6xjygRsJ5wWsHXBsGYgFUXIHvMKVAG1tpw7s6ax9oA+dJOJ7tj+vhn8joFqT+sg3LYHgZkHrfqryRasQ== nocomment"},
|
||||
- {"ecdsa-sk", true, "SHA256:4wcIu4z+53gHc+db85OPfy8IydyNzPLCr6kHIs625LQ", "sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBGXEEzWmm1dxb+57RoK5KVCL0w2eNv9cqJX2AGGVlkFsVDhOXHzsadS3LTK4VlEbbrDMJdoti9yM8vclA8IeRacAAAAEc3NoOg== nocomment"},
|
||||
- {"ed25519-sk", true, "SHA256:RB4ku1OeWKN7fLMrjxz38DK0mp1BnOPBx4BItjTvJ0g", "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIE7kM1R02+4ertDKGKEDcKG0s+2vyDDcIvceJ0Gqv5f1AAAABHNzaDo= nocomment"},
|
||||
- }
|
||||
-
|
||||
- for _, tc := range testCases {
|
||||
- t.Run(tc.name, func(t *testing.T) {
|
||||
- t.Run("Native", func(t *testing.T) {
|
||||
- fpN, err := calcFingerprintNative(tc.content)
|
||||
- assert.NoError(t, err)
|
||||
- assert.Equal(t, tc.fp, fpN)
|
||||
- })
|
||||
- if tc.skipSSHKeygen {
|
||||
- return
|
||||
- }
|
||||
- t.Run("SSHKeygen", func(t *testing.T) {
|
||||
- fpK, err := calcFingerprintSSHKeygen(tc.content)
|
||||
- assert.NoError(t, err)
|
||||
- assert.Equal(t, tc.fp, fpK)
|
||||
- })
|
||||
- })
|
||||
- }
|
||||
-}
|
||||
+//func Test_calcFingerprint(t *testing.T) {
|
||||
+// testCases := []struct {
|
||||
+// name string
|
||||
+// skipSSHKeygen bool
|
||||
+// fp string
|
||||
+// content string
|
||||
+// }{
|
||||
+// {"dsa-1024", false, "SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc", "ssh-dss AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3ibZ2OkQ3S0SqDIa0HXSEJ1zaExQdmbO+Ux/wsytWZmCczWOVsaszBZSl90q8UnWlSH6P+/YA+RWJm5SFtuV9PtGIhyZgoNuz5kBQ7K139wuQsecdKktISwTakzAAAAFQCzKsO2JhNKlL+wwwLGOcLffoAmkwAAAIBpK7/3xvduajLBD/9vASqBQIHrgK2J+wiQnIb/Wzy0UsVmvfn8A+udRbBo+csM8xrSnlnlJnjkJS3qiM5g+eTwsLIV1IdKPEwmwB+VcP53Cw6lSyWyJcvhFb0N6s08NZysLzvj0N+ZC/FnhKTLzIyMtkHf/IrPCwlM+pV/M/96YgAAAIEAqQcGn9CKgzgPaguIZooTAOQdvBLMI5y0bQjOW6734XOpqQGf/Kra90wpoasLKZjSYKNPjE+FRUOrStLrxcNs4BeVKhy2PYTRnybfYVk1/dmKgH6P1YSRONsGKvTsH6c5IyCRG0ncCgYeF8tXppyd642982daopE7zQ/NPAnJfag= nocomment"},
|
||||
+// {"rsa-1024", false, "SHA256:vSnDkvRh/xM6kMxPidLgrUhq3mCN7CDaronCEm2joyQ", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDAu7tvIvX6ZHrRXuZNfkR3XLHSsuCK9Zn3X58lxBcQzuo5xZgB6vRwwm/QtJuF+zZPtY5hsQILBLmF+BZ5WpKZp1jBeSjH2G7lxet9kbcH+kIVj0tPFEoyKI9wvWqIwC4prx/WVk2wLTJjzBAhyNxfEq7C9CeiX9pQEbEqJfkKCQ== nocomment\n"},
|
||||
+// {"rsa-2048", false, "SHA256:ZHD//a1b9VuTq9XSunAeYjKeU1xDa2tBFZYrFr2Okkg", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMZXh+1OBUwSH9D45wTaxErQIN9IoC9xl7MKJkqvTvv6O5RR9YW/IK9FbfjXgXsppYGhsCZo1hFOOsXHMnfOORqu/xMDx4yPuyvKpw4LePEcg4TDipaDFuxbWOqc/BUZRZcXu41QAWfDLrInwsltWZHSeG7hjhpacl4FrVv9V1pS6Oc5Q1NxxEzTzuNLS/8diZrTm/YAQQ/+B+mzWI3zEtF4miZjjAljWd1LTBPvU23d29DcBmmFahcZ441XZsTeAwGxG/Q6j8NgNXj9WxMeWwxXV2jeAX/EBSpZrCVlCQ1yJswT6xCp8TuBnTiGWYMBNTbOZvPC4e0WI2/yZW/s5F nocomment"},
|
||||
+// {"ecdsa-256", false, "SHA256:Bqx/xgWqRKLtkZ0Lr4iZpgb+5lYsFpSwXwVZbPwuTRw", "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFQacN3PrOll7PXmN5B/ZNVahiUIqI05nbBlZk1KXsO3d06ktAWqbNflv2vEmA38bTFTfJ2sbn2B5ksT52cDDbA= nocomment"},
|
||||
+// {"ecdsa-384", false, "SHA256:4qfJOgJDtUd8BrEjyVNdI8IgjiZKouztVde43aDhe1E", "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBINmioV+XRX1Fm9Qk2ehHXJ2tfVxW30ypUWZw670Zyq5GQfBAH6xjygRsJ5wWsHXBsGYgFUXIHvMKVAG1tpw7s6ax9oA+dJOJ7tj+vhn8joFqT+sg3LYHgZkHrfqryRasQ== nocomment"},
|
||||
+// {"ecdsa-sk", true, "SHA256:4wcIu4z+53gHc+db85OPfy8IydyNzPLCr6kHIs625LQ", "sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBGXEEzWmm1dxb+57RoK5KVCL0w2eNv9cqJX2AGGVlkFsVDhOXHzsadS3LTK4VlEbbrDMJdoti9yM8vclA8IeRacAAAAEc3NoOg== nocomment"},
|
||||
+// {"ed25519-sk", true, "SHA256:RB4ku1OeWKN7fLMrjxz38DK0mp1BnOPBx4BItjTvJ0g", "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIE7kM1R02+4ertDKGKEDcKG0s+2vyDDcIvceJ0Gqv5f1AAAABHNzaDo= nocomment"},
|
||||
+// }
|
||||
+//
|
||||
+// for _, tc := range testCases {
|
||||
+// t.Run(tc.name, func(t *testing.T) {
|
||||
+// t.Run("Native", func(t *testing.T) {
|
||||
+// fpN, err := calcFingerprintNative(tc.content)
|
||||
+// assert.NoError(t, err)
|
||||
+// assert.Equal(t, tc.fp, fpN)
|
||||
+// })
|
||||
+// if tc.skipSSHKeygen {
|
||||
+// return
|
||||
+// }
|
||||
+// t.Run("SSHKeygen", func(t *testing.T) {
|
||||
+// fpK, err := calcFingerprintSSHKeygen(tc.content)
|
||||
+// assert.NoError(t, err)
|
||||
+// assert.Equal(t, tc.fp, fpK)
|
||||
+// })
|
||||
+// })
|
||||
+// }
|
||||
+//}
|
||||
|
||||
var (
|
||||
// Generated with "ssh-keygen -C test@rekor.dev -f id_rsa"
|
Loading…
Reference in a new issue