shared_dynamic_cast -> dynamic_pointer_cast

This commit is contained in:
joerg 2013-03-02 18:15:39 +00:00
parent 523005d455
commit 9f598ce4cc
4 changed files with 94 additions and 1 deletions

View file

@ -1,5 +1,8 @@
$NetBSD: distinfo,v 1.48 2011/04/01 13:51:54 jmmv Exp $
$NetBSD: distinfo,v 1.49 2013/03/02 18:15:39 joerg Exp $
SHA1 (monotone-1.0.tar.bz2) = aac556bb26d92910b74b65450a0be6c5045e2052
RMD160 (monotone-1.0.tar.bz2) = 4c0813ae0c11f271dc88f42dd8814e474a67e988
Size (monotone-1.0.tar.bz2) = 3588074 bytes
SHA1 (patch-src_database.cc) = 7f8213917256c395d0cf994eb218647c3f44a63f
SHA1 (patch-src_key__store.cc) = 4225dff8f1533794c0390822c8e17795bf805b6a
SHA1 (patch-src_ssh__agent.cc) = 404c17a7c0194ee8185fa26f377112ae35fd1ca2

View file

@ -0,0 +1,30 @@
$NetBSD: patch-src_database.cc,v 1.1 2013/03/02 18:15:39 joerg Exp $
--- src/database.cc.orig 2011-03-26 06:40:58.000000000 +0000
+++ src/database.cc
@@ -92,7 +92,6 @@ using std::vector;
using std::accumulate;
using boost::shared_ptr;
-using boost::shared_dynamic_cast;
using boost::lexical_cast;
using boost::get;
using boost::tuple;
@@ -3431,7 +3430,7 @@ database::encrypt_rsa(key_id const & pub
shared_ptr<X509_PublicKey> x509_key(Botan::X509::load_key(pub_block));
shared_ptr<RSA_PublicKey> pub_key
- = shared_dynamic_cast<RSA_PublicKey>(x509_key);
+ = boost::dynamic_pointer_cast<RSA_PublicKey>(x509_key);
if (!pub_key)
throw recoverable_failure(origin::system,
"Failed to get RSA encrypting key");
@@ -3483,7 +3482,7 @@ database::check_signature(key_id const &
L(FL("building verifier for %d-byte pub key") % pub_block.size());
shared_ptr<X509_PublicKey> x509_key(Botan::X509::load_key(pub_block));
shared_ptr<RSA_PublicKey> pub_key
- = boost::shared_dynamic_cast<RSA_PublicKey>(x509_key);
+ = boost::dynamic_pointer_cast<RSA_PublicKey>(x509_key);
E(pub_key, id.inner().made_from,
F("Failed to get RSA verifying key for %s") % id);

View file

@ -0,0 +1,39 @@
$NetBSD: patch-src_key__store.cc,v 1.1 2013/03/02 18:15:39 joerg Exp $
--- src/key_store.cc.orig 2011-03-26 06:40:59.000000000 +0000
+++ src/key_store.cc
@@ -43,7 +43,6 @@ using std::vector;
using boost::scoped_ptr;
using boost::shared_ptr;
-using boost::shared_dynamic_cast;
using Botan::RSA_PrivateKey;
using Botan::RSA_PublicKey;
@@ -628,7 +627,7 @@ key_store_state::decrypt_private_key(key
I(pkcs8_key);
shared_ptr<RSA_PrivateKey> priv_key;
- priv_key = shared_dynamic_cast<RSA_PrivateKey>(pkcs8_key);
+ priv_key = boost::dynamic_pointer_cast<RSA_PrivateKey>(pkcs8_key);
E(priv_key, origin::no_fault,
F("failed to extract RSA private key from PKCS#8 keypair"));
@@ -862,7 +861,7 @@ key_store::make_signature(database & db,
L(FL("make_signature: building %d-byte pub key") % pub_block.size());
shared_ptr<X509_PublicKey> x509_key =
shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
- shared_ptr<RSA_PublicKey> pub_key = shared_dynamic_cast<RSA_PublicKey>(x509_key);
+ shared_ptr<RSA_PublicKey> pub_key = boost::dynamic_pointer_cast<RSA_PublicKey>(x509_key);
if (!pub_key)
throw recoverable_failure(origin::system,
@@ -1065,7 +1064,7 @@ key_store_state::migrate_old_key_pair
continue;
}
- priv_key = shared_dynamic_cast<RSA_PrivateKey>(pkcs8_key);
+ priv_key = boost::dynamic_pointer_cast<RSA_PrivateKey>(pkcs8_key);
I(priv_key);
// now we can write out the new key

View file

@ -0,0 +1,21 @@
$NetBSD: patch-src_ssh__agent.cc,v 1.1 2013/03/02 18:15:39 joerg Exp $
--- src/ssh_agent.cc.orig 2011-03-26 06:41:01.000000000 +0000
+++ src/ssh_agent.cc
@@ -32,7 +32,6 @@ using std::string;
using std::vector;
using boost::shared_ptr;
-using boost::shared_dynamic_cast;
using Botan::RSA_PublicKey;
using Botan::RSA_PrivateKey;
@@ -391,7 +390,7 @@ ssh_agent::has_key(const keypair & key)
L(FL("has_key: building %d-byte pub key") % pub_block.size());
shared_ptr<X509_PublicKey> x509_key =
shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
- shared_ptr<RSA_PublicKey> pub_key = shared_dynamic_cast<RSA_PublicKey>(x509_key);
+ shared_ptr<RSA_PublicKey> pub_key = boost::dynamic_pointer_cast<RSA_PublicKey>(x509_key);
if (!pub_key)
throw recoverable_failure(origin::system,