<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ct-sans, branch v0.0.2</title>
<subtitle>Research tool collecting SANs from CT logs</subtitle>
<id>https://git.rgdd.se/ct-sans/atom?h=v0.0.2</id>
<link rel='self' href='https://git.rgdd.se/ct-sans/atom?h=v0.0.2'/>
<link rel='alternate' type='text/html' href='https://git.rgdd.se/ct-sans/'/>
<updated>2023-03-23T12:24:02+00:00</updated>
<entry>
<title>Editorial edits</title>
<updated>2023-03-23T12:24:02+00:00</updated>
<author>
<name>Rasmus Dahlberg</name>
<email>rasmus@rgdd.se</email>
</author>
<published>2023-03-23T12:23:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rgdd.se/ct-sans/commit/?id=85182f9a1007c46979a8f3be4acf165b27444d04'/>
<id>urn:sha1:85182f9a1007c46979a8f3be4acf165b27444d04</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add proper README for the ct-sans tool only</title>
<updated>2023-03-23T12:15:06+00:00</updated>
<author>
<name>Rasmus Dahlberg</name>
<email>rasmus@rgdd.se</email>
</author>
<published>2023-03-23T12:15:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rgdd.se/ct-sans/commit/?id=9023b4e3fe70ada7d466589e753e69d13573c157'/>
<id>urn:sha1:9023b4e3fe70ada7d466589e753e69d13573c157</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Drop debug print</title>
<updated>2023-03-23T12:14:57+00:00</updated>
<author>
<name>Rasmus Dahlberg</name>
<email>rasmus@rgdd.se</email>
</author>
<published>2023-03-23T12:14:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rgdd.se/ct-sans/commit/?id=78764999509d7f9ef6380816ebfec1e5175d214e'/>
<id>urn:sha1:78764999509d7f9ef6380816ebfec1e5175d214e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Automate handling of notice file</title>
<updated>2023-03-23T10:58:16+00:00</updated>
<author>
<name>Rasmus Dahlberg</name>
<email>rasmus@rgdd.se</email>
</author>
<published>2023-03-23T10:09:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rgdd.se/ct-sans/commit/?id=ad9fb49670e28414637761bac4b8e8940e2d6770'/>
<id>urn:sha1:ad9fb49670e28414637761bac4b8e8940e2d6770</id>
<content type='text'>
Here's a hacky tool to migrate our ongoing v0.0.1 measurement once it's
done.  I.e., just split-up the NOTICE prints we have in collect.stdout,
putting them in per-log notice files that happens automatically now.

