Skip to content

Commit

Permalink
Removed unnecessary escape characters. Thanks @alex
Browse files Browse the repository at this point in the history
  • Loading branch information
ihamburglar committed Apr 25, 2015
1 parent 4ca59a1 commit 6b5d381
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/mk_simple_certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
cakey = createKeyPair(TYPE_RSA, 2048)
careq = createCertRequest(cakey, CN='Certificate Authority')
cacert = createCertificate(careq, (careq, cakey), 0, (0, 60*60*24*365*5)) # five years
print('Creating Certificate Authority private key in \"simple/CA.pkey\"')
print('Creating Certificate Authority private key in "simple/CA.pkey"')
open('simple/CA.pkey', 'w').write(crypto.dump_privatekey(crypto.FILETYPE_PEM, cakey))
print('Creating Certificate Authority certificate in \"simple/CA.cert\"')
print('Creating Certificate Authority certificate in "simple/CA.cert"')
open('simple/CA.cert', 'w').write(crypto.dump_certificate(crypto.FILETYPE_PEM, cacert))
for (fname, cname) in [('client', 'Simple Client'), ('server', 'Simple Server')]:
pkey = createKeyPair(TYPE_RSA, 2048)
req = createCertRequest(pkey, CN=cname)
cert = createCertificate(req, (cacert, cakey), 1, (0, 60*60*24*365*5)) # five years
print('Creating Certificate %s private key in \"simple/%s.pkey\"' % (fname, fname))
print('Creating Certificate %s private key in "simple/%s.pkey"' % (fname, fname))
open('simple/%s.pkey' % (fname,), 'w').write(crypto.dump_privatekey(crypto.FILETYPE_PEM, pkey))
print('Creating Certificate %s certificate in \"simple/%s.cert\"' % (fname, fname))
print('Creating Certificate %s certificate in "simple/%s.cert"' % (fname, fname))
open('simple/%s.cert' % (fname,), 'w').write(crypto.dump_certificate(crypto.FILETYPE_PEM, cert))

0 comments on commit 6b5d381

Please sign in to comment.