summaryrefslogtreecommitdiff
path: root/src/decrypted_kdm.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-07-21 15:42:48 +0100
committerCarl Hetherington <cth@carlh.net>2014-07-21 15:42:48 +0100
commit55c649e790b73e3f8d493cd12c346e3bddcba25d (patch)
tree4f50d87782a4ec58219e5a2ef468075b5e4d36f7 /src/decrypted_kdm.cc
parent19356a292ba53b6d40270b1e74af5dad2304dbd5 (diff)
Remove some shared_ptr-itis.
Diffstat (limited to 'src/decrypted_kdm.cc')
-rw-r--r--src/decrypted_kdm.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decrypted_kdm.cc b/src/decrypted_kdm.cc
index 62162346..02515fe8 100644
--- a/src/decrypted_kdm.cc
+++ b/src/decrypted_kdm.cc
@@ -213,7 +213,7 @@ DecryptedKDM::DecryptedKDM (
}
EncryptedKDM
-DecryptedKDM::encrypt (shared_ptr<const Signer> signer, shared_ptr<const Certificate> recipient, Formulation formulation) const
+DecryptedKDM::encrypt (shared_ptr<const Signer> signer, Certificate recipient, Formulation formulation) const
{
list<pair<string, string> > key_ids;
list<string> keys;
@@ -229,7 +229,7 @@ DecryptedKDM::encrypt (shared_ptr<const Signer> signer, shared_ptr<const Certifi
uint8_t structure_id[] = { 0xf1, 0xdc, 0x12, 0x44, 0x60, 0x16, 0x9a, 0x0e, 0x85, 0xbc, 0x30, 0x06, 0x42, 0xf8, 0x66, 0xab };
put (&p, structure_id, 16);
- base64_decode (signer->certificates().leaf()->thumbprint (), p, 20);
+ base64_decode (signer->certificates().leaf().thumbprint (), p, 20);
p += 20;
put_uuid (&p, i->cpl_id ());
@@ -240,7 +240,7 @@ DecryptedKDM::encrypt (shared_ptr<const Signer> signer, shared_ptr<const Certifi
put (&p, i->key().value(), ASDCP::KeyLen);
/* Encrypt using the projector's public key */
- RSA* rsa = recipient->public_key ();
+ RSA* rsa = recipient.public_key ();
unsigned char encrypted[RSA_size(rsa)];
int const encrypted_len = RSA_public_encrypt (p - block, block, encrypted, rsa, RSA_PKCS1_OAEP_PADDING);
if (encrypted_len == -1) {
@@ -262,7 +262,7 @@ DecryptedKDM::encrypt (shared_ptr<const Signer> signer, shared_ptr<const Certifi
keys.push_back (lines.str ());
}
- string device_list_description = recipient->common_name ();
+ string device_list_description = recipient.common_name ();
if (device_list_description.find (".") != string::npos) {
device_list_description = device_list_description.substr (device_list_description.find (".") + 1);
}