Skip to content

Instantly share code, notes, and snippets.

@agl
agl / test.c
Created Sep 13, 2014
VST forward issue.
View test.c
#include <stdint.h>
typedef int64_t limb;
typedef int32_t s32;
void product(limb out[19], const limb *a, const limb *b) {
s32 t1, t2;
t1 = a[0];
t2 = b[0];
@agl
agl / test1.v
Created Oct 4, 2014
VST forward issue (VST 1.5, Coq 8.4p4, CompCert 2.4)
View test1.v
Require Import Clightdefs.
Require Import floyd.proofauto.
Require Import Coq.ZArith.Zdiv.
Require Import compcert.common.Values.
Local Open Scope Z_scope.
Definition _b : ident := 32%positive.
Definition ___compcert_va_int64 : ident := 16%positive.
Definition ___builtin_fmadd : ident := 24%positive.
@agl
agl / gist:aac39429601667c588cc
Created Oct 4, 2014
1024-bit key, generated with OpenSSL, for purported factorisation.
View gist:aac39429601667c588cc
If anyone can publish the two, non-trivial factors of this number (where neither is 1!) then they'll have my attention:
0xe5c30e1286c41c7137dc06194199dde641120de591c1b7392de35ef6a961d6d29faa3bcdb7603d42768a90322197a7a46fa2cf23f6f10de5554db6e7322ba35e858f576f840347c795c8782c3f4ef9f530d2fd1f6b5c275ce49404958f0decddd0b53386d12c745891d5eeca1f265bdf87bfe258cc7999dd1b21c570dddf1b33
In standard form:
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDlww4ShsQccTfcBhlBmd3mQRIN
5ZHBtzkt4172qWHW0p+qO823YD1CdoqQMiGXp6Rvos8j9vEN5VVNtucyK6NehY9X
b4QDR8eVyHgsP0759TDS/R9rXCdc5JQElY8N7N3QtTOG0Sx0WJHV7sofJlvfh7/i
View NSS patch for cut-through.diff
diff --git a/mozilla/security/nss/lib/ssl/ssl.h b/mozilla/security/nss/lib/ssl/ssl.h
index 3026b48..94935a0 100644
--- a/mozilla/security/nss/lib/ssl/ssl.h
+++ b/mozilla/security/nss/lib/ssl/ssl.h
@@ -97,40 +97,42 @@ SSL_IMPORT PRFileDesc *SSL_ImportFD(PRFileDesc *model, PRFileDesc *fd);
#define SSL_ENABLE_SSL2 7 /* enable ssl v2 (on by default) */
#define SSL_ENABLE_SSL3 8 /* enable ssl v3 (on by default) */
#define SSL_NO_CACHE 9 /* don't use the session cache */
/* (off by default) */
#define SSL_REQUIRE_CERTIFICATE 10 /* (SSL_REQUIRE_FIRST_HANDSHAKE */
View gist:212066
diff --git a/mozilla/security/nss/cmd/selfserv/selfserv.c b/mozilla/security/nss/cmd/selfserv/selfserv.c
index 4c3d8e3..8e6acf8 100644
--- a/mozilla/security/nss/cmd/selfserv/selfserv.c
+++ b/mozilla/security/nss/cmd/selfserv/selfserv.c
@@ -200,6 +200,7 @@ Usage(const char *progName)
"-u means enable Session Ticket extension for TLS.\n"
"-v means verbose output\n"
"-x means use export policy.\n"
+"-z mean enable compression.\n"
"-L seconds means log statistics every 'seconds' seconds (default=30).\n"
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)
@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"
@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"
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"
You can’t perform that action at this time.