```
// Package main provides a hacky tool that extracts NOTICE: &lt;log desc&gt; prints
// from a file collect.stdout, putting them in the logs data directories as
// notice.txt.  Only meant to migrate away from v0.0.1 that did not store
// per-log notice files automatically, which makes things less error-prone.
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	logger "log"
	"os"
	"strings"

	"gitlab.torproject.org/rgdd/ct/pkg/metadata"
)

func main() {
	directory := "../data"
	logDirectory := fmt.Sprintf("%s/logs", directory)
	noticeFile := "../collect.stdout"

	b, err := os.ReadFile(fmt.Sprintf("%s/metadata.json", directory))
	if err != nil {
		logger.Fatal(err)
	}
	var md metadata.Metadata
	if err := json.Unmarshal(b, &amp;md); err != nil {
		logger.Fatal(err)
	}
	if b, err = os.ReadFile(noticeFile); err != nil {
		logger.Fatal(err)
	}

	lines := bytes.Split(b, []byte("\n"))
	for _, log := range logs(md) {
		id, _ := log.Key.ID()
		desc := *log.Description

		var notes []byte
		var numNotes int
		for _, line := range lines[:len(lines)-1] {
			if strings.Contains(string(line), fmt.Sprintf("NOTICE: %s", desc)) {
				notes = append(notes, line...)
				notes = append(notes, []byte("\n")...)
				numNotes += 1
			}
		}

		if len(notes) == 0 {
			logger.Printf("%s: no notices", desc)
			continue
		}

		logger.Printf("%s: %d notices", desc, numNotes)
		if err := os.WriteFile(fmt.Sprintf("%s/%x/notice.txt", logDirectory, id[:]), notes, 0644); err != nil {
			logger.Fatal(err)
		}
	}
}

func logs(md metadata.Metadata) (logs []metadata.Log) {
	for _, operators := range md.Operators {
		for _, log := range operators.Logs {
			if log.Description == nil {
				logger.Printf("WARNING: skipping log without description")
				continue
			}
			if log.State == nil {
				continue // skip logs with unknown states
			}
			if log.State.Name == metadata.LogStatePending {
				continue // pending logs do not count towards CT-compliance
			}
			if log.State.Name == metadata.LogStateRetired {
				continue // retired logs are not necessarily reachable
			}
			if log.State.Name == metadata.LogStateRejected {
				continue // rejected logs do not count towards CT-compliance
			}

			logs = append(logs, log)
		}
	}
	return
}
```
</content>
</entry>
<entry>
<title>Drop sanitize of SANs</title>
<updated>2023-03-23T09:05:48+00:00</updated>
<author>
<name>Rasmus Dahlberg</name>
<email>rasmus@rgdd.se</email>
</author>
<published>2023-03-23T09:05:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rgdd.se/ct-sans/commit/?id=38df474cf30b0b1d077c8d53b353a859af99c7d6'/>
<id>urn:sha1:38df474cf30b0b1d077c8d53b353a859af99c7d6</id>
<content type='text'>
Less complex, we will just pass lines to Go's HTTP GET as is.
</content>
</entry>
<entry>
<title>Change default to /tmp</title>
<updated>2023-03-20T18:57:56+00:00</updated>
<author>
<name>Rasmus Dahlberg</name>
<email>rasmus@rgdd.se</email>
</author>
<published>2023-03-20T18:57:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rgdd.se/ct-sans/commit/?id=2823c663a0d0845c2abcbcef76efca9af550ca75'/>
<id>urn:sha1:2823c663a0d0845c2abcbcef76efca9af550ca75</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add drafty assemble command</title>
<updated>2023-03-20T18:54:36+00:00</updated>
<author>
<name>Rasmus Dahlberg</name>
<email>rasmus@rgdd.se</email>
</author>
<published>2023-03-20T18:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rgdd.se/ct-sans/commit/?id=2bee2104c84628a68ef7124a1beefa4e1f98369e'/>
<id>urn:sha1:2bee2104c84628a68ef7124a1beefa4e1f98369e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fork code snippets to sanitize DNS names (ascii)</title>
<updated>2023-03-20T13:57:25+00:00</updated>
<author>
<name>Rasmus Dahlberg</name>
<email>rasmus@rgdd.se</email>
</author>
<published>2023-03-20T13:57:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rgdd.se/ct-sans/commit/?id=8e8cd8214d579e26e05dcb44fcd53d909e23879c'/>
<id>urn:sha1:8e8cd8214d579e26e05dcb44fcd53d909e23879c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Smaller default params</title>
<updated>2023-03-18T20:26:22+00:00</updated>
<author>
<name>Rasmus Dahlberg</name>
<email>rasmus@rgdd.se</email>
</author>
<published>2023-03-18T20:26:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rgdd.se/ct-sans/commit/?id=86e3a2a1ec6a7acdaf14a3d11ca47964ddc80d74'/>
<id>urn:sha1:86e3a2a1ec6a7acdaf14a3d11ca47964ddc80d74</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add notes from starting experiment</title>
<updated>2023-03-18T20:21:18+00:00</updated>
<author>
<name>Rasmus Dahlberg</name>
<email>rasmus@rgdd.se</email>
</author>
<published>2023-03-18T20:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rgdd.se/ct-sans/commit/?id=1869581015c98062acd321dbf8fdf7db187d50c2'/>
<id>urn:sha1:1869581015c98062acd321dbf8fdf7db187d50c2</id>
<content type='text'>
</content>
</entry>
</feed>
