Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5047ce86b0 | ||
|
|
45f3f8dbc0 | ||
|
|
a52a4b6462 | ||
|
|
b8bed150d0 | ||
|
|
56be19e3a9 | ||
|
|
b256e9b9fd | ||
|
|
b4be99002d | ||
|
|
9447c3a75c | ||
|
|
3deda78d54 | ||
|
|
c76f76ffb7 | ||
|
|
c57006672a | ||
|
|
881a7336ec | ||
|
|
11d0908325 | ||
|
|
b4d09eb632 | ||
|
|
d60269ca3d | ||
|
|
7a40ebcce4 | ||
|
|
9eeba9fe82 |
No files matched your search
@@ -58,6 +58,28 @@ jobs:
|
||||
test -s build/site/app/pass.wasm
|
||||
- name: Check formatting
|
||||
run: test -z "$(find . -path ./vendor -prune -o -name '*.go' -type f -print | xargs gofmt -l)"
|
||||
- name: Check fastlane metadata
|
||||
run: |
|
||||
set -eu
|
||||
meta=fastlane/metadata/android/en-US
|
||||
limit() {
|
||||
n=$(wc -m < "$1")
|
||||
if [ "$n" -gt "$2" ]; then
|
||||
echo "::error::$1 is $n characters (max $2)"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
limit "$meta/title.txt" 30
|
||||
limit "$meta/short_description.txt" 80
|
||||
limit "$meta/full_description.txt" 4000
|
||||
for f in "$meta"/changelogs/*.txt; do
|
||||
limit "$f" 500
|
||||
done
|
||||
code=$(sed -n 's/^[[:space:]]*versionCode \([0-9][0-9]*\)$/\1/p' droid/app/build.gradle | head -n 1)
|
||||
test -n "$code"
|
||||
test -s "$meta/changelogs/$code.txt"
|
||||
test -s "$meta/images/icon.png"
|
||||
echo "fastlane metadata ok (versionCode $code)"
|
||||
|
||||
build-gui:
|
||||
name: GUI (${{ matrix.arch }})
|
||||
@@ -93,3 +115,49 @@ jobs:
|
||||
name: pass-gui-linux-${{ matrix.arch }}
|
||||
path: build/pass-gui
|
||||
if-no-files-found: error
|
||||
|
||||
build-android:
|
||||
name: Android debug build
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
needs: guard-submodule-urls
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v3
|
||||
- name: Cache Android SDK packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
${{ env.ANDROID_HOME }}/platforms/android-36
|
||||
${{ env.ANDROID_HOME }}/build-tools/34.0.0
|
||||
${{ env.ANDROID_HOME }}/ndk/28.2.13676358
|
||||
${{ env.ANDROID_HOME }}/cmake/3.22.1
|
||||
key: android-sdk-${{ runner.os }}-${{ runner.arch }}-api36-bt34-ndk28-cmake322
|
||||
restore-keys: |
|
||||
android-sdk-${{ runner.os }}-${{ runner.arch }}-
|
||||
- name: Cache Android native build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
droid/app/.cxx
|
||||
droid/app/build/intermediates/cxx
|
||||
key: android-native-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('droid/app/src/main/cpp/CMakeLists.txt', 'droid/app/build.gradle', 'native/*.c', 'droid/app/src/main/cpp/*.c', 'vendor/kryon/src/**/*.c', 'vendor/kryon/include/**/*.h', 'vendor/kryon/vendor/raylib/src/**') }}
|
||||
restore-keys: |
|
||||
android-native-${{ runner.os }}-${{ runner.arch }}-
|
||||
- name: Install Android SDK components
|
||||
run: |
|
||||
set -euo pipefail
|
||||
SDKMANAGER="$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager"
|
||||
yes | "$SDKMANAGER" --licenses >/dev/null || true
|
||||
"$SDKMANAGER" "platforms;android-36" "build-tools;34.0.0" "ndk;28.2.13676358" "cmake;3.22.1"
|
||||
- name: Build debug APK
|
||||
run: |
|
||||
set -euo pipefail
|
||||
chmod +x droid/gradlew
|
||||
make android-debug
|
||||
@@ -99,6 +99,76 @@ jobs:
|
||||
build/release/*.AppImage
|
||||
if-no-files-found: error
|
||||
|
||||
android:
|
||||
name: Android
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v3
|
||||
- name: Cache Android SDK packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
${{ env.ANDROID_HOME }}/platforms/android-36
|
||||
${{ env.ANDROID_HOME }}/build-tools/34.0.0
|
||||
${{ env.ANDROID_HOME }}/ndk/28.2.13676358
|
||||
${{ env.ANDROID_HOME }}/cmake/3.22.1
|
||||
key: android-sdk-${{ runner.os }}-${{ runner.arch }}-api36-bt34-ndk28-cmake322
|
||||
restore-keys: |
|
||||
android-sdk-${{ runner.os }}-${{ runner.arch }}-
|
||||
- name: Cache Android native build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
droid/app/.cxx
|
||||
droid/app/build/intermediates/cxx
|
||||
key: android-native-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('droid/app/src/main/cpp/CMakeLists.txt', 'droid/app/build.gradle', 'native/*.c', 'droid/app/src/main/cpp/*.c', 'vendor/kryon/src/**/*.c', 'vendor/kryon/include/**/*.h', 'vendor/kryon/vendor/raylib/src/**') }}
|
||||
restore-keys: |
|
||||
android-native-${{ runner.os }}-${{ runner.arch }}-
|
||||
- name: Install Android SDK components
|
||||
run: |
|
||||
set -euo pipefail
|
||||
SDKMANAGER="$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager"
|
||||
yes | "$SDKMANAGER" --licenses >/dev/null || true
|
||||
"$SDKMANAGER" "platforms;android-36" "build-tools;34.0.0" "ndk;28.2.13676358" "cmake;3.22.1"
|
||||
- name: Prepare Android signing key
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test -n "$KEYSTORE_BASE64" || { echo "::error::KEYSTORE_BASE64 secret is empty or missing"; exit 1; }
|
||||
mkdir -p "$HOME/.android"
|
||||
printf '%s' "$KEYSTORE_BASE64" | base64 -d > "$HOME/.android/pass-release.keystore"
|
||||
- name: Build release APK
|
||||
env:
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test -n "$KEYSTORE_PASSWORD" || { echo "::error::KEYSTORE_PASSWORD secret is empty or missing"; exit 1; }
|
||||
test -n "$KEY_ALIAS" || { echo "::error::KEY_ALIAS secret is empty or missing"; exit 1; }
|
||||
chmod +x droid/gradlew
|
||||
./droid/gradlew -p droid assembleRelease \
|
||||
-Pkeystore.path="$HOME/.android/pass-release.keystore" \
|
||||
-Pkeystore.alias="$KEY_ALIAS" \
|
||||
-Pkeystore.password="$KEYSTORE_PASSWORD" \
|
||||
--stacktrace
|
||||
mkdir -p build/release
|
||||
cp droid/app/build/outputs/apk/release/app-release.apk build/release/pass-android.apk
|
||||
test -s build/release/pass-android.apk
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: android
|
||||
path: build/release/pass-android.apk
|
||||
if-no-files-found: error
|
||||
|
||||
web:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -116,7 +186,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
publish:
|
||||
needs: [cli, gui, web]
|
||||
needs: [cli, gui, web, android]
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
released: ${{ steps.version.outputs.released }}
|
||||
@@ -124,6 +194,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: build/artifacts
|
||||
@@ -141,13 +212,6 @@ jobs:
|
||||
else
|
||||
echo "released=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
- name: Create release tag
|
||||
if: steps.version.outputs.released == 'true'
|
||||
run: |
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
git tag -a "${{ steps.version.outputs.tag }}" -m "Release ${{ steps.version.outputs.tag }}"
|
||||
git push origin "${{ steps.version.outputs.tag }}"
|
||||
- name: Generate Update Appcast
|
||||
if: steps.version.outputs.released == 'true'
|
||||
run: |
|
||||
@@ -185,6 +249,20 @@ jobs:
|
||||
--changelog CHANGELOG.md \
|
||||
--out build/artifacts/appcast.json \
|
||||
"${channels[@]}"
|
||||
- name: Publish checksums
|
||||
if: steps.version.outputs.released == 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cd build/artifacts
|
||||
# The glob expands before the redirect creates SHA256SUMS itself.
|
||||
sha256sum -- * > SHA256SUMS
|
||||
- name: Create release tag
|
||||
if: steps.version.outputs.released == 'true'
|
||||
run: |
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
git tag -a "${{ steps.version.outputs.tag }}" -m "Release ${{ steps.version.outputs.tag }}"
|
||||
git push origin "${{ steps.version.outputs.tag }}"
|
||||
- name: Publish GitHub release
|
||||
if: steps.version.outputs.released == 'true'
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# Changelog
|
||||
|
||||
## [0.2.3] - 2026-08-21
|
||||
|
||||
- Verify every download: releases now ship a SHA256SUMS file covering the
|
||||
command-line, desktop, Android, and browser downloads.
|
||||
- The Android app now builds entirely from source with no developer signing
|
||||
key, clearing the way for F-Droid distribution.
|
||||
|
||||
## [0.2.2] - 2026-08-20
|
||||
|
||||
- Install pass on Android: a signed APK is now downloadable from
|
||||
pass.waozi.xyz alongside the desktop, terminal, and browser downloads.
|
||||
- Fix the Android master-password fingerprint and secure storage so the
|
||||
stored master password unlocks reliably across launches.
|
||||
|
||||
## [0.2.1] - 2026-08-19
|
||||
|
||||
- The desktop GUI now checks for new releases and can update itself: AppImage
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.PHONY: all cli gui native run test native-test web site install-gui uninstall-gui package-deb package-appimage android-debug
|
||||
.PHONY: all cli gui native run test native-test web site install install-cli uninstall-cli install-gui uninstall-gui package-deb package-appimage android-debug
|
||||
|
||||
BIN_DIR ?= $(HOME)/bin
|
||||
DATA_DIR ?= $(if $(XDG_DATA_HOME),$(XDG_DATA_HOME),$(HOME)/.local/share)
|
||||
@@ -23,9 +23,18 @@ native: all
|
||||
run: gui
|
||||
./build/pass-gui
|
||||
|
||||
install: install-cli install-gui
|
||||
|
||||
install-cli: cli
|
||||
mkdir -p $(BIN_DIR)
|
||||
install -m 0755 pass $(BIN_DIR)/pass
|
||||
|
||||
uninstall-cli:
|
||||
rm -f $(BIN_DIR)/pass
|
||||
|
||||
install-gui: gui
|
||||
mkdir -p $(BIN_DIR) $(DATA_DIR)/applications $(DATA_DIR)/icons/hicolor/512x512/apps
|
||||
cp build/pass-gui $(BIN_DIR)/pass-gui
|
||||
install -m 0755 build/pass-gui $(BIN_DIR)/pass-gui
|
||||
cp packaging/linux/xyz.waozi.pass.desktop $(DATA_DIR)/applications/xyz.waozi.pass.desktop
|
||||
cp assets/app/icon.png $(DATA_DIR)/icons/hicolor/512x512/apps/pass.png
|
||||
|
||||
|
||||
@@ -109,6 +109,15 @@ make gui
|
||||
./build/pass-gui
|
||||
```
|
||||
|
||||
## Android
|
||||
|
||||
The Android app runs on Android 5.0 (API 21) and newer. Install the signed
|
||||
APK (`pass-android.apk`) from [pass.waozi.xyz](https://pass.waozi.xyz/#downloads)
|
||||
or the [releases page](https://github.com/waozixyz/pass/releases/latest). It
|
||||
uses the same generation algorithm as the desktop app, computes everything
|
||||
locally, and declares no Internet permission at all — the only permissions it
|
||||
requests are for the optional fingerprint unlock.
|
||||
|
||||
## Library
|
||||
|
||||
```go
|
||||
|
||||
+16
-9
@@ -123,6 +123,14 @@ func run(arguments []string, stdout, stderr io.Writer) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
positional := flags.Args()
|
||||
if profileName == "" && len(positional) == 2 && config != nil {
|
||||
if _, ok := config.Profiles[positional[0]]; ok {
|
||||
profileName = positional[0]
|
||||
positional = positional[1:]
|
||||
}
|
||||
}
|
||||
|
||||
var profile Profile
|
||||
if profileName != "" {
|
||||
if config == nil {
|
||||
@@ -139,7 +147,6 @@ func run(arguments []string, stdout, stderr io.Writer) error {
|
||||
profile.apply(&options, explicit)
|
||||
}
|
||||
|
||||
positional := flags.Args()
|
||||
if profileName != "" {
|
||||
if len(positional) != 1 {
|
||||
printHelp(stderr)
|
||||
@@ -160,13 +167,12 @@ func run(arguments []string, stdout, stderr io.Writer) error {
|
||||
login = positional[1]
|
||||
}
|
||||
|
||||
// A vault from the configuration is the least authoritative master
|
||||
// password source: anything the user spells out for this invocation
|
||||
// (--vault, the environment, --prompt, a positional password) wins.
|
||||
// Explicit command-line password sources win. A configured vault beats
|
||||
// LESSPASS_MASTER_PASSWORD because profiles are meant to be complete
|
||||
// saved identities, including the master source.
|
||||
vaultPath := vaultFlag
|
||||
if vaultPath == "" {
|
||||
_, envSet := os.LookupEnv(environmentVariable)
|
||||
if !envSet && !forcePrompt && len(positional) < 3 {
|
||||
if !forcePrompt && len(positional) < 3 {
|
||||
switch {
|
||||
case profile.Vault != "":
|
||||
vaultPath = expandHome(profile.Vault)
|
||||
@@ -283,13 +289,14 @@ func masterPassword(positional []string, forcePrompt bool, vaultPath string) (st
|
||||
|
||||
func printHelp(output io.Writer) {
|
||||
fmt.Fprintln(output, `Usage: pass [OPTIONS] SITE LOGIN [MASTER_PASSWORD]
|
||||
pass [OPTIONS] PROFILE SITE
|
||||
|
||||
Derive a site-specific password. If MASTER_PASSWORD is omitted, pass reads
|
||||
LESSPASS_MASTER_PASSWORD or asks for it on the controlling terminal. With
|
||||
--vault it instead decrypts an OpenSSL-encrypted vault and uses its contents
|
||||
as the master password. With --profile, a named profile from the
|
||||
configuration file supplies the login and default settings and only SITE is
|
||||
passed on the command line.
|
||||
as the master password. A named profile from the configuration file can be
|
||||
used either as "pass PROFILE SITE" or with --profile; it supplies the login
|
||||
and default settings.
|
||||
|
||||
Options:
|
||||
-L, --length N password length (default 16)
|
||||
|
||||
@@ -32,7 +32,6 @@ func withVaultPassphrase(t *testing.T, passphrase string) {
|
||||
|
||||
func TestRunWithProfileSettings(t *testing.T) {
|
||||
withConfig(t, `{
|
||||
"vault": "/nonexistent/vault",
|
||||
"copy": true,
|
||||
"clear_after": "90s",
|
||||
"profiles": {
|
||||
@@ -56,6 +55,29 @@ func TestRunWithProfileSettings(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRunWithProfileShorthand(t *testing.T) {
|
||||
withConfig(t, `{
|
||||
"profiles": {
|
||||
"w": {"login": "alice", "counter": 9, "length": 23, "symbols": false}
|
||||
}
|
||||
}`)
|
||||
t.Setenv(environmentVariable, "correct horse battery staple")
|
||||
var output, diagnostics bytes.Buffer
|
||||
err := run([]string{"w", "example.com", "--no-copy"}, &output, &diagnostics)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
want, err := password.Generate("example.com", "alice", "correct horse battery staple", password.Options{
|
||||
Length: 23, Counter: 9, Lowercase: true, Uppercase: true, Digits: true, Symbols: false,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := strings.TrimSpace(output.String()); got != want {
|
||||
t.Fatalf("output = %q, want %q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestProfileSettingsDoNotOverrideExplicitFlags(t *testing.T) {
|
||||
withConfig(t, `{"profiles": {"w": {"login": "alice", "length": 23, "symbols": false}}}`)
|
||||
t.Setenv(environmentVariable, "correct horse battery staple")
|
||||
@@ -158,9 +180,10 @@ func TestConfigVaultIsUsedForProfile(t *testing.T) {
|
||||
|
||||
withConfig(t, `{"vault": "`+vaultFile+`", "profiles": {"w": {"login": "alice"}}}`)
|
||||
withVaultPassphrase(t, "masterpw")
|
||||
t.Setenv(environmentVariable, "environment-must-be-ignored")
|
||||
|
||||
var output, diagnostics bytes.Buffer
|
||||
if err := run([]string{"-P", "w", "--no-copy", "example.com"}, &output, &diagnostics); err != nil {
|
||||
if err := run([]string{"w", "example.com", "--no-copy"}, &output, &diagnostics); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
want, err := password.Generate("example.com", "alice", "cfg-secret", password.DefaultOptions())
|
||||
|
||||
+34
-2
@@ -12,12 +12,43 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
def keystorePropsFile = rootProject.file("local.properties")
|
||||
def keystoreProps = new Properties()
|
||||
if (keystorePropsFile.exists()) {
|
||||
keystoreProps.load(new FileInputStream(keystorePropsFile))
|
||||
}
|
||||
|
||||
def getKeystorePath = { -> project.findProperty('keystore.path') ?: keystoreProps['keystore.path'] ?: System.getenv("HOME") + "/.android/pass-release.keystore" }
|
||||
def getKeystoreAlias = { -> project.findProperty('keystore.alias') ?: keystoreProps['keystore.alias'] ?: "pass-key" }
|
||||
|
||||
def releasePassword = project.findProperty('keystore.password') ?: ""
|
||||
|
||||
def releaseKeystorePath = getKeystorePath()
|
||||
def releaseKeystore = releaseKeystorePath ? file(releaseKeystorePath) : null
|
||||
// Sign release builds only when a keystore is actually available: CI and
|
||||
// local release builds pass -Pkeystore.* properties, while clean checkouts
|
||||
// (for example an F-Droid builder) produce an unsigned APK instead.
|
||||
def signRelease = !project.hasProperty('fDroidBuild') \
|
||||
&& releaseKeystore != null && releaseKeystore.exists() \
|
||||
&& releasePassword != ""
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
if (signRelease) {
|
||||
storeFile releaseKeystore
|
||||
storePassword releasePassword
|
||||
keyAlias getKeystoreAlias()
|
||||
keyPassword releasePassword
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId 'xyz.waozi.pass'
|
||||
minSdk 21
|
||||
targetSdk 36
|
||||
versionCode 2
|
||||
versionName "0.2.1"
|
||||
versionCode 4
|
||||
versionName "0.2.3"
|
||||
// Default to the two realistic phone targets; override with
|
||||
// -Pabi=x86_64 etc. for emulator builds.
|
||||
def abis = project.findProperty('abi') ?: 'armeabi-v7a,arm64-v8a'
|
||||
@@ -28,6 +59,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signRelease ? signingConfigs.release : null
|
||||
minifyEnabled false
|
||||
}
|
||||
debug {
|
||||
|
||||
@@ -26,11 +26,12 @@ list(FILTER KRYON_SOURCES EXCLUDE REGEX "${KRYON_DIR}/src/notification/.*")
|
||||
list(REMOVE_ITEM KRYON_SOURCES "${KRYON_DIR}/src/file_dialog/file_dialog.c")
|
||||
|
||||
set(PASS_FONT_ASSET "vendor/kryon/fonts/noto/NotoSans-Regular.ttf")
|
||||
set(PASS_EMOJI_FONT_ASSET "gui/assets/emoji.ttf")
|
||||
set(PASS_EMBEDDED_ASSETS_C "${CMAKE_BINARY_DIR}/pass_embedded_assets.c")
|
||||
add_custom_command(
|
||||
OUTPUT "${PASS_EMBEDDED_ASSETS_C}"
|
||||
COMMAND sh "${KRYON_DIR}/scripts/embed-assets.sh" "${PASS_EMBEDDED_ASSETS_C}" "${PASS_FONT_ASSET}"
|
||||
DEPENDS "${KRYON_DIR}/scripts/embed-assets.sh" "${KRYON_DIR}/fonts/noto/NotoSans-Regular.ttf"
|
||||
COMMAND sh "${KRYON_DIR}/scripts/embed-assets.sh" "${PASS_EMBEDDED_ASSETS_C}" "${PASS_FONT_ASSET}" "${PASS_EMOJI_FONT_ASSET}"
|
||||
DEPENDS "${KRYON_DIR}/scripts/embed-assets.sh" "${KRYON_DIR}/fonts/noto/NotoSans-Regular.ttf" "${REPO_ROOT}/${PASS_EMOJI_FONT_ASSET}"
|
||||
WORKING_DIRECTORY "${REPO_ROOT}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
@@ -254,6 +254,12 @@ android_bridge_biometric_available(void)
|
||||
return call_boolean_method("isBiometricAvailable");
|
||||
}
|
||||
|
||||
int
|
||||
android_bridge_biometric_setup_required(void)
|
||||
{
|
||||
return call_boolean_method("isBiometricSetupRequired");
|
||||
}
|
||||
|
||||
int
|
||||
android_bridge_master_saved(void)
|
||||
{
|
||||
@@ -474,6 +480,7 @@ int android_bridge_top_reserved(void) { return 0; }
|
||||
int android_bridge_bottom_reserved(void) { return 0; }
|
||||
void android_bridge_set_soft_keyboard(int visible) { (void)visible; }
|
||||
int android_bridge_biometric_available(void) { return 0; }
|
||||
int android_bridge_biometric_setup_required(void) { return 0; }
|
||||
int android_bridge_master_saved(void) { return 0; }
|
||||
int android_bridge_master_biometric(void) { return 0; }
|
||||
void android_bridge_save_master(const char *master, int require_biometric) { (void)master; (void)require_biometric; }
|
||||
|
||||
@@ -19,6 +19,7 @@ int android_bridge_bottom_reserved(void);
|
||||
void android_bridge_set_soft_keyboard(int visible);
|
||||
|
||||
int android_bridge_biometric_available(void);
|
||||
int android_bridge_biometric_setup_required(void);
|
||||
int android_bridge_master_saved(void);
|
||||
int android_bridge_master_biometric(void);
|
||||
void android_bridge_save_master(const char *master, int require_biometric);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "ui_dpi.h"
|
||||
#include "ui_core.h"
|
||||
#include "ui_scaling.h"
|
||||
#include "ui_text.h"
|
||||
|
||||
#include "android_bridge.h"
|
||||
#include "pass_app.h"
|
||||
@@ -20,6 +21,7 @@
|
||||
#endif
|
||||
|
||||
static const char *const FONT_ASSET_PATH = "vendor/kryon/fonts/noto/NotoSans-Regular.ttf";
|
||||
static const char *const EMOJI_FONT_ASSET_PATH = "gui/assets/emoji.ttf";
|
||||
|
||||
/* Kryon's shape drawing rides on a 1x1 white texture so rectangles tint
|
||||
* cleanly on the GL ES surface (same setup inbe performs on Android). */
|
||||
@@ -57,6 +59,25 @@ setup_ui_font(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
setup_emoji_font(void)
|
||||
{
|
||||
const EmbeddedAsset *asset = GetEmbeddedAsset(EMOJI_FONT_ASSET_PATH);
|
||||
int codepoint_count = 0;
|
||||
const int *codepoints = pass_app_master_emoji_codepoints(&codepoint_count);
|
||||
|
||||
if(asset == NULL || asset->data == NULL || asset->size == 0) {
|
||||
TraceLog(LOG_WARNING, "PASS: missing embedded emoji font asset");
|
||||
return 0;
|
||||
}
|
||||
if(!RegisterUIFixedFontSource("pass-emoji", GetEmbeddedAssetExtension(EMOJI_FONT_ASSET_PATH),
|
||||
asset->data, asset->size, codepoints, codepoint_count)) {
|
||||
TraceLog(LOG_WARNING, "PASS: RegisterUIFixedFontSource failed for emoji");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@@ -84,6 +105,7 @@ main(int argc, char **argv)
|
||||
SetThemeSource(THEME_SOURCE_SYSTEM);
|
||||
SetThemeMode(THEME_MODE_SYSTEM);
|
||||
setup_ui_font();
|
||||
setup_emoji_font();
|
||||
setup_shapes_texture();
|
||||
SetUITextInputPlatformCallback(android_bridge_set_soft_keyboard);
|
||||
SetTargetFPS(60);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "ui_nav.h"
|
||||
#include "ui_scroll.h"
|
||||
#include "ui_scaling.h"
|
||||
#include "ui_text.h"
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -20,6 +21,7 @@
|
||||
|
||||
#define CLIPBOARD_LIFETIME_MS 20000
|
||||
#define MAX_PROFILES 32
|
||||
#define MASTER_EMOJI_COUNT 4
|
||||
|
||||
typedef enum {
|
||||
VIEW_GENERATE = 0,
|
||||
@@ -54,6 +56,26 @@ typedef struct {
|
||||
int use_biometric;
|
||||
} AppSettings;
|
||||
|
||||
static const int master_emoji_codepoints[] = {
|
||||
0x1F436, 0x1F431, 0x1F42D, 0x1F439, 0x1F430, 0x1F98A, 0x1F43B, 0x1F43C,
|
||||
0x1F428, 0x1F42F, 0x1F981, 0x1F42E, 0x1F437, 0x1F438, 0x1F435, 0x1F414,
|
||||
0x1F427, 0x1F989, 0x1F43A, 0x1F434, 0x1F984, 0x1F41D, 0x1F98B, 0x1F422,
|
||||
0x1F34E, 0x1F34A, 0x1F34B, 0x1F349, 0x1F347, 0x1F353, 0x1F352, 0x1F351,
|
||||
0x1F951, 0x1F33D, 0x1F355, 0x1F354, 0x1F35F, 0x1F369,
|
||||
0x1F335, 0x1F332, 0x1F333, 0x1F334, 0x1F331, 0x1F33B, 0x1F338, 0x1F308,
|
||||
0x2B50, 0x1F319,
|
||||
0x1F525, 0x1F4A7, 0x26C4, 0x1F389, 0x1F3B8, 0x1F3AF, 0x1F3B2, 0x1F381,
|
||||
0x1F680, 0x1F697, 0x2693, 0x1F3A8, 0x1F511, 0x1F4A1, 0x1F4DA, 0x1F3A7,
|
||||
};
|
||||
|
||||
const int *
|
||||
pass_app_master_emoji_codepoints(int *count)
|
||||
{
|
||||
if(count != NULL)
|
||||
*count = (int)(sizeof(master_emoji_codepoints) / sizeof(master_emoji_codepoints[0]));
|
||||
return master_emoji_codepoints;
|
||||
}
|
||||
|
||||
static void
|
||||
field_init(Field *f, int focus_id, int capacity_codepoints)
|
||||
{
|
||||
@@ -688,18 +710,53 @@ draw_bottom_nav(PassApp *a, int view_w_px, int view_h_px, int bottom_margin_px)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
fingerprint_text(const char *master, char *out, size_t out_size)
|
||||
static size_t
|
||||
append_utf8(char *out, size_t used, size_t out_size, uint32_t codepoint)
|
||||
{
|
||||
uint32_t h = 2166136261u;
|
||||
const unsigned char *p = (const unsigned char *)master;
|
||||
|
||||
while(p != NULL && *p != '\0') {
|
||||
h ^= *p++;
|
||||
h *= 16777619u;
|
||||
if(out == NULL || out_size == 0)
|
||||
return used;
|
||||
if(codepoint <= 0x7fu) {
|
||||
if(used + 1 >= out_size)
|
||||
return used;
|
||||
out[used++] = (char)codepoint;
|
||||
} else if(codepoint <= 0x7ffu) {
|
||||
if(used + 2 >= out_size)
|
||||
return used;
|
||||
out[used++] = (char)(0xc0u | (codepoint >> 6));
|
||||
out[used++] = (char)(0x80u | (codepoint & 0x3fu));
|
||||
} else if(codepoint <= 0xffffu) {
|
||||
if(used + 3 >= out_size)
|
||||
return used;
|
||||
out[used++] = (char)(0xe0u | (codepoint >> 12));
|
||||
out[used++] = (char)(0x80u | ((codepoint >> 6) & 0x3fu));
|
||||
out[used++] = (char)(0x80u | (codepoint & 0x3fu));
|
||||
} else {
|
||||
if(used + 4 >= out_size)
|
||||
return used;
|
||||
out[used++] = (char)(0xf0u | (codepoint >> 18));
|
||||
out[used++] = (char)(0x80u | ((codepoint >> 12) & 0x3fu));
|
||||
out[used++] = (char)(0x80u | ((codepoint >> 6) & 0x3fu));
|
||||
out[used++] = (char)(0x80u | (codepoint & 0x3fu));
|
||||
}
|
||||
snprintf(out, out_size, "Fingerprint %02X %02X %02X %02X",
|
||||
(h >> 24) & 0xff, (h >> 16) & 0xff, (h >> 8) & 0xff, h & 0xff);
|
||||
out[used] = '\0';
|
||||
return used;
|
||||
}
|
||||
|
||||
static void
|
||||
fingerprint_emoji(const char *master, char *out, size_t out_size)
|
||||
{
|
||||
uint8_t sum[32];
|
||||
size_t used = 0;
|
||||
int table_count;
|
||||
const int *table = pass_app_master_emoji_codepoints(&table_count);
|
||||
int i;
|
||||
|
||||
if(out == NULL || out_size == 0)
|
||||
return;
|
||||
out[0] = '\0';
|
||||
pass_sha256(master != NULL ? master : "", master != NULL ? strlen(master) : 0, sum);
|
||||
for(i = 0; i < MASTER_EMOJI_COUNT && table_count > 0; i++)
|
||||
used = append_utf8(out, used, out_size, (uint32_t)table[sum[i] % table_count]);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -711,8 +768,6 @@ draw_generate_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
int x = 0;
|
||||
int half_w = (inner_w - 12) / 2;
|
||||
|
||||
label_text_px("PASSWORD DETAILS", cx, cy + ScaleUIPx(y), 12, scheme.primary);
|
||||
y += 20;
|
||||
label_text_px("Site", cx, cy + ScaleUIPx(y), 14, text);
|
||||
draw_field(&a->site, (Rectangle){(float)cx, (float)(cy + ScaleUIPx(y + 22)), (float)ScaleUIPx(inner_w), (float)ScaleUIPx(38)}, 16, style);
|
||||
y += 66;
|
||||
@@ -732,13 +787,16 @@ draw_generate_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
y += 64;
|
||||
if(a->settings.show_fingerprint && a->master.buffer[0] != '\0') {
|
||||
char fp[64];
|
||||
fingerprint_text(a->master.buffer, fp, sizeof(fp));
|
||||
label_text_px(fp, cx, cy + ScaleUIPx(y), 12, scheme.on_surface_variant);
|
||||
y += 22;
|
||||
int font_token;
|
||||
|
||||
fingerprint_emoji(a->master.buffer, fp, sizeof(fp));
|
||||
font_token = PushUIFont("pass-emoji");
|
||||
label_text_px(fp, cx, cy + ScaleUIPx(y), 20, scheme.on_surface_variant);
|
||||
PopUIFont(font_token);
|
||||
y += 30;
|
||||
}
|
||||
|
||||
label_text_px("PASSWORD RULES", cx, cy + ScaleUIPx(y), 12, scheme.primary);
|
||||
y += 18;
|
||||
y += 6;
|
||||
label_text_px("Length", cx, cy + ScaleUIPx(y), 14, text);
|
||||
{
|
||||
SpinboxProps props;
|
||||
@@ -878,7 +936,10 @@ draw_settings_page(PassApp *a, int cx, int cy, int inner_w, int y)
|
||||
checkbox(cx, cy + ScaleUIPx(y), "Require biometric unlock", &a->settings.use_biometric);
|
||||
y += 42;
|
||||
if(!android_bridge_biometric_available())
|
||||
label_text_px("Biometric unlock is not available on this device", cx, cy + ScaleUIPx(y), 12, scheme.on_surface_variant);
|
||||
label_text_px(android_bridge_biometric_setup_required()
|
||||
? "Set up Android screen lock and fingerprint first"
|
||||
: "Biometric unlock is not available on this device",
|
||||
cx, cy + ScaleUIPx(y), 12, scheme.on_surface_variant);
|
||||
else if(android_bridge_master_saved())
|
||||
label_text_px(android_bridge_master_biometric() ? "Saved master uses biometric unlock" : "Saved master unlocks without biometric",
|
||||
cx, cy + ScaleUIPx(y), 12, scheme.on_surface_variant);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
typedef struct PassApp PassApp;
|
||||
|
||||
PassApp *pass_app(void);
|
||||
const int *pass_app_master_emoji_codepoints(int *count);
|
||||
|
||||
/* Draws one frame. Surface sizes are physical pixels; dpi is the display
|
||||
* scale. top/bottom_reserved are safe-area insets in UI units (dp). */
|
||||
|
||||
@@ -24,7 +24,6 @@ import android.content.Context;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.KeyStore;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
@@ -68,23 +67,21 @@ public class MainActivity extends NativeActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
applySystemBars();
|
||||
setupInsetsListener();
|
||||
}
|
||||
|
||||
public int[] systemThemeColors() {
|
||||
boolean dark = (getResources().getConfiguration().uiMode
|
||||
& Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
|
||||
int background = resolveThemeColor(android.R.attr.windowBackground,
|
||||
dark ? 0xFF141218 : 0xFFFFFBFE);
|
||||
int text = resolveThemeColor(android.R.attr.textColorPrimary,
|
||||
dark ? 0xFFE6E0E9 : 0xFF1D1B20);
|
||||
int background = dark ? 0xFF141218 : 0xFFFFFBFE;
|
||||
int surface = dark ? 0xFF211F26 : 0xFFF7F2FA;
|
||||
int text = dark ? 0xFFE6E0E9 : 0xFF1D1B20;
|
||||
int accent = resolveThemeColor(android.R.attr.colorAccent,
|
||||
dark ? 0xFFD0BCFF : 0xFF6750A4);
|
||||
int button = resolveThemeColor(android.R.attr.colorButtonNormal,
|
||||
dark ? 0xFF4A4458 : 0xFFE7E0EC);
|
||||
int control = resolveThemeColor(android.R.attr.colorControlNormal, text);
|
||||
int surface = blend(background, dark ? 0xFFFFFFFF : 0xFF000000, dark ? 12 : 4);
|
||||
int buttonHover = blend(accent, background, 35);
|
||||
int control = dark ? 0xFFE6E0E9 : 0xFF1D1B20;
|
||||
int button = blend(accent, background, dark ? 65 : 80);
|
||||
int buttonHover = blend(accent, background, dark ? 45 : 60);
|
||||
|
||||
return new int[] {
|
||||
dark ? 1 : 0,
|
||||
@@ -99,6 +96,28 @@ public class MainActivity extends NativeActivity {
|
||||
};
|
||||
}
|
||||
|
||||
private void applySystemBars() {
|
||||
int[] colors = systemThemeColors();
|
||||
boolean dark = colors[0] != 0;
|
||||
getWindow().setStatusBarColor(colors[1]);
|
||||
getWindow().setNavigationBarColor(colors[1]);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
int flags = getWindow().getDecorView().getSystemUiVisibility();
|
||||
if (!dark) {
|
||||
flags |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
flags |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
|
||||
}
|
||||
} else {
|
||||
flags &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
flags &= ~View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
|
||||
}
|
||||
}
|
||||
getWindow().getDecorView().setSystemUiVisibility(flags);
|
||||
}
|
||||
}
|
||||
|
||||
private int resolveThemeColor(int attr, int fallback) {
|
||||
TypedValue value = new TypedValue();
|
||||
if (!getTheme().resolveAttribute(attr, value, true)) {
|
||||
@@ -151,13 +170,29 @@ public class MainActivity extends NativeActivity {
|
||||
if (fm != null && fm.isHardwareDetected() && fm.hasEnrolledFingerprints()) return true;
|
||||
} catch (SecurityException ignored) {
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
KeyguardManager km = (KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE);
|
||||
return km != null && km.isDeviceSecure();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isBiometricSetupRequired() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) return false;
|
||||
try {
|
||||
FingerprintManager fm = (FingerprintManager)getSystemService(Context.FINGERPRINT_SERVICE);
|
||||
if (fm == null || !fm.isHardwareDetected()) return false;
|
||||
KeyguardManager km = (KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE);
|
||||
return !fm.hasEnrolledFingerprints() || km == null || !km.isDeviceSecure();
|
||||
} catch (SecurityException ignored) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private String biometricUnavailableMessage() {
|
||||
if (isBiometricSetupRequired()) {
|
||||
return "Set up Android screen lock and fingerprint first";
|
||||
}
|
||||
return "Biometric unlock is not available on this device";
|
||||
}
|
||||
|
||||
public int secureMasterStatus() {
|
||||
synchronized (secureLock) {
|
||||
return secureStatus;
|
||||
@@ -182,15 +217,18 @@ public class MainActivity extends NativeActivity {
|
||||
return;
|
||||
}
|
||||
if (requireBiometric && !isBiometricAvailable()) {
|
||||
setSecureError("Biometric unlock is not available");
|
||||
setSecureError(biometricUnavailableMessage());
|
||||
return;
|
||||
}
|
||||
try {
|
||||
byte[] iv = new byte[12];
|
||||
new SecureRandom().nextBytes(iv);
|
||||
Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, getOrCreateMasterKey(), new GCMParameterSpec(128, iv));
|
||||
cipher.init(Cipher.ENCRYPT_MODE, getOrCreateMasterKey());
|
||||
byte[] encrypted = cipher.doFinal(master.getBytes(StandardCharsets.UTF_8));
|
||||
byte[] iv = cipher.getIV();
|
||||
if (iv == null || iv.length == 0) {
|
||||
setSecureError("Save failed: missing encryption IV");
|
||||
return;
|
||||
}
|
||||
|
||||
SharedPreferences.Editor editor = getSharedPreferences(SECURE_PREFS, MODE_PRIVATE).edit();
|
||||
editor.putString(PREF_IV, b64(iv));
|
||||
@@ -224,7 +262,7 @@ public class MainActivity extends NativeActivity {
|
||||
|
||||
private void authenticateThenDecrypt() {
|
||||
if (!isBiometricAvailable()) {
|
||||
setSecureError("Biometric unlock is not available");
|
||||
setSecureError(biometricUnavailableMessage());
|
||||
return;
|
||||
}
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Initial release: deterministic, LessPass-compatible password generation with configurable length, counter, character classes, and excluded characters. Everything is computed locally; nothing is stored or uploaded.
|
||||
@@ -0,0 +1 @@
|
||||
New clipboard handling, vault support, and named profiles in the CLI, plus self-update checks in the desktop app. Android keeps the same local, stateless generator.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Install pass on Android: a signed APK is now downloadable from pass.waozi.xyz alongside the desktop, terminal, and browser downloads.
|
||||
- Fix the Android master-password fingerprint and secure storage so the stored master password unlocks reliably across launches.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Verify every download: releases now ship a SHA256SUMS file covering the command-line, desktop, Android, and browser downloads.
|
||||
- The Android app now builds entirely from source with no developer signing key, clearing the way for F-Droid distribution.
|
||||
@@ -0,0 +1,17 @@
|
||||
pass derives strong, repeatable passwords on your device. The same site, login, master password, and settings always produce the same result, so there is no password database to back up, sync, or lose.
|
||||
|
||||
Everything is computed locally. The app makes no network requests, keeps no accounts, and tracks nothing.
|
||||
|
||||
Features:
|
||||
|
||||
• Deterministic, LessPass-compatible password generation
|
||||
• Configurable length, counter, character classes, and excluded characters
|
||||
• Optional fingerprint unlock with the master password held in secure storage
|
||||
• No analytics, no tracking, no network access
|
||||
|
||||
pass is an independent implementation of the LessPass algorithm. Compatibility does not imply endorsement by or affiliation with the LessPass project.
|
||||
|
||||
Source code: https://github.com/waozixyz/pass
|
||||
Website: https://pass.waozi.xyz
|
||||
|
||||
Licensed under BSD-3-Clause.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 125 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 87 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
@@ -0,0 +1 @@
|
||||
Deterministic passwords from site, login, and one master password.
|
||||
@@ -0,0 +1 @@
|
||||
pass
|
||||
@@ -175,6 +175,12 @@ sha256(const void *data, size_t len, uint8_t out[32])
|
||||
sha256_final(&ctx, out);
|
||||
}
|
||||
|
||||
void
|
||||
pass_sha256(const void *data, size_t len, uint8_t out[32])
|
||||
{
|
||||
sha256(data, len, out);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* HMAC-SHA256 */
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
@@ -22,6 +22,10 @@ void pass_derive_key(const char *password, size_t password_len,
|
||||
const char *salt, size_t salt_len,
|
||||
uint8_t out[32]);
|
||||
|
||||
/* Computes SHA-256. Shared with UI code that must match the Go package's
|
||||
* master-password fingerprint derivation. */
|
||||
void pass_sha256(const void *data, size_t len, uint8_t out[32]);
|
||||
|
||||
/* Generates a LessPass-compatible password. Returns 0 on success and writes
|
||||
* the NUL-terminated password into out. Returns nonzero on invalid options
|
||||
* and writes the reason into err (English, matches the Go error strings). */
|
||||
|
||||
@@ -65,6 +65,26 @@ check_derive(int index, const char *password, const char *salt, const char *want
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
check_sha256(void)
|
||||
{
|
||||
uint8_t out[32];
|
||||
char hex[65];
|
||||
int i;
|
||||
|
||||
pass_sha256("correct horse battery staple", strlen("correct horse battery staple"), out);
|
||||
for(i = 0; i < 32; i++)
|
||||
sprintf(hex + i * 2, "%02x", out[i]);
|
||||
hex[64] = '\0';
|
||||
|
||||
if(strcmp(hex, "c4bbcb1fbec99d65bf59d85c8cb62ee2db963f0fe106f483d9afa73bd4e39a8a") != 0) {
|
||||
printf("FAIL sha256: got %s\n", hex);
|
||||
failures++;
|
||||
} else {
|
||||
printf("ok sha256: %s\n", hex);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
check_shape(void)
|
||||
{
|
||||
@@ -135,6 +155,7 @@ main(void)
|
||||
"0394a2ede332c9a13eb82e9b24631604c31df978b4e2f0fbd2c549944f9d79a5");
|
||||
check_derive(2, "", "examplealice1",
|
||||
"caa46554f5a676b76c15b368c655b0b24eaaad8595ef919999785c68e60fd5f5");
|
||||
check_sha256();
|
||||
|
||||
memset(&defaults, 0, sizeof(defaults));
|
||||
defaults.length = 16;
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
<launchable type="desktop-id">xyz.waozi.pass.desktop</launchable>
|
||||
<url type="homepage">https://github.com/waozixyz/pass</url>
|
||||
<provides><binary>pass-gui</binary></provides>
|
||||
<releases><release version="0.2.1" date="2026-08-19"/><release version="0.2.0" date="2026-08-18"/><release version="0.1.3" date="2026-08-17"/><release version="0.1.2" date="2026-08-17"/><release version="0.1.1" date="2026-08-17"/><release version="0.1.0" date="2026-08-17"/></releases>
|
||||
<releases><release version="0.2.3" date="2026-08-21"/><release version="0.2.2" date="2026-08-20"/><release version="0.2.1" date="2026-08-19"/><release version="0.2.0" date="2026-08-18"/><release version="0.1.3" date="2026-08-17"/><release version="0.1.2" date="2026-08-17"/><release version="0.1.1" date="2026-08-17"/><release version="0.1.0" date="2026-08-17"/></releases>
|
||||
</component>
|
||||
+55
-2
@@ -13,11 +13,64 @@ if [ -z "$release_date" ]; then
|
||||
fi
|
||||
|
||||
sed -E -i "s/^const Version = \"[^\"]+\"$/const Version = \"$release_version\"/" version.go
|
||||
sed -E -i "s/versionName \"[^\"]+\"/versionName \"$release_version\"/" droid/app/build.gradle
|
||||
|
||||
# Android versionName and versionCode: bump the code only when preparing a
|
||||
# different release, so rerunning this script for the same version is
|
||||
# idempotent.
|
||||
gradle_file=droid/app/build.gradle
|
||||
current_name=$(sed -n 's/.*versionName "\([^"]*\)".*/\1/p' "$gradle_file" | head -n 1)
|
||||
current_code=$(sed -n 's/^[[:space:]]*versionCode \([0-9][0-9]*\).*/\1/p' "$gradle_file" | head -n 1)
|
||||
if [ -z "$current_code" ]; then
|
||||
echo "Could not read versionCode from $gradle_file" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ "$current_name" = "$release_version" ]; then
|
||||
release_code=$current_code
|
||||
else
|
||||
release_code=$((current_code + 1))
|
||||
fi
|
||||
sed -E -i "s/versionName \"[^\"]+\"/versionName \"$release_version\"/" "$gradle_file"
|
||||
sed -E -i "s/^([[:space:]]*)versionCode [0-9]+/\1versionCode $release_code/" "$gradle_file"
|
||||
metainfo=packaging/linux/xyz.waozi.pass.appdata.xml
|
||||
if ! grep -F "<release version=\"$release_version\"" "$metainfo" >/dev/null; then
|
||||
sed -E -i "s#<releases>#<releases><release version=\"$release_version\" date=\"$release_date\"/>#" "$metainfo"
|
||||
fi
|
||||
grep -F "const Version = \"$release_version\"" version.go >/dev/null
|
||||
grep -F "versionName \"$release_version\"" droid/app/build.gradle >/dev/null
|
||||
grep -F "versionName \"$release_version\"" "$gradle_file" >/dev/null
|
||||
grep -E "^[[:space:]]*versionCode $release_code$" "$gradle_file" >/dev/null
|
||||
grep -F "<release version=\"$release_version\" date=\"$release_date\"" "$metainfo" >/dev/null
|
||||
|
||||
# Generate the Fastlane changelog for the Android versionCode being built.
|
||||
# Fastlane file names are versionCode values, not changelog positions, and
|
||||
# store listings cap changelogs at 500 characters.
|
||||
changelog_dir=fastlane/metadata/android/en-US/changelogs
|
||||
mkdir -p "$changelog_dir"
|
||||
changelog=$(awk -v ver="$release_version" '
|
||||
BEGIN { in_section = 0; buf = "" }
|
||||
/^## \[/ {
|
||||
if (in_section) exit
|
||||
if (index($0, "[" ver "]") > 0) {
|
||||
in_section = 1
|
||||
next
|
||||
}
|
||||
}
|
||||
in_section {
|
||||
if ($0 == "") next
|
||||
if (/^- /) {
|
||||
if (buf != "") print buf
|
||||
buf = $0
|
||||
next
|
||||
}
|
||||
if (buf != "") {
|
||||
line = $0
|
||||
sub(/^[ \t]+/, "", line)
|
||||
buf = buf " " line
|
||||
}
|
||||
}
|
||||
END { if (buf != "") print buf }
|
||||
' CHANGELOG.md)
|
||||
if [ -z "$changelog" ]; then
|
||||
echo "No changelog bullets found for $release_version in CHANGELOG.md" >&2
|
||||
exit 1
|
||||
fi
|
||||
printf '%s\n' "$changelog" | head -c 500 > "$changelog_dir/$release_code.txt"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package pass
|
||||
|
||||
// Version is the current application version.
|
||||
const Version = "0.2.1"
|
||||
const Version = "0.2.3"
|
||||
@@ -6,3 +6,4 @@
|
||||
/downloads/pass-cli-windows-arm64.zip https://github.com/waozixyz/pass/releases/latest/download/pass-cli-windows-arm64.zip 302
|
||||
/downloads/pass-gui-linux-amd64.tar.gz https://github.com/waozixyz/pass/releases/latest/download/pass-gui-linux-amd64.tar.gz 302
|
||||
/downloads/pass-gui-linux-arm64.tar.gz https://github.com/waozixyz/pass/releases/latest/download/pass-gui-linux-arm64.tar.gz 302
|
||||
/downloads/pass-android.apk https://github.com/waozixyz/pass/releases/latest/download/pass-android.apk 302
|
||||
@@ -27,6 +27,7 @@
|
||||
</div><div class="privacy-line">No network requests. No password database.</div></div></div>
|
||||
</section>
|
||||
<section id="downloads"><p class="eyebrow">DOWNLOADS</p><h2>Choose your interface</h2><div class="cards">
|
||||
<article><span class="tag">ANDROID</span><h3>APK</h3><p>Native Android app with the same generator and biometric-protected master password storage.</p><div class="links"><a href="/downloads/pass-android.apk">Download APK</a></div></article>
|
||||
<article><span class="tag">DESKTOP</span><h3>GUI</h3><p>Visual controls, secure masked input, and clipboard clearing.</p><div class="links"><a href="/downloads/pass-gui-linux-amd64.tar.gz">Linux x86_64</a><a href="/downloads/pass-gui-linux-arm64.tar.gz">Linux ARM64</a></div></article>
|
||||
<article><span class="tag">TERMINAL</span><h3>CLI</h3><p>Small, scriptable binaries for servers and workstations.</p><div class="links"><a href="/downloads/pass-cli-linux-amd64.tar.gz">Linux</a><a href="/downloads/pass-cli-darwin-arm64.tar.gz">macOS</a><a href="/downloads/pass-cli-windows-amd64.zip">Windows</a></div></article>
|
||||
<article><span class="tag">BROWSER</span><h3>Web app</h3><p>The same Go generator compiled to WebAssembly. Runs entirely in your tab.</p><div class="links"><a href="/app/">Open web app</a></div></article>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
:root{--bg:#f3f1ea;--surface:#fdfcf8;--control:#eae6da;--control-hi:#fff;--ink:#2a3b40;--muted:#5d6f74;--line:rgba(42,59,64,.20);--line-strong:rgba(42,59,64,.30);--accent:#65558f;--accent-deep:#433668;--accent-soft:rgba(101,85,143,.10);--card:#f7f4ec;--radius:10px;--radius-sm:6px;--maxw:1080px;--font:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;--bevel:0 1px 0 var(--control-hi),inset 1px 1px 0 var(--control-hi),0 2px 10px rgba(0,0,0,.04)}
|
||||
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:72px}body{margin:0;min-height:100vh;background:var(--bg);color:var(--ink);font:15px/1.6 var(--font);-webkit-font-smoothing:antialiased}body:before{content:"";position:fixed;inset:0;z-index:-1;background-image:linear-gradient(45deg,rgba(42,59,64,.028) 25%,transparent 25%),linear-gradient(-45deg,rgba(42,59,64,.028) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(42,59,64,.028) 75%),linear-gradient(-45deg,transparent 75%,rgba(42,59,64,.028) 75%);background-position:0 0,0 16px,16px -16px,-16px 0;background-size:32px 32px;opacity:.18}a{color:var(--accent);font-weight:700;text-decoration:none}a:hover{color:var(--accent-deep)}a:active,.button:active{position:relative;top:1px;left:1px}.site-header{position:sticky;top:0;z-index:50;background:rgba(243,241,234,.92);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}.site-header-inner{max-width:var(--maxw);margin:auto;padding:10px 20px;display:flex;align-items:center;gap:16px}.brand{display:flex;align-items:center;gap:8px;color:var(--ink);font-size:15px;letter-spacing:.04em}.brand img{width:22px;height:22px;border-radius:5px;image-rendering:pixelated}.header-nav{display:flex;align-items:center;gap:18px;margin-left:auto}.header-nav>a,.header-nav span{color:var(--muted);font-size:13px}.header-nav .button{color:#fffdf8}.button,button.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 14px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--control);box-shadow:var(--bevel);color:var(--ink);font:700 13px var(--font);cursor:pointer}.button:hover{background:var(--surface);color:var(--accent)}.button.primary,.header-nav .button{background:var(--accent);border-color:var(--accent-deep);color:#fff}.button.secondary{background:var(--control)}.button.ghost{background:transparent}.button.small{padding:7px 12px}button:disabled{opacity:.45;cursor:not-allowed}
|
||||
.hero{max-width:var(--maxw);min-height:calc(100vh - 64px);margin:auto;padding:48px 20px 40px;display:grid;grid-template-columns:minmax(0,.9fr) minmax(360px,.8fr);gap:44px;align-items:center}.hero-icon{width:96px;height:96px;margin:4px 0 0;border:1px solid var(--line-strong);border-radius:8px;box-shadow:var(--bevel);image-rendering:pixelated}.eyebrow{display:flex;align-items:center;gap:8px;margin:0 0 12px;color:var(--accent);font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.eyebrow:before{content:"";width:8px;height:8px;background:var(--accent);border:1px solid var(--accent-deep);border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,.12)}h1,h2,h3{margin:0;color:var(--ink);line-height:1.15}h1{margin:14px 0 16px;font-size:clamp(42px,7vw,74px);line-height:.98}h1 span{color:var(--accent)}h2{margin-bottom:16px;font-size:clamp(26px,4vw,40px)}h3{font-size:16px}.lede{max-width:700px;color:var(--muted);font-size:17px}.actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}.preview,.generator-card{overflow:hidden;background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--radius);box-shadow:0 1px 0 var(--control-hi),inset 1px 1px 0 var(--control-hi),0 18px 46px rgba(0,0,0,.10)}.preview-head{display:flex;align-items:center;gap:8px;padding:10px 12px;background:var(--control);border-bottom:1px solid var(--line)}.preview-head i{width:10px;height:10px;background:var(--accent);border:1px solid var(--accent-deep);border-radius:3px}.preview-head span{margin-left:6px;color:var(--muted);font-size:12px}.preview-body{padding:16px}.generator-card>label{display:block;margin:12px 0 6px;color:var(--muted);font-size:13px}output{padding:12px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-sm);box-shadow:var(--bevel)}.privacy-line{margin-top:16px;color:var(--muted);font-size:12px}
|
||||
main>section:not(.hero){max-width:var(--maxw);margin:0 auto;padding:56px 20px}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.cards article,.privacy{padding:16px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-sm);box-shadow:var(--bevel)}.cards h3{margin:8px 0}.cards p,.privacy p{color:var(--muted);font-size:14px}.tag{color:var(--accent);font-size:12px;font-weight:700}.links{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}footer{max-width:var(--maxw);margin:auto;padding:16px 20px 28px;text-align:center;color:var(--muted);font-size:13px}.generator-shell{max-width:820px;margin:48px auto;padding:0 20px}.generator-card{padding:24px}.generator-card h1{font-size:clamp(34px,6vw,52px)}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.form-grid label,fieldset legend{color:var(--muted);font-size:13px}.form-grid input:not([type=checkbox]){display:block;width:100%;margin-top:7px;padding:11px 12px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-sm);color:var(--ink);font:inherit;outline:none}.form-grid input:focus{border-color:var(--accent)}.wide{grid-column:1/-1}.password-wrap{display:flex;gap:8px}.password-wrap input{flex:1}.inline{margin-top:7px;border:1px solid var(--line);background:var(--control);border-radius:var(--radius-sm);color:var(--ink);font:inherit;padding:0 12px}fieldset{display:flex;gap:20px;border:0;padding:0}fieldset legend{margin-bottom:10px}fieldset label{color:var(--ink)!important}output{display:block;min-height:68px;font-size:17px;overflow-wrap:anywhere}.status{min-height:20px;margin:0;color:var(--muted)}#runtime-status{font-size:12px}
|
||||
main>section:not(.hero){max-width:var(--maxw);margin:0 auto;padding:56px 20px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}.cards article,.privacy{padding:16px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-sm);box-shadow:var(--bevel)}.cards h3{margin:8px 0}.cards p,.privacy p{color:var(--muted);font-size:14px}.tag{color:var(--accent);font-size:12px;font-weight:700}.links{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}footer{max-width:var(--maxw);margin:auto;padding:16px 20px 28px;text-align:center;color:var(--muted);font-size:13px}.generator-shell{max-width:820px;margin:48px auto;padding:0 20px}.generator-card{padding:24px}.generator-card h1{font-size:clamp(34px,6vw,52px)}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.form-grid label,fieldset legend{color:var(--muted);font-size:13px}.form-grid input:not([type=checkbox]){display:block;width:100%;margin-top:7px;padding:11px 12px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-sm);color:var(--ink);font:inherit;outline:none}.form-grid input:focus{border-color:var(--accent)}.wide{grid-column:1/-1}.password-wrap{display:flex;gap:8px}.password-wrap input{flex:1}.inline{margin-top:7px;border:1px solid var(--line);background:var(--control);border-radius:var(--radius-sm);color:var(--ink);font:inherit;padding:0 12px}fieldset{display:flex;gap:20px;border:0;padding:0}fieldset legend{margin-bottom:10px}fieldset label{color:var(--ink)!important}output{display:block;min-height:68px;font-size:17px;overflow-wrap:anywhere}.status{min-height:20px;margin:0;color:var(--muted)}#runtime-status{font-size:12px}
|
||||
.preview .form-grid{grid-template-columns:1fr 1fr;gap:14px}.preview fieldset{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}.preview fieldset legend{grid-column:1/-1;margin-bottom:2px}.preview .actions{margin-top:0;gap:10px}.preview .actions .button{flex:1}.preview output{min-height:52px;font-size:15px}
|
||||
@media(max-width:760px){.header-nav>a:not(.button){display:none}.hero{grid-template-columns:1fr;min-height:0;gap:36px}.cards{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr 1fr}}@media(max-width:520px){.site-header-inner{padding:10px 14px}.hero,.generator-shell{padding-left:14px;padding-right:14px}.form-grid,.preview .form-grid{grid-template-columns:1fr}.wide{grid-column:1}fieldset{display:grid;grid-template-columns:1fr 1fr}.actions .button{flex:1}.generator-card{padding:18px}}
|
||||
Reference in new issue
Block a user