#NEWLINE# def write( self , password = None ) : #NEWLINE# #INDENT# bio = m2 . bio_new ( m2 . bio_s_mem ( ) ) #NEWLINE# if self . _hasPrivateKey : #NEWLINE# #INDENT# if password : #NEWLINE# #INDENT# def f( v ) : #NEWLINE# #INDENT# return password #NEWLINE# #UNINDENT# m2 . rsa_write_key ( self . rsa , bio , m2 . des_ede_cbc ( ) , f ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# def f( ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# m2 . rsa_write_key_no_cipher ( self . rsa , bio , f ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if password : #NEWLINE# #INDENT# raise AssertionError ( ) #NEWLINE# #UNINDENT# m2 . rsa_write_pub_key ( self . rsa , bio ) #NEWLINE# #UNINDENT# s = m2 . bio_read ( bio , m2 . bio_ctrl_pending ( bio ) ) #NEWLINE# m2 . bio_free ( bio ) #NEWLINE# return bio