Skip to content

Build against local OpenSSL 1.0.2/PCRE1, add clipboard support (-c) - #148

Open
isghe wants to merge 2 commits into
samr7:masterfrom
isghe:isghe_development
Open

Build against local OpenSSL 1.0.2/PCRE1, add clipboard support (-c)#148
isghe wants to merge 2 commits into
samr7:masterfrom
isghe:isghe_development

Conversation

@isghe

@isghe isghe commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • Point the Makefile at self-built OpenSSL 1.0.2/PCRE1 via overridable OPENSSL_PATH/PCRE_PATH variables, since this codebase targets the pre-1.1 transparent BIGNUM layout and the legacy PCRE1 API, neither available as a system package on current distros.
  • Add a -c flag that copies the generated private key to the clipboard instead of printing it, clearing it automatically after 45 seconds.
  • Clipboard copy prefers xclip when an X11 display is available, and falls back to the OSC 52 terminal escape sequence otherwise (e.g. plain SSH into a headless box, no X server needed) — reports which method was used in the output.

Test plan

  • make OPENSSL_PATH=... PCRE_PATH=... builds cleanly with no warnings
  • -c verified to copy via xclip when DISPLAY is set and reachable
  • -c verified to fall back to OSC 52 (checked via a real pty) when no X11 display is available, decoded the base64 payload to confirm it matches the generated private key

This code targets OpenSSL's pre-1.1 BIGNUM layout and the legacy PCRE1
API, neither of which is available as a system package anymore on
current distros. Rather than rewrite the BIGNUM handling for opaque
structs, point the Makefile at self-built OpenSSL 1.0.2u/PCRE 8.45 via
overridable OPENSSL_PATH/PCRE_PATH variables (defaulting under $HOME).

Also add -c, which copies the private key to the clipboard instead of
printing it, clearing the clipboard automatically after 45 seconds if
it still holds what we put there (same approach as pass). Prefers
xclip when an X11 display is available, and falls back to the OSC 52
terminal escape sequence otherwise (e.g. plain SSH into a headless
box, no X server needed), reporting which method was used. Falls back
to printing the key if no clipboard mechanism is available, so the key
is never lost.
@isghe
isghe force-pushed the isghe_development branch from 348e487 to 9478cd1 Compare August 8, 2026 16:44
Point at the exact upstream tarball URLs and their sha256 checksums so
the build dependencies can be fetched and verified without guesswork.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant