Skip to content

Commit

Permalink
Add make target to extract TLS stanzas (#620)
Browse files Browse the repository at this point in the history
* Include program to extract all TLS presentation language stanzas from the source. Add extract-tls make target.

* Update Makefile

Co-authored-by: Richard Barnes <[email protected]>
  • Loading branch information
rohan-wire and bifurcation authored Mar 28, 2022
1 parent 1c6aa09 commit fb7657f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ endif

fix-insecure-links:
sed -i'.bak' -e 's/http:/https:/g' draft-ietf-mls-protocol.html

extract-tls:
cat draft-ietf-mls-protocol.md | python3 extract-tls.py > draft-ietf-mls-protocol.tls
15 changes: 15 additions & 0 deletions extract-tls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env python3
import sys
import re

match = False

for line in sys.stdin:
if match:
if re.match('^~~~$', line):
match = False
print ('')
else:
print (line.rstrip())
elif re.match('^~~~ tls$', line):
match = True

0 comments on commit fb7657f

Please sign in to comment.