message: storing dirty privkey
This commit is contained in:
		
							parent
							
								
									9346b63bdd
								
							
						
					
					
						commit
						36cace8763
					
				| 
						 | 
					@ -86,8 +86,13 @@ int signed_msg::sign (const bvector&msg,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (r) return r;
 | 
						if (r) return r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	//make sure the modified privkey gets stored correctly
 | 
						if (privkey_dirty) {
 | 
				
			||||||
	//TODO
 | 
							kr.remove_privkey (key_id);
 | 
				
			||||||
 | 
							//this actually shouldn't fail, key_id is not present
 | 
				
			||||||
 | 
							kr.store_privkey (key_id, privkey);
 | 
				
			||||||
 | 
							//we can't output a signature without storing privkey changes
 | 
				
			||||||
 | 
							if (!kr.disk_sync() ) return 3;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue