You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by sc...@apache.org on 2012/06/14 00:21:29 UTC
svn commit: r1350038 - in /santuario/xml-security-cpp/trunk/xsec:
transformers/TXFMSB.cpp transformers/TXFMSB.hpp
xenc/impl/XENCEncryptedTypeImpl.cpp
Author: scantor
Date: Wed Jun 13 22:21:29 2012
New Revision: 1350038
URL: http://svn.apache.org/viewvc?rev=1350038&view=rev
Log:
Fix API to take a const reference, and handle cleanup when in chain.
Modified:
santuario/xml-security-cpp/trunk/xsec/transformers/TXFMSB.cpp
santuario/xml-security-cpp/trunk/xsec/transformers/TXFMSB.hpp
santuario/xml-security-cpp/trunk/xsec/xenc/impl/XENCEncryptedTypeImpl.cpp
Modified: santuario/xml-security-cpp/trunk/xsec/transformers/TXFMSB.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/transformers/TXFMSB.cpp?rev=1350038&r1=1350037&r2=1350038&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/transformers/TXFMSB.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/transformers/TXFMSB.cpp Wed Jun 13 22:21:29 2012
@@ -49,13 +49,15 @@ TXFMSB::~TXFMSB() {
void TXFMSB::setInput(TXFMBase *newInput) {
- // Not possible as this needs to be the start of a tranform pipe
+ // We're the start of the actual data pipe, but we need to track
+ // the pointer for chain disposal.
+ input = newInput;
return;
}
-void TXFMSB::setInput(const safeBuffer sbIn) {
+void TXFMSB::setInput(const safeBuffer& sbIn) {
// Assume this is a string
@@ -65,7 +67,7 @@ void TXFMSB::setInput(const safeBuffer s
}
-void TXFMSB::setInput(const safeBuffer sbIn, unsigned int sbSize) {
+void TXFMSB::setInput(const safeBuffer& sbIn, unsigned int sbSize) {
// Assume this is a string
Modified: santuario/xml-security-cpp/trunk/xsec/transformers/TXFMSB.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/transformers/TXFMSB.hpp?rev=1350038&r1=1350037&r2=1350038&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/transformers/TXFMSB.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/transformers/TXFMSB.hpp Wed Jun 13 22:21:29 2012
@@ -53,8 +53,8 @@ public:
// Methods to set the inputs
virtual void setInput(TXFMBase *newInput);
- void setInput(const safeBuffer sbIn);
- void setInput(const safeBuffer sbIn, unsigned int sbSize);
+ void setInput(const safeBuffer& sbIn);
+ void setInput(const safeBuffer& sbIn, unsigned int sbSize);
// Methods to get tranform output type and input requirement
Modified: santuario/xml-security-cpp/trunk/xsec/xenc/impl/XENCEncryptedTypeImpl.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xenc/impl/XENCEncryptedTypeImpl.cpp?rev=1350038&r1=1350037&r2=1350038&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xenc/impl/XENCEncryptedTypeImpl.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xenc/impl/XENCEncryptedTypeImpl.cpp Wed Jun 13 22:21:29 2012
@@ -333,7 +333,8 @@ TXFMChain * XENCEncryptedTypeImpl::creat
TXFMSB *sb;
XSECnew(sb, TXFMSB(mp_env->getParentDocument()));
- sb->setInput(safeBuffer(b64.get()));
+ safeBuffer temp(b64.get());
+ sb->setInput(temp);
// Create a chain
XSECnew(chain, TXFMChain(sb));