[cpp-sp] branch main updated: Align to modified sealer operation.
Codeberg
noreply at shibboleth.net
Tue Sep 29 18:23:06 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository cpp-sp.
View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/ee1c3432ff7cb912cbfef76e84f8bcd0ae748e7e
The following commit(s) were added to refs/heads/main by this push:
new ee1c3432 Align to modified sealer operation.
ee1c3432 is described below
commit ee1c3432ff7cb912cbfef76e84f8bcd0ae748e7e
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Tue Sep 29 14:22:52 2026 -0400
Align to modified sealer operation.
---
shibsp/remoting/ddf.h | 1 +
shibsp/remoting/impl/ddf.cpp | 5 +++++
shibsp/session/impl/FilesystemSessionCache.cpp | 18 +++++++++---------
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/shibsp/remoting/ddf.h b/shibsp/remoting/ddf.h
index 77c2fe52..03f4df5a 100644
--- a/shibsp/remoting/ddf.h
+++ b/shibsp/remoting/ddf.h
@@ -112,6 +112,7 @@ namespace shibsp {
DDF previous();
// indexed operators
+ DDF get(unsigned long index) const;
DDF operator[](unsigned long index) const;
DDF operator[](const char* path) const;
diff --git a/shibsp/remoting/impl/ddf.cpp b/shibsp/remoting/impl/ddf.cpp
index 3eb114a4..d7e55a11 100644
--- a/shibsp/remoting/impl/ddf.cpp
+++ b/shibsp/remoting/impl/ddf.cpp
@@ -655,6 +655,11 @@ DDF DDF::operator[](const char* path) const
}
DDF DDF::operator[](unsigned long index) const
+{
+ return get(index);
+}
+
+DDF DDF::get(unsigned long index) const
{
DDF d;
diff --git a/shibsp/session/impl/FilesystemSessionCache.cpp b/shibsp/session/impl/FilesystemSessionCache.cpp
index 774b18fd..13d7ed0f 100644
--- a/shibsp/session/impl/FilesystemSessionCache.cpp
+++ b/shibsp/session/impl/FilesystemSessionCache.cpp
@@ -330,13 +330,13 @@ DDF FilesystemSessionCache::cache_read(
DDF in = remoting->build("sealer", nullptr, request ? request->getRequestID() : nullptr);
DDFJanitor injanitor(in);
- in.addmember("op").string("D");
- in.addmember("value").string(buf);
+ in.addmember("decrypt").list().add(DDF(nullptr).string(buf));
DDF out = remoting->send(in); // let this throw to caller
DDFJanitor outjanitor(out);
- const char* decrypted = out["value"].string();
- if (!decrypted) {
+ DDF decryptedList = out["decrypted"];
+ const char* decrypted = decryptedList.islist() && decryptedList.integer() == 1 ? decryptedList.get(0).string() : nullptr;
+ if (!decrypted || !*decrypted) {
throw OperationException("No decrypted session data returned from sealer operation.");
}
istringstream source(decrypted);
@@ -575,18 +575,18 @@ void FilesystemSessionCache::store_session(SPRequest* request, const char* path,
DDF in = remoting->build("sealer", nullptr, request ? request->getRequestID() : nullptr);
DDFJanitor injanitor(in);
- in.addmember("op").string("E");
ostringstream sink;
sink << sessionData;
- in.addmember("value").string(sink.str().c_str());
+ in.addmember("encrypt").list().add(DDF(nullptr).string(sink.str()));
DDF out = remoting->send(in); // let this throw to caller
DDFJanitor outjanitor(out);
- const char* encrypted = out["value"].string();
- if (!encrypted) {
+ DDF encryptedList = out["encrypted"];
+ const char* encrypted = encryptedList.islist() && encryptedList.integer() == 1 ? encryptedList.get(0).string() : nullptr;
+ if (!encrypted || !*encrypted) {
throw OperationException("No encrypted session data returned from sealer operation.");
}
-
+
ofstream os(path);
if (!os) {
log(ERROR_MARK, "error writing new session to file (%s), errno=%d", path, errno);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list