Skip to content

Commit 120a4b7

Browse files
committed
add SRP user authentication method
Implement the SRP (Secure Remote Password) UAM for AFP, as used by Apple Time Capsule. The protocol uses SRP-6a with SHA-1, MGF1 KDF, and RFC 5054 group #2 (1536-bit). afppasswd is modified to operate on SRP storage file by default, which stores per-user salts and verifiers. afppasswd retains the legacy RandNum functionality activated with the -r flag. afppasswd -a now takes username as argument rather than previous positional username arugment
1 parent 3031dbe commit 120a4b7

18 files changed

Lines changed: 1557 additions & 146 deletions

File tree

.github/workflows/spectest-macos.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,16 @@ jobs:
9595
# Initialize AFP password database for RandNum UAM
9696
CONFDIR="$(brew --prefix)/etc"
9797
sudo rm -f "$CONFDIR/afppasswd"
98+
sudo afppasswd -c -r
99+
sudo afppasswd -a $AFP_USER -f -n -r -w "$AFP_PASS"
100+
sudo afppasswd -a $AFP_USER2 -f -n -r -w "$AFP_PASS"
101+
102+
# Initialize AFP password database for SRP UAM
103+
CONFDIR="$(brew --prefix)/etc"
104+
sudo rm -f "$CONFDIR/afppasswd.srp"
98105
sudo afppasswd -c
99-
sudo afppasswd -a -f -n -w "$AFP_PASS" $AFP_USER
100-
sudo afppasswd -a -f -n -w "$AFP_PASS" $AFP_USER2
106+
sudo afppasswd -a $AFP_USER -f -n -w "$AFP_PASS"
107+
sudo afppasswd -a $AFP_USER2 -f -n -w "$AFP_PASS"
101108
102109
- name: Create PAM service file for netatalk
103110
run: |

0 commit comments

Comments
 (0)