Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ParseAuthorizedKey (0.08 sec)

  1. cmd/sftp-server_test.go

    	keyBytes, err := os.ReadFile("./testdata/invalid_test_key.pub")
    	if err != nil {
    		c.Fatalf("could not read test key file: %s", err)
    	}
    
    	testKey, _, _, _, err := ssh.ParseAuthorizedKey(keyBytes)
    	if err != nil {
    		c.Fatalf("could not parse test key file: %s", err)
    	}
    
    	newSSHCon := newSSHConnMock("dillon=ldap")
    	_, err = sshPubKeyAuth(newSSHCon, testKey)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 28 09:06:25 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. cmd/sftp-server.go

    		// be stored in the critical options.
    		if len(attribValue) != 1 {
    			continue
    		}
    
    		if attribKey == "sshPublicKey" && key != nil {
    			key2, _, _, _, err := ssh.ParseAuthorizedKey([]byte(attribValue[0]))
    			if err != nil {
    				return nil, errSFTPPublicKeyBadFormat
    			}
    
    			if subtle.ConstantTimeCompare(key2.Marshal(), key.Marshal()) != 1 {
    				return nil, errAuthentication
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 20 20:00:29 UTC 2024
    - 16K bytes
    - Viewed (0)
Back to top