Skip to content

Instantly share code, notes, and snippets.

@mozkeeler
mozkeeler / re-enable-certificate-and-key-generation.diff
Created April 15, 2020 20:14
re-enable-certificate-and-key-generation.diff
diff --git a/netwerk/test/unit/moz.build b/netwerk/test/unit/moz.build
--- a/netwerk/test/unit/moz.build
+++ b/netwerk/test/unit/moz.build
@@ -5,4 +5,4 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Temporarily disabled. See bug 1256495.
-#GeneratedTestCertificate('http2-ca.pem')
+GeneratedTestCertificate('http2-ca.pem')
diff --git a/security/manager/ssl/tests/mochitest/browser/moz.build b/security/manager/ssl/tests/mochitest/browser/moz.build
@mozkeeler
mozkeeler / fix-pycert.diff
Created April 15, 2020 20:11
fix-pycert.diff
diff --git a/security/manager/ssl/tests/unit/pycert.py b/security/manager/ssl/tests/unit/pycert.py
--- a/security/manager/ssl/tests/unit/pycert.py
+++ b/security/manager/ssl/tests/unit/pycert.py
@@ -661,7 +661,7 @@ class Certificate(object):
namedFeatures = {'OCSPMustStaple': 5}
featureList = [f.strip() for f in features.split(',')]
sequence = univ.Sequence()
- for feature in featureList:
+ for pos, feature in enumerate(featureList):
featureValue = 0
colorscheme ron
set expandtab
set tabstop=2
set shiftwidth=2
set autoindent
set scrolloff=5
hi ColorColumn guibg=#2d2d2d ctermbg=246
au BufNewFile,BufRead *.h set tw=80
au BufNewFile,BufRead *.h set colorcolumn=+1
au BufNewFile,BufRead *.cpp set tw=80
# HG changeset patch
# User Dana Keeler <dkeeler@mozilla.com>
# Date 1540589411 25200
# Fri Oct 26 14:30:11 2018 -0700
# Node ID 1e46bd8dc997145cc29c7e8465d1648eab52c84e
# Parent 5826b2352ac08248205d3b0e29587ab8ad415bfe
bug 1498909 - dynamically load libsecret at runtime if available r?franziskus,jcj
Summary:
Enough linux-based systems don't have libsecret that we can't make it a
# HG changeset patch
# User Dana Keeler <dkeeler@mozilla.com>
# Date 1545342385 28800
# Thu Dec 20 13:46:25 2018 -0800
# Node ID 3a62d515901fd328421178bb55998001e3d95294
# Parent 1e46bd8dc997145cc29c7e8465d1648eab52c84e
debug logging
diff --git a/security/manager/ssl/OSKeyStore.cpp b/security/manager/ssl/OSKeyStore.cpp
--- a/security/manager/ssl/OSKeyStore.cpp
@mozkeeler
mozkeeler / verify.js
Created October 31, 2018 17:12
verifying a certificate chain with xpcshell
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// How to run this file:
// 1. [obtain firefox source code]
// 2. [build/obtain firefox binaries]
// 3. run `[path to]/run-mozilla.sh [path to]/xpcshell \
// [path to]/verify.js \
// [path to]/chain.pem
-----BEGIN CERTIFICATE-----
MIIGOjCCBSKgAwIBAgIIGN2Hrh9Ltm0wDQYJKoZIhvcNAQEFBQAwgZUxCzAJBgNV
BAYTAkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2gg
SW5zdGl0dXRpb25zIENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMg
QWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTAe
Fw0xNDAxMDkxMjQ0MzlaFw0yMjAxMDcxMjQ0MzlaMIGQMQswCQYDVQQGEwJHUjFE
MEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0
aW9ucyBDZXJ0LiBBdXRob3JpdHkxOzA5BgNVBAMTMkFyaXN0b3RsZSBVbml2ZXJz
aXR5IG9mIFRoZXNzYWxvbmlraSBDZW50cmFsIENBIFI0MIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEAm/jPKZJhjmY5UuXhfw/hQTmQcmIDKf93D83zyeBy
@mozkeeler
mozkeeler / dumproots.js
Last active August 29, 2015 14:17
listing built-in roots
const { 'classes': Cc, 'interfaces': Ci } = Components;
let certdb = Cc["@mozilla.org/security/x509certdb;1"]
.getService(Ci.nsIX509CertDB);
let certs = certdb.getCerts();
let enumerator = certs.getEnumerator();
while (enumerator.hasMoreElements()) {
let cert = enumerator.getNext().QueryInterface(Ci.nsIX509Cert);
let sslTrust = certdb.isCertTrusted(cert, Ci.nsIX509Cert.CA_CERT,
Ci.nsIX509CertDB.TRUSTED_SSL);
@mozkeeler
mozkeeler / gist:7f07205bcd51606e2efa
Created March 17, 2015 21:09
logical fallacy cards
2: Argument from repetition
3: Kettle logic
4: Post hoc ergo propter hoc
5: Begging the question
6: Ad hominem
7: Ecological fallacy
8: Base rate fallacy
9: Masked man fallacy
10: Confirmation bias
J: Straw man
@mozkeeler
mozkeeler / keybase.md
Created October 20, 2014 20:11
Keybase proof

Keybase proof

I hereby claim:

  • I am mozkeeler on github.
  • I am mozkeeler (https://keybase.io/mozkeeler) on keybase.
  • I have a public key whose fingerprint is 93FE CDF9 E676 50C0 D144 DB25 D7FE 9490 B7DA 4288

To claim this, I am signing this object: