Skip to content

Instantly share code, notes, and snippets.

@FiloSottile
FiloSottile / gnupg21-pcsc-wrapper-hang.patch
Last active October 17, 2015 21:35
Tested on GnuPG 2.1.9. Fixes hang when using gpg-agent with YubiKeys on OS X. Port of https://github.com/GPGTools/MacGPG2/blob/6b5a3c/Formula/Patches/gnupg2/pcsc-wrapper.patch
--- a/scd/apdu.c 2015-10-17 22:25:39.000000000 +0100
+++ b/scd/apdu.c 2015-10-17 22:29:52.000000000 +0100
@@ -29,6 +29,7 @@
#include <string.h>
#include <assert.h>
#include <signal.h>
+#include <pthread.h>
#ifdef USE_NPTH
# include <unistd.h>
# include <fcntl.h>
➜ ~ openssl s_client -servername filippo.io -connect filosottile.github.io:443
CONNECTED(00000003)
depth=1 /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
0 s:/C=US/L=San Francisco/ST=California/O=Fastly, Inc./CN=www.github.com
i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
@FiloSottile
FiloSottile / serve-cert.go
Created April 6, 2015 03:36
A short Go program to serve arbitrary HTTPS certificates for testing
package main
import (
"log"
"net/http"
"os"
)
func handler(w http.ResponseWriter, req *http.Request) {
w.Header().Set("Content-Type", "text/plain")
@FiloSottile
FiloSottile / pass-rekey.sh
Last active August 29, 2015 14:13
password-store rekey script
#! /bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'
readonly PASSWORD_STORE=~/.password-store
relpath() {
python -c "import os.path; print os.path.relpath('$1','${2:-$PWD}')"
diff --git a/HPN-README b/HPN-README
new file mode 100644
index 0000000..7cb3b97
--- /dev/null
+++ b/HPN-README
@@ -0,0 +1,129 @@
+Notes:
+
+MULTI-THREADED CIPHER:
+The AES cipher in CTR mode has been multithreaded (MTR-AES-CTR). This will allow ssh installations
rrSets := map[uint16][]dns.RR{}
for _, rr := range r.Response.Answer {
rrtype := rr.Header().Rrtype
set, ok := rrSets[rrtype]
if !ok {
set = []dns.RR{}
}
rrSets[rrtype] = append(set, rr)
// Copyright 2014 CoudFlare. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package dns
import (
"reflect"
"testing"
)
require "formula"
class PinentryMac < Formula
head "https://github.com/GPGTools/pinentry-mac.git"
def install
system "make"
prefix.install "build/Release/pinentry-mac.app"
bin.write_exec_script "#{prefix}/pinentry-mac.app/Contents/MacOS/pinentry-mac"
end

Keybase proof

I hereby claim:

  • I am FiloSottile on github.
  • I am filippo (https://keybase.io/filippo) on keybase.
  • I have a public key whose fingerprint is 8CE7 D013 6ABE 132F EC03 D1C9 B8CC 58C5 1CAE A963

To claim this, I am signing this object:

--- a/globals.h 2009-08-25 21:08:52.000000000 +0200
+++ b/globals.h 2010-12-11 13:34:36.934682237 +0100
@@ -227,6 +227,9 @@
WHERE char *PgpSignAs;
WHERE short PgpTimeout;
WHERE char *PgpEntryFormat;
+/* custom patch */
+WHERE char *PgpMimeSignatureFilename;
+WHERE char *PgpMimeSignatureDescription;
WHERE char *PgpClearSignCommand;