
On 11/04/2010 7:25 PM, Rob Riggs wrote:
On 04/11/2010 10:53 AM, Chad Seibert wrote:
Here's an example of boostified code, from one of the examples on the site. It's not too different from the original code (it's just commented out); this is because I don't want it to be a chore to port from Botan to Boost.Botan. Also, it is intuitively designed and I see no reason to change it. Of course, if it needs redesigning, we can discuss that afterwards ... //std::auto_ptr<PKCS8_PrivateKey> privkey(PKCS8::load_key(arg_ca_key, rng, arg_passphrase)); std::auto_ptr<boost::botan::pkcs8::private_key> privkey(pkcs8::load_key(arg_ca_key, rng, arg_passphrase)); Hi Chad,
Would it make sense to have privkey() return the private key by value? Is it non-copyable?
I think the reason is because a PKCS#8 key can be RSA/DSA or whatever else. I'd like to be able to hold keys by value but I'm not sure whether that is useful. I can't really see a need to copy keys around, but then again who knows? A Boostified Botan should consider this problem as Botan requires the use of lots of yucky pointers in places because of the polymorphism. -- Sohail Somani http://uint32t.blogspot.com