@@ -50,10 +50,10 @@ def gen_CA(fname='ca-root', cn='ca-root', path_length=0, authority=None, pdir=DE
50
50
public_key = private_key .public_key ()
51
51
52
52
with open (os .path .join (pdir , fname + '.key' ), 'w' ) as fh :
53
- fh .write ( as_pem (private_key ) )
53
+ fh .write ( str ( as_pem (private_key ) ) )
54
54
55
55
with open (os .path .join (pdir , fname + '.unsigned' ), 'w' ) as fh :
56
- fh .write ( as_pem (public_key ) )
56
+ fh .write ( str ( as_pem (public_key ) ) )
57
57
58
58
ksec_100 = datetime .timedelta (0 , 100e3 , 0 )
59
59
Msec_300 = datetime .timedelta (0 , 300e6 , 0 )
@@ -115,7 +115,7 @@ def gen_CA(fname='ca-root', cn='ca-root', path_length=0, authority=None, pdir=DE
115
115
certificate = builder .sign (** signing_args )
116
116
117
117
with open (os .path .join (pdir , fname + '.crt' ), 'w' ) as fh :
118
- fh .write ( as_pem (certificate ) )
118
+ fh .write ( str ( as_pem (certificate ) ) )
119
119
120
120
return Authority (private_key , certificate )
121
121
@@ -127,10 +127,10 @@ def gen_leaf(authority, fname_template='{}', cn='Certy Cert McCertFace', pdir=DE
127
127
public_name = fname_template .format ('public' )
128
128
129
129
with open (os .path .join (pdir , private_name + '.key' ), 'w' ) as fh :
130
- fh .write ( as_pem (private_key ) )
130
+ fh .write ( str ( as_pem (private_key ) ) )
131
131
132
132
with open (os .path .join (pdir , public_name + '.unsigned' ), 'w' ) as fh :
133
- fh .write ( as_pem (public_key ) )
133
+ fh .write ( str ( as_pem (public_key ) ) )
134
134
135
135
ksec_100 = datetime .timedelta (0 , 100e3 , 0 )
136
136
Msec_300 = datetime .timedelta (0 , 300e6 , 0 )
@@ -187,7 +187,7 @@ def gen_leaf(authority, fname_template='{}', cn='Certy Cert McCertFace', pdir=DE
187
187
certificate = builder .sign (** signing_args )
188
188
189
189
with open (os .path .join (pdir , public_name + '.crt' ), 'w' ) as fh :
190
- fh .write ( as_pem (certificate ) )
190
+ fh .write ( str ( as_pem (certificate ) ) )
191
191
192
192
return Authority (private_key , certificate )
193
193
0 commit comments