Skip to content

Instantly share code, notes, and snippets.

@agl
agl / gist:876829
Created Mar 18, 2011
Proxy server for testing revocation
View gist:876829
package main
import (
"bufio"
"fmt"
"io"
"net"
"strings"
)
@agl
agl / webauthnRegistrationOptions.hs
Created Sep 12, 2019
WebAuthn Registration Options classification
View webauthnRegistrationOptions.hs
data Attachment = NoAttachment | Platform | CrossPlatform deriving (Show)
data ResidentKey = RKNotSpecified | RKDiscouraged | RKPreferred | RKRequired deriving (Show)
data UserVerification = UVDiscouraged | UVPreferred | UVRequired deriving (Show)
allCreateOptions = do
attachment <- [NoAttachment, Platform, CrossPlatform]
rk <- [RKNotSpecified, RKDiscouraged, RKPreferred, RKRequired]
uv <- [UVDiscouraged, UVPreferred, UVRequired]
return (attachment, rk, uv)
View dummy-https-proxy.go
package main
import (
"crypto/tls"
"fmt"
"net"
"os"
"bytes"
"io"
)
View keybase.md

Keybase proof

I hereby claim:

  • I am agl on github.
  • I am agl (https://keybase.io/agl) on keybase.
  • I have a public key whose fingerprint is C921 7238 4F38 7DBA ED4D 4201 65EB 9636 F02C 5704

To claim this, I am signing this object:

View cacerts.go
package main
import (
"crypto/x509"
"fmt"
"io/ioutil"
"sync"
"strconv"
)
View otr.patch
diff --git a/otr/otr.go b/otr/otr.go
index 0d18a60..ed560ed 100644
--- a/otr/otr.go
+++ b/otr/otr.go
@@ -12,20 +12,21 @@ import (
"crypto/cipher"
"crypto/dsa"
"crypto/hmac"
"crypto/rand"
"crypto/sha1"
@agl
agl / gen.go
Created Apr 15, 2012
GPG/X.509 certificates
View gen.go
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"crypto/rand"
"crypto/rsa"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
@agl
agl / goimports.go
Created Oct 17, 2010
Go program to generate a dot file from the packages. Run from src/pkg.
View goimports.go
package main
import (
"container/vector"
"fmt"
"go/ast"
"go/parser"
"go/token"
"io/ioutil"
"os"
View nss-ocsp.diff
diff --git a/mozilla/security/nss/lib/certhigh/ocsp.c b/mozilla/security/nss/lib/certhigh/ocsp.c
index 0ffdb34..4a225df 100644
--- a/mozilla/security/nss/lib/certhigh/ocsp.c
+++ b/mozilla/security/nss/lib/certhigh/ocsp.c
@@ -4797,6 +4797,112 @@ CERT_CheckOCSPStatus(CERTCertDBHandle *handle, CERTCertificate *cert,
}
/*
+ * FUNCTION: CERT_CacheOCSPResponseFromSideChannel
+ * First, this function caches the OCSP cache to see if a positive response
View nss-check-cert-in-shd.diff
diff --git a/mozilla/security/nss/lib/ssl/ssl3con.c b/mozilla/security/nss/lib/ssl/ssl3con.c
index 8d4b05d..414707e 100644
--- a/mozilla/security/nss/lib/ssl/ssl3con.c
+++ b/mozilla/security/nss/lib/ssl/ssl3con.c
@@ -5607,7 +5607,36 @@ ssl3_RestartHandshakeAfterCertReq(sslSocket * ss,
return rv;
}
+static SSL3AlertDescription
+ssl3_CertErrorToAlert(PRBool isTLS, int errCode)
You can’t perform that action at this time.