summaryrefslogtreecommitdiffstats
path: root/models/ssh_key_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Fix SSH2 conditonal in key parsing code (#8806)mrsdizzie2019-11-031-0/+13
| | | | | | | | | Avoid out of bounds error by using strings.HasPrefix to check for starting SSH2 text rather than assuming user input has at least 31 characters. Add tests for bad input as well. Fixes #8800
* Make PKCS8, PEM and SSH2 keys work (#7600)zeripath2019-07-251-0/+61
| | | | | | | | * Make PEM and SSH2 keys work * add ssh2 testcases and PEM cases - and fix PEM * Add final test to parse the proposed key
* Improve SSH key parser to handle newlines in keys (#7522)silverwind2019-07-231-0/+16
| | | | | | | | | | | | | | | | * Strip newlines from SSH keys before adding them Fixes: https://github.com/go-gitea/gitea/issues/7500 * add test for CheckPublicKeyString * add one more test * simplify test * further simplify * make fmt
* Use go method to calculate ssh key fingerprint (#7128)Antoine GIRARD2019-06-161-20/+62
| | | | | | | | | | | | * Use go method to calculate key fingerprint * add gitea copyright * use native go method only for built-in server * refactor and add tests * add gitea copyright
* Add work path CLI option (#6922)zeripath2019-05-141-1/+1
| | | | | Makes it possible to set the work path as a CLI option instead of relying on environment variables which are somewhat opaque
* Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631)zeripath2019-04-291-0/+1
|
* Use assert in legacy unit tests (#867)Ethan Koenig2017-02-081-35/+22
|
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-1/+1
| | | | | | | - Update import paths from github.com/go-gitea to code.gitea.io - Fix import path for travis See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-1/+1
|
* Code clean up for new config optionsUnknwon2016-08-141-1/+1
|
* #3442 add test suitesUnknwon2016-08-121-1/+12
|
* Post work for #2637Unknwon2016-02-271-29/+35
| | | | Improve test cases, config settings, also show SSH config settings on admin config panel.
* variable should not use ALL_CAPSGibheer2016-02-231-3/+3
|
* remove ed25519 test for nowGibheer2016-02-171-7/+6
| | | | TravisCI is too old for ed25519, so it can't be tested correctly.
* fix ssh public key testsGibheer2016-02-171-8/+12
| | | | | | | The old API was using []byte, but was changed to string without running the tests again. It also sets the variables from the configuration to make them work. Maybe there is a better way to do this.
* allow native and ssh-keygen public key checkGibheer2016-02-161-0/+36
This commit adds the possibibility to use either the native golang libraries or ssh-keygen to check public keys. The check is adjusted depending on the settings, so that only supported keys are let through. This commit also brings back the blacklist feature, which was removed in 7ef9a055886574655d9f2be70c957bc16bf30500. This allows to blacklist algorythms or keys based on the key length. This works with the native and the ssh-keygen way. Because of #2179 it also includes a way to adjust the path to ssh-keygen and the working directory for ssh-keygen. With this, sysadmins should be able to adjust the settings in a way, that SELinux is okay with it. In the worst case, they can switch to the native implementation and only loose support for ed25519 keys at the moment. There are some other places which need adjustment to utilize the parameters and the native implementation, but this sets the ground work.