Limal Commits
Threads by month
- ----- 2024 -----
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
June 2010
- 1 participants
- 15 discussions
r2674 - in /limal-branches/mc-devel/limal-ca-mgm: configure.in src/Makefile.am src/PerlRegEx.cpp src/limal/Makefile.am src/limal/PerlRegEx.hpp
by mcalmer@svn.opensuse.org 13 Jun '10
by mcalmer@svn.opensuse.org 13 Jun '10
13 Jun '10
Author: mcalmer
Date: Sun Jun 13 14:44:17 2010
New Revision: 2674
URL: http://svn.opensuse.org/viewcvs/limal?rev=2674&view=rev
Log:
add PerlRegEx
Added:
limal-branches/mc-devel/limal-ca-mgm/src/PerlRegEx.cpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/PerlRegEx.hpp
Modified:
limal-branches/mc-devel/limal-ca-mgm/configure.in
limal-branches/mc-devel/limal-ca-mgm/src/Makefile.am
limal-branches/mc-devel/limal-ca-mgm/src/limal/Makefile.am
Modified: limal-branches/mc-devel/limal-ca-mgm/configure.in
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/configure.in (original)
+++ limal-branches/mc-devel/limal-ca-mgm/configure.in Sun Jun 13 14:44:17 2010
@@ -221,6 +221,67 @@
#AC_ARG_ENABLE(debug,[ --enable-debug debug msg for Rep ],[DEBUG_FLAGS="-DCA_MGM_DEBUG"])
#AC_SUBST(DEBUG_FLAGS)
+AC_MSG_CHECKING([if perl regex (pcre) works])
+if `pkg-config libpcre &>/dev/null` ; then
+ PCRE_LIB=`pkg-config --libs libpcre 2>/dev/null`
+ PCRE_INC=`pkg-config --cflags libpcre 2>/dev/null`
+ PCRE_LIB_DIR=`pkg-config --variable=libdir libpcre 2>/dev/null`
+ PCRE_REQ=yes
+elif `pcre-config --libs &>/dev/null` ; then
+ PCRE_LIB=`pcre-config --libs 2>/dev/null`
+ PCRE_INC=`pcre-config --cflags 2>/dev/null`
+ PCRE_LIB_DIR="`pcre-config --prefix 2>/dev/null`/lib"
+ # hmm...
+ PCRE_REQ=no
+fi
+if test "x${PCRE_LIB}" != x ; then
+ OLD_LIBS="$LIBS"
+ OLD_CPPFLAGS="$CPPFLAGS"
+ LIBS="$PCRE_LIB $LIBS"
+
+ if test "x${PCRE_INC}" != x ; then
+ CPPFLAGS="${PCRE_INC} ${CPPFLAGS}"
+ fi
+
+ AC_TRY_COMPILE(
+ [
+ #include <pcre.h>
+ ],
+ [
+ int errcode = 0;
+ const char* errptr = NULL;
+ pcre* re = pcre_compile("^.*$", 0, &errptr, &errcode, NULL);
+ int count = 0;
+ errcode = pcre_exec(re, NULL, "abcd", 4, 0, 0, 0, 0); /* do not care about the parameters for this test... */
+ if( errcode == PCRE_ERROR_MATCHLIMIT ) /* wrong error constant for the op, but this one needs to be checked. */
+ {
+ return 1;
+ }
+ return 0;
+ ],
+ [
+ AC_DEFINE(HAVE_PCRE, 1, [Define to 1 if PCRE regex is avaliable])
+ AC_SUBST(HAVE_PCRE)
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ if test x$PCRE_REQUIRED = x1; then
+ AC_MSG_ERROR([pcre support requested but does not work])
+ fi
+ CPPFLAGS="$OLD_CPPFLAGS"
+ AC_MSG_RESULT([no])
+ ]
+ )
+ LIBS="$OLD_LIBS"
+elif test x$PCRE_REQUIRED = x1; then
+ AC_MSG_ERROR([Unable to find pcre library via pcre-config/pkg-config])
+else
+ AC_MSG_RESULT([no])
+ PCRE_LIB=""
+fi
+
+
+
AC_CONFIG_FILES(src/Commands.hpp)
AC_CONFIG_FILES(Makefile src/limal/ca-mgm/Makefile
src/limal/Makefile
Modified: limal-branches/mc-devel/limal-ca-mgm/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/Makefile.am (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/Makefile.am Sun Jun 13 14:44:17 2010
@@ -14,6 +14,7 @@
liblimal_ca_mgm_la_SOURCES = \
Date.cpp \
+ PerlRegEx.cpp \
String.cpp \
ValuePosixRECheck.cpp \
ValuePerlRECheck.cpp \
Added: limal-branches/mc-devel/limal-ca-mgm/src/PerlRegEx.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/PerlRegEx.cpp (added)
+++ limal-branches/mc-devel/limal-ca-mgm/src/PerlRegEx.cpp Sun Jun 13 14:44:17 2010
@@ -0,0 +1,712 @@
+/*******************************************************************************
+* Copyright (C) 2005 Novell, Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+* this list of conditions and the following disclaimer.
+*
+* - Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following disclaimer in the documentation
+* and/or other materials provided with the distribution.
+*
+* - Neither the name of Quest Software, Inc., Novell, Inc., nor the names of its
+* contributors may be used to endorse or promote products derived from this
+* software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL Quest Software, Inc., Novell, Inc., OR THE
+* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*******************************************************************************/
+/**
+ * @author Marius Tomaschewski
+ */
+
+#include <limal/ca-mgm/config.h>
+#include <limal/PerlRegEx.hpp>
+#include <limal/Exception.hpp>
+
+#include <climits> // for INT_MAX
+
+
+namespace ca_mgm
+{
+
+
+// -------------------------------------------------------------------
+static std::string
+substitute_caps(const PerlRegEx::MatchArray &sub,
+ const std::string &str, const std::string &rep)
+{
+ static const char *cap_refs[] = {
+ NULL, "\\1", "\\2", "\\3", "\\4",
+ "\\5", "\\6", "\\7", "\\8", "\\9", NULL
+ };
+
+ std::string res( rep);
+ size_t pos;
+
+ for(size_t i=1; cap_refs[i] != NULL; i++)
+ {
+ std::string cap;
+ if( i < sub.size() && sub[i].rm_so >= 0 && sub[i].rm_eo >= 0)
+ {
+ cap = str.substr(sub[i].rm_so, sub[i].rm_eo
+ - sub[i].rm_so);
+ }
+
+ pos = res.find_first_of(cap_refs[i]);
+ while( pos != std::string::npos)
+ {
+ size_t quotes = 0;
+ size_t at = pos;
+
+ while( at > 0 && res.at(--at) == '\\')
+ quotes++;
+
+ if( quotes % 2)
+ {
+ quotes = (quotes + 1) / 2;
+
+ res = res.erase(pos - quotes, quotes);
+
+ pos = res.find_first_of(cap_refs[i],
+ pos + 2 - quotes);
+ }
+ else
+ {
+ quotes = quotes / 2;
+
+ res = res.substr(0, pos - quotes) +
+ cap +
+ res.substr(pos + 2);
+
+ pos = res.find_first_of(cap_refs[i],
+ pos + cap.length() - quotes);
+ }
+ }
+ }
+ return res;
+}
+
+
+// -------------------------------------------------------------------
+static inline std::string
+getError(const int errcode)
+{
+ const char *ptr;
+ switch(errcode)
+ {
+ case 0:
+ ptr = "match vector to small";
+ break;
+
+ case PCRE_ERROR_NOMATCH:
+ ptr = "match failed";
+ break;
+
+ case PCRE_ERROR_NULL:
+ ptr = "invalid argument";
+ break;
+
+ case PCRE_ERROR_BADOPTION:
+ ptr = "unrecognized option";
+ break;
+
+ case PCRE_ERROR_BADMAGIC:
+ ptr = "invalid magic number";
+ break;
+
+ case PCRE_ERROR_UNKNOWN_NODE:
+ ptr = "unknown item in the compiled pattern";
+ break;
+
+ case PCRE_ERROR_NOMEMORY:
+ ptr = "failed to allocate memory";
+ break;
+
+ case PCRE_ERROR_NOSUBSTRING:
+ // .*_substring.* functions only
+ ptr = "failed to retrieve substring";
+ break;
+
+ case PCRE_ERROR_MATCHLIMIT:
+ // match_limit in pcre_extra struct
+ ptr = "recursion or backtracking limit reached";
+ break;
+
+ case PCRE_ERROR_CALLOUT:
+ // reserved for pcrecallout functions
+ ptr = "callout failure";
+ break;
+
+ case PCRE_ERROR_BADUTF8:
+ ptr = "invalid UTF-8 byte sequence found";
+ break;
+
+ case PCRE_ERROR_BADUTF8_OFFSET:
+ ptr = "not a UTF-8 character at specified index";
+ break;
+
+#ifdef PCRE_ERROR_PARTIAL
+ case PCRE_ERROR_PARTIAL:
+ ptr = "partial match";
+ break;
+#endif
+
+#ifdef PCRE_ERROR_BADPARTIAL
+ case PCRE_ERROR_BADPARTIAL:
+ ptr = "pattern item not supported for partial matching";
+ break;
+#endif
+
+#ifdef PCRE_ERROR_INTERNAL
+ case PCRE_ERROR_INTERNAL:
+ ptr = "unexpected internal error occurred";
+ break;
+#endif
+
+#ifdef PCRE_ERROR_BADCOUNT
+ case PCRE_ERROR_BADCOUNT:
+ ptr = "invalid (negative) match vector count";
+ break;
+#endif
+
+ default:
+ ptr = "unknown error code";
+ break;
+ }
+ return std::string(ptr);
+}
+
+// -------------------------------------------------------------------
+PerlRegEx::PerlRegEx()
+ : m_pcre(NULL)
+ , m_flags(0)
+ , m_ecode(0)
+{
+}
+
+
+// -------------------------------------------------------------------
+PerlRegEx::PerlRegEx(const std::string ®ex, int cflags)
+ : m_pcre(NULL)
+ , m_flags(0)
+ , m_ecode(0)
+{
+ if( !compile(regex, cflags))
+ {
+ BLOCXX_THROW_ERR(ca_mgm::ValueException,
+ errorString().c_str(), m_ecode);
+ }
+}
+
+
+// -------------------------------------------------------------------
+PerlRegEx::PerlRegEx(const PerlRegEx &ref)
+ : m_pcre(NULL)
+ , m_flags(ref.m_flags)
+ , m_ecode(0)
+ , m_rxstr(ref.m_rxstr)
+{
+ if( ref.m_pcre != NULL && !compile(ref.m_rxstr, ref.m_flags))
+ {
+ BLOCXX_THROW_ERR(ca_mgm::ValueException,
+ errorString().c_str(), m_ecode);
+ }
+}
+
+// -------------------------------------------------------------------
+PerlRegEx::~PerlRegEx()
+{
+ if( m_pcre)
+ {
+ free(m_pcre);
+ m_pcre = NULL;
+ }
+}
+
+
+// -------------------------------------------------------------------
+PerlRegEx &
+PerlRegEx::operator = (const PerlRegEx &ref)
+{
+ if( ref.m_pcre == NULL)
+ {
+ m_ecode = 0;
+ m_error.erase();
+ m_flags = ref.m_flags;
+ m_rxstr = ref.m_rxstr;
+ if( m_pcre != NULL)
+ {
+ free(m_pcre);
+ m_pcre = NULL;
+ }
+ }
+ else if( !compile(ref.m_rxstr, ref.m_flags))
+ {
+ BLOCXX_THROW_ERR(ca_mgm::ValueException,
+ errorString().c_str(), m_ecode);
+ }
+ return *this;
+}
+
+
+// -------------------------------------------------------------------
+bool
+PerlRegEx::compile(const std::string ®ex, int cflags)
+{
+ if( m_pcre)
+ {
+ free(m_pcre);
+ m_pcre = NULL;
+ }
+
+ const char *errptr = NULL;
+
+ m_ecode = 0;
+ m_pcre = ::pcre_compile(regex.c_str(), cflags,
+ &errptr, &m_ecode, NULL);
+ if( m_pcre == NULL)
+ {
+ m_error = std::string(errptr ? errptr : "");
+ m_rxstr.erase();
+ m_flags = 0;
+ return false;
+ }
+ else
+ {
+ m_error.erase();
+ m_rxstr = regex;
+ m_flags = cflags;
+ return true;
+ }
+}
+
+
+// -------------------------------------------------------------------
+int
+PerlRegEx::errorCode()
+{
+ return m_ecode;
+}
+
+
+// -------------------------------------------------------------------
+std::string
+PerlRegEx::errorString() const
+{
+ return m_error;
+}
+
+
+// -------------------------------------------------------------------
+std::string
+PerlRegEx::patternString() const
+{
+ return m_rxstr;
+}
+
+
+// -------------------------------------------------------------------
+int
+PerlRegEx::compileFlags() const
+{
+ return m_flags;
+}
+
+
+// -------------------------------------------------------------------
+bool
+PerlRegEx::isCompiled() const
+{
+ return (m_pcre != NULL);
+}
+
+
+// -------------------------------------------------------------------
+bool
+PerlRegEx::execute(MatchArray &sub, const std::string &str,
+ size_t index, size_t count, int eflags)
+{
+ if( m_pcre == NULL)
+ {
+ BLOCXX_THROW(ca_mgm::ValueException,
+ "Regular expression is not compiled");
+ }
+ if( count >= size_t(INT_MAX / 3))
+ {
+ BLOCXX_THROW(ca_mgm::SystemException,
+ "Match count limit exceeded");
+ }
+
+ if( index > str.length())
+ {
+ BLOCXX_THROW(ca_mgm::OverflowException,
+ str::form("String index out of bounds ("
+ "length = %d, index = %d).",
+ str.length(), index
+ ).c_str());
+ }
+
+ if( count == 0)
+ {
+ int cnt = 0;
+ int ret = ::pcre_fullinfo(m_pcre, NULL,
+ PCRE_INFO_CAPTURECOUNT, &cnt);
+ if( ret)
+ {
+ m_error = getError(m_ecode);
+ return false;
+ }
+ count = cnt > 0 ? cnt + 1 : 1;
+ }
+ int vsub[count * 3];
+
+ sub.clear();
+ m_ecode = ::pcre_exec(m_pcre, NULL, str.c_str(), str.length(),
+ index, eflags, vsub, count * 3);
+ //
+ // pcre_exec returns 0 if vector too small, negative value
+ // on errors or the number of matches (number of int pairs)
+ //
+ if( m_ecode > 0)
+ {
+ sub.resize(count); // as specified by user
+ for(size_t i = 0, n = 0; i < count; i++, n += 2)
+ {
+ match_t m = { vsub[n], vsub[n+1] };
+
+ // if user wants more than detected
+ if( i >= (size_t)m_ecode)
+ m.rm_so = m.rm_eo = -1;
+
+ sub[i] = m;
+ }
+ m_error.erase();
+ return true;
+ }
+ else
+ {
+ m_error = getError(m_ecode);
+ return false;
+ }
+}
+
+
+// -------------------------------------------------------------------
+bool
+PerlRegEx::execute(MatchVector &sub, const std::string &str,
+ size_t index, size_t count, int eflags)
+{
+ if( m_pcre == NULL)
+ {
+ BLOCXX_THROW(ca_mgm::ValueException,
+ "Regular expression is not compiled");
+ }
+ if( count >= size_t(INT_MAX / 3))
+ {
+ BLOCXX_THROW(ca_mgm::SystemException,
+ "Match count limit exceeded");
+ }
+
+ if( index > str.length())
+ {
+ BLOCXX_THROW(ca_mgm::OverflowException,
+ str::form("String index out of bounds ("
+ "length = %d, index = %d)",
+ str.length(), index
+ ).c_str());
+ }
+
+ if( count == 0)
+ {
+ int cnt = 0;
+ int ret = ::pcre_fullinfo(m_pcre, NULL,
+ PCRE_INFO_CAPTURECOUNT, &cnt);
+ if( ret)
+ {
+ m_error = getError(m_ecode);
+ return false;
+ }
+ count = cnt > 0 ? cnt + 1 : 1;
+ }
+ int vsub[count * 3];
+
+ sub.clear();
+ m_ecode = ::pcre_exec(m_pcre, NULL, str.c_str(), str.length(),
+ index, eflags, vsub, count * 3);
+ //
+ // pcre_exec returns 0 if vector too small, negative value
+ // on errors or the number of matches (number of int pairs)
+ //
+ if( m_ecode > 0)
+ {
+ count *= 2;
+ m_ecode *= 2;
+ sub.resize(count); // as specified by user
+ for(size_t i = 0; i < count; i++)
+ {
+ // if user wants more than detected
+ if( i >= (size_t)m_ecode)
+ vsub[i] = -1;
+
+ sub[i] = vsub[i];
+ }
+ return true;
+ }
+ else
+ {
+ m_error = getError(m_ecode);
+ return false;
+ }
+}
+
+
+// -------------------------------------------------------------------
+std::vector<std::string>
+PerlRegEx::capture(const std::string &str, size_t index, size_t count, int eflags)
+{
+ if( m_pcre == NULL)
+ {
+ BLOCXX_THROW(ca_mgm::ValueException,
+ "Regular expression is not compiled");
+ }
+
+ MatchArray rsub;
+ std::vector<std::string> ssub;
+
+ bool match = execute(rsub, str, index, count, eflags);
+ if( match)
+ {
+ if( rsub.empty())
+ {
+ BLOCXX_THROW(ca_mgm::ValueException,
+ "Non-capturing regular expression");
+ }
+
+ MatchArray::const_iterator i=rsub.begin();
+ for( ; i != rsub.end(); ++i)
+ {
+ if( i->rm_so >= 0 && i->rm_eo >= 0)
+ {
+ ssub.push_back(str.substr(i->rm_so,
+ i->rm_eo - i->rm_so));
+ }
+ else
+ {
+ ssub.push_back(std::string(""));
+ }
+ }
+ }
+ else if(m_ecode != PCRE_ERROR_NOMATCH)
+ {
+ BLOCXX_THROW_ERR(ca_mgm::RuntimeException,
+ errorString().c_str(), m_ecode);
+ }
+ return ssub;
+}
+
+
+// -------------------------------------------------------------------
+std::string
+PerlRegEx::replace(const std::string &str, const std::string &rep,
+ bool global, int eflags)
+{
+ if( m_pcre == NULL)
+ {
+ BLOCXX_THROW(ca_mgm::ValueException,
+ "Regular expression is not compiled");
+ }
+
+ MatchArray rsub;
+ bool match;
+ size_t off = 0;
+ std::string out = str;
+
+ do
+ {
+ match = execute(rsub, out, off, 0, eflags);
+ if( match)
+ {
+ if( rsub.empty() ||
+ rsub[0].rm_so < 0 ||
+ rsub[0].rm_eo < 0)
+ {
+ // only if empty (missused as guard).
+ BLOCXX_THROW(ca_mgm::ValueException,
+ "Non-capturing regular expression");
+ }
+
+ std::string res = substitute_caps(rsub, out, rep);
+
+ out = out.substr(0, rsub[0].rm_so) +
+ res + out.substr(rsub[0].rm_eo);
+
+ off = rsub[0].rm_so + res.length();
+ }
+ else if(m_ecode == PCRE_ERROR_NOMATCH)
+ {
+ m_ecode = 0;
+ m_error.erase();
+ }
+ else
+ {
+ BLOCXX_THROW_ERR(ca_mgm::RuntimeException,
+ errorString().c_str(), m_ecode);
+ }
+ } while(global && match && out.length() > off);
+
+ return out;
+}
+
+
+// -------------------------------------------------------------------
+std::vector<std::string>
+PerlRegEx::split(const std::string &str, bool empty, int eflags)
+{
+ if( m_pcre == NULL)
+ {
+ BLOCXX_THROW(ca_mgm::ValueException,
+ "Regular expression is not compiled");
+ }
+
+ MatchArray rsub;
+ std::vector<std::string> ssub;
+ bool match;
+ size_t off = 0;
+ size_t len = str.length();
+
+ do
+ {
+ match = execute(rsub, str, off, 0, eflags);
+ if( match)
+ {
+ if( rsub.empty() ||
+ rsub[0].rm_so < 0 ||
+ rsub[0].rm_eo < 0)
+ {
+ BLOCXX_THROW(ca_mgm::ValueException,
+ "Non-capturing regular expression");
+ }
+
+ if( empty || ((size_t)rsub[0].rm_so > off))
+ {
+ ssub.push_back(str.substr(off,
+ rsub[0].rm_so - off));
+ }
+ off = rsub[0].rm_eo;
+ }
+ else if(m_ecode == PCRE_ERROR_NOMATCH)
+ {
+ std::string tmp = str.substr(off);
+ if( empty || !tmp.empty())
+ {
+ ssub.push_back(tmp);
+ }
+ m_ecode = 0;
+ m_error.erase();
+ }
+ else
+ {
+ BLOCXX_THROW_ERR(ca_mgm::RuntimeException,
+ errorString().c_str(), m_ecode);
+ }
+ } while(match && len > off);
+
+ return ssub;
+}
+
+
+// -------------------------------------------------------------------
+std::vector<std::string>
+PerlRegEx::grep(const std::vector<std::string> &src, int eflags)
+{
+ if( m_pcre == NULL)
+ {
+ BLOCXX_THROW(ca_mgm::ValueException,
+ "Regular expression is not compiled");
+ }
+
+ m_ecode = 0;
+ m_error.erase();
+
+ std::vector<std::string> out;
+ if( !src.empty())
+ {
+ std::vector<std::string>::const_iterator i=src.begin();
+ for( ; i != src.end(); ++i)
+ {
+ int ret = ::pcre_exec(m_pcre, NULL, i->c_str(),
+ i->length(), 0, eflags, NULL, 0);
+ if( ret >= 0)
+ {
+ out.push_back(*i);
+ }
+ else if( ret != PCRE_ERROR_NOMATCH)
+ {
+ m_ecode = ret;
+ m_error = getError(m_ecode);
+ BLOCXX_THROW_ERR(ca_mgm::RuntimeException,
+ errorString().c_str(), m_ecode);
+ }
+ }
+ }
+ return out;
+}
+
+
+// -------------------------------------------------------------------
+bool
+PerlRegEx::match(const std::string &str, size_t index, int eflags) const
+{
+ if( m_pcre == NULL)
+ {
+ BLOCXX_THROW(ca_mgm::ValueException,
+ "Regular expression is not compiled");
+ }
+
+ if( index > str.length())
+ {
+ BLOCXX_THROW(ca_mgm::OverflowException,
+ str::form("String index out of bounds."
+ "length = %d, index = %d",
+ str.length(), index
+ ).c_str());
+ }
+
+ m_ecode = ::pcre_exec(m_pcre, NULL, str.c_str(),
+ str.length(), 0, eflags, NULL, 0);
+ if( m_ecode >= 0)
+ {
+ m_error.erase();
+ return true;
+ }
+ else if( m_ecode == PCRE_ERROR_NOMATCH)
+ {
+ m_error = getError(m_ecode);
+ return false;
+ }
+ else
+ {
+ m_error = getError(m_ecode);
+ BLOCXX_THROW_ERR(ca_mgm::RuntimeException,
+ errorString().c_str(), m_ecode);
+ }
+}
+
+
+// -------------------------------------------------------------------
+} // namespace BLOCXX_NAMESPACE
+
+/* vim: set ts=8 sts=8 sw=8 ai noet: */
+
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/Makefile.am
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/Makefile.am (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/Makefile.am Sun Jun 13 14:44:17 2010
@@ -22,7 +22,8 @@
UrlBase.hpp \
Url.hpp \
Date.hpp \
- String.hpp
+ String.hpp \
+ PerlRegEx.hpp
CLEANFILES = *~
Added: limal-branches/mc-devel/limal-ca-mgm/src/limal/PerlRegEx.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/PerlRegEx.hpp (added)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/PerlRegEx.hpp Sun Jun 13 14:44:17 2010
@@ -0,0 +1,453 @@
+/*******************************************************************************
+* Copyright (C) 2005 Novell, Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+* this list of conditions and the following disclaimer.
+*
+* - Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following disclaimer in the documentation
+* and/or other materials provided with the distribution.
+*
+* - Neither the name of Quest Software, Inc., Novell, Inc., nor the names of its
+* contributors may be used to endorse or promote products derived from this
+* software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL Quest Software, Inc., Novell, Inc., OR THE
+* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*******************************************************************************/
+/**
+ * @author Marius Tomaschewski
+ */
+
+#ifndef LIMAL_PERL_REGEX_HPP
+#define LIMAL_PERL_REGEX_HPP
+
+#include <limal/String.hpp>
+#include <vector>
+
+#include <pcre.h>
+
+namespace ca_mgm
+{
+
+/**
+ * Perl compatible Regular Expression wrapper class and utility functions.
+ *
+ * The PerlRegEx implementation depends on avaliability of the pcre library.
+ *
+ * Consult the pcre_compile(3), pcre_exec(3) and pcreapi(3) manual pages
+ * for informations about details of the pcre implementation.
+ *
+ * @note This class does NOT wrap all features provided by the pcre library!
+ */
+class PerlRegEx
+{
+public:
+ /** Native PCRE vector of integers.
+ * It contains captured substring offsets pairs. Each even index
+ * number points to a start and odd index number the corresponding
+ * end of the matched substring.
+ */
+ typedef std::vector<int> MatchVector;
+
+ /// POSIX RegEx like structure for captured substring offset pair.
+ struct match_t {
+ int rm_so; //!< start offset of the regex match
+ int rm_eo; //!< end offset of the regex match
+ };
+
+ /// POSIX RegEx like match array with captured substring offsets.
+ typedef std::vector<match_t> MatchArray;
+
+ /**
+ * Create a new PerlRegEx object without compilation.
+ */
+ PerlRegEx();
+
+ /**
+ * Create a new PerlRegEx object and compile the regular expression.
+ *
+ * @param regex A perl regular expression pattern.
+ * @param cflags Bitwise-or of compile() flags.
+ * @throws RegExCompileException on compilation failure.
+ */
+ PerlRegEx(const std::string ®ex, int cflags = 0);
+
+ /**
+ * Create a new PerlRegEx as (deep) copy of the specified reference.
+ * If the reference is compiled, the new object will be compiled
+ * as well.
+ *
+ * @param ref The PerlRegEx object reference to copy.
+ * @throws RegExCompileException on compilation failure.
+ */
+ PerlRegEx(const PerlRegEx &ref);
+
+ /**
+ * Destroy this PerlRegEx object.
+ */
+ ~PerlRegEx();
+
+ /**
+ * Assign the specified PerlRegEx reference. If the reference
+ * is compiled, the current object will be (re)compiled.
+ *
+ * @param ref The PerlRegEx object reference to assign from.
+ * @throws RegExCompileException on compilation failure.
+ */
+ PerlRegEx& operator = (const PerlRegEx &ref);
+
+ /**
+ * Compile the regular expression pattern contained in the string.
+ *
+ * @param regex A regular expression pattern.
+ * @param cflags Bitwise-or of compilation flags.
+ * @return True on successful compilation,
+ * false on failure.
+ *
+ * The @c cflags parameter can be set to one or a bitwise-or of
+ * the following option flags. Consult the pcre_compile(3) and
+ * pcreapi(3) manual pages for the complete list and detailed
+ * description.
+ *
+ * Most of the compile options can be set also directly in the
+ * pattern string using the (?<option character>) notation as
+ * listed bellow.
+ *
+ * @arg @c i @c PCRE_CASELESS match upper and lower case letters
+ * @arg @c m @c PCRE_MULTILINE the "^" and "$" matches begin and
+ * end of a line instead of the string
+ * @arg @c s @c PCRE_DOTALL dot metacharacters matches also
+ * newlines
+ * @arg @c x @c PCRE_EXTENDED ignore not escaped whitespaces
+ * @arg @c U @c PCRE_UNGREEDY invert "greediness" of quantifiers
+ * @arg @c PCRE_UTF8 causes to act in UTF8 mode
+ * @arg @c PCRE_ANCHORED force pattern to be "anchored"
+ * @arg @c PCRE_NO_AUTO_CAPTURE behave as if "(" parenthesis is
+ * followed by a "?:"
+ */
+ bool compile(const std::string ®ex,
+ int cflags = 0);
+
+ /**
+ * Return the last error code generated by compile or one of the
+ * executing methods.
+ *
+ * In case of a compile error, the returned value points to the
+ * position (character offset) in the regex pattern string, where
+ * where the error was discovered.
+ *
+ * In all other cases, the result of the pcre_exec function call
+ * is returned.
+ *
+ * @return pcre_exec result or compile error position.
+ */
+ int errorCode();
+
+ /**
+ * Return the error message string for the last error code.
+ *
+ * @return The error message or empty string
+ * if no expression was compiled.
+ */
+ std::string errorString() const;
+
+ /**
+ * @return The regular expression pattern string.
+ */
+ std::string patternString() const;
+
+ /**
+ * @return The compilation flags used in compile() method.
+ */
+ int compileFlags() const;
+
+ /**
+ * @return true, if the current regex object is compiled.
+ */
+ bool isCompiled() const;
+
+ /**
+ * @{
+ * Execute regular expression matching against the string.
+ * The matching starts at the specified index and return
+ * true on match of false if no match found.
+ *
+ * @note In contrast to the PosixRegEx class, the PCRE
+ * library supports a string index (startoffset) and
+ * is able to look behind the starting point.
+ * If the regex makes use of the "start of string/line"
+ * metacharacter (^), the regex may not match if index
+ * is greater than 0.
+ *
+ * The expected maximal number of matching substrings can be
+ * specified in @c count. If the default value of 0 is used,
+ * the detected count by pcre_fullinfo will be used.
+ * @note If the specified count is greater 0 but smaller than
+ * the effectively number of found matches, false is returned
+ * (failure, error code 0).
+ * If the specified count is greater 0 and greater than the
+ * the effectively number of found matches, unused offsets
+ * at the end are filled with to -1.
+ *
+ * If no match was found, the @c sub array will be empty
+ * and false is returned.
+ * If a match is found and the expression was compiled to
+ * capture substrings, the @c sub array will be filled with
+ * the captured substring offsets. The first (index 0) offset
+ * pair points to the start of the first match and the end of
+ * the last match. Unused / optional capturing subpattern
+ * offsets will be set to -1.
+ *
+ * The resulting MatchVector is twice as large as the number
+ * of captured substrings, the resulting MatchArray equal.
+ *
+ * Consult the pcre_exec(3) and pcreapi(3) manual pages
+ * for the complete and detailed description.
+ *
+ * @param sub array for substring offsets
+ * @param str string to match
+ * @param index match string starting at index
+ * @param count number of expected substring matches
+ * @param eflags execution flags described bellow
+ * @return true on match or false
+ * @throws RegExCompileException if regex is not compiled.
+ * @throws AssertionException if the count value is too big
+ * (would cause integer overflow).
+ * @throws OutOfBoundsException if the index is greater
+ * than the string length.
+ *
+ * The @c eflags parameter can be set to 0 or one or
+ * a bitwise-or of the following options:
+ *
+ * @arg @c PCRE_NOTBOL The circumflex character (^) will
+ * not match the beginning of string.
+ * @arg @c PCRE_NOTEOL The dollar sign ($) will not match
+ * the end of string.
+ * @arg @c PCRE_ANCHORED Match only at the first position
+ * @arg @c PCRE_NOTEMPTY An empty string is not a valid match
+ * @arg @c PCRE_NO_UTF8_CHECK Do the string for UTF-8 validity
+ * (only relevant if PCRE_UTF8 was set at compile time)
+ *
+ * @par Example:
+ * @code
+ * std::string str("foo = bar trala hoho");
+ *
+ * MatchArray vsub;
+ * if( PerlRegEx("=").execute(vsub, str) && !vsub.empty())
+ * {
+ * //
+ * // vsub[0] is 4,
+ * // vsub[1] is 5
+ * //
+ * }
+ *
+ * MatchArray rsub;
+ * if( PerlRegEx("=").execute(rsub, str) && !rsub.empty())
+ * {
+ * //
+ * // rsub[0].rm_so is 4,
+ * // rsub[0].rm_eo is 5
+ * //
+ * }
+ *
+ * @endcode
+ */
+ bool execute(MatchVector &sub,
+ const std::string &str,
+ size_t index = 0,
+ size_t count = 0,
+ int eflags = 0);
+ bool execute(MatchArray &sub,
+ const std::string &str,
+ size_t index = 0,
+ size_t count = 0,
+ int eflags = 0);
+ /* @} */
+
+ /**
+ * Search in string and return an array of captured substrings.
+ *
+ * @param str string to search in
+ * @param index match string starting at index
+ * @param count expected substring count
+ * @param eflags execution flags, see execute()
+ * @return array of captured substrings
+ * @throws RegExCompileException if regex is not compiled.
+ * @throws RegExExecuteException on execute failures.
+ * @throws OutOfBoundsException if the index is greater
+ * than the string length.
+ *
+ * @par Example:
+ * @code
+ * std::string str("Foo = bar trala hoho");
+ * PerlRegEx reg("^((?i)[a-z]+)[ \t]*=[ \t]*(.*)$");
+ * std::vector<std::string> out = reg.capture(str);
+ * //
+ * // out is { "Foo = bar trala hoho",
+ * // "Foo",
+ * // "bar trala hoho"
+ * // }
+ * @endcode
+ */
+ std::vector<std::string> capture(const std::string &str,
+ size_t index = 0,
+ size_t count = 0,
+ int eflags = 0);
+
+ /**
+ * Replace (substitute) the first or all matching substrings.
+ *
+ * Substring(s) matching regular expression are replaced with
+ * the string provided in @c rep and a new, modified string
+ * is returned.
+ * If no matches are found, a copy of 'str' string is returned.
+ *
+ * The rep string can contain capturing references "\\1" to "\\9"
+ * that will be substituted with the corresponding captured string.
+ * Prepended "\\" before the reference disables (switches to skip)
+ * the substitution. Note, the notation using double-slash followed
+ * by a digit character, not just "\1" like the "\n" escape sequence.
+ *
+ * @param str string that should be matched
+ * @param rep replacement substring with optional references
+ * @param global if to replace the first or all matches
+ * @param eflags execution flags, see execute() method
+ * @return new string with modification(s)
+ * @throws RegExCompileException if regex is not compiled.
+ * @throws RegExExecuteException on execute failures.
+ * @throws OutOfBoundsException if the index is greater
+ * than the string length.
+ *
+ * @par Example:
+ * @code
+ * std::string str("//foo/.//bar/hoho");
+ * PerlRegEx reg("([/]+(\\.?[/]+)?)");
+ * std::string out = reg.replace(str, "/");
+ * //
+ * // out is "/foo/bar/hoho"
+ * //
+ * @endcode
+ */
+ std::string replace(const std::string &str,
+ const std::string &rep,
+ bool global = false,
+ int eflags = 0);
+
+ /**
+ * Split the specified string into an array of substrings.
+ * The regular expression is used to match the separators.
+ *
+ * If the empty flag is true, empty substring are included
+ * in the resulting array.
+ *
+ * If no separators were found, and the empty flag is true,
+ * the array will contain the input string as its only element.
+ * If the empty flag is false, a empty array is returned.
+ *
+ * @param str string that should be splitted
+ * @param empty whether to capture empty substrings
+ * @param eflags execution flags, see execute() method
+ * @return array of resulting substrings
+ * or empty array on failure
+ * @throws RegExCompileException if regex is not compiled.
+ * @throws RegExExecuteException on execute failures.
+ * @throws OutOfBoundsException if the index is greater
+ * than the string length.
+ *
+ * @par Example:
+ * @code
+ * std::string str("1.23, .50 , , 71.00 , 6.00");
+ * std::vector<std::string> out1 = PerlRegEx("([ \t]*,[ \t]*)").split(str);
+ * //
+ * // out1 is { "1.23", ".50", "71.00", "6.00" }
+ * //
+ * @endcode
+ */
+ std::vector<std::string> split (const std::string &str,
+ bool empty = false,
+ int eflags = 0);
+
+ /**
+ * Match all strings in the array against regular expression.
+ * Returns an array of matching strings.
+ *
+ * @param src list of strings to match
+ * @param eflags execution flags, see execute() method
+ * @throws RegExCompileException if regex is not compiled.
+ * @throws RegExExecuteException on execute failures.
+ * @throws OutOfBoundsException if the index is greater
+ * than the string length.
+ *
+ * @par Example:
+ * @code
+ * std::vector<std::string> src;
+ * src.push_back("\t");
+ * src.push_back("one");
+ * src.push_back("");
+ * src.push_back("two");
+ * src.push_back(" ");
+ * std::vector<std::string> out = PerlRegEx("[^ \t]").grep(src);
+ * //
+ * // out is { "one", "two" }
+ * //
+ * @endcode
+ */
+ std::vector<std::string> grep (const std::vector<std::string> &src,
+ int eflags = 0);
+
+ /**
+ * Execute regular expression matching against the string.
+ * The matching starts at the specified index and return
+ * true on match of false if no match found.
+ *
+ * See execute() method for description of the @c index
+ * and @c eflags parameters.
+ *
+ * @param str string to match
+ * @param index match string starting index
+ * @param eflags execution flags, see execute() method
+ * @return true on match or false
+ * @throws RegExCompileException if regex is not compiled.
+ * @throws RegExExecuteException on execute failures.
+ * @throws OutOfBoundsException if the index is greater
+ * than the string length.
+ *
+ * @par Example:
+ * @code
+ * std::string str("foo = bar ");
+ * if( PerlRegEx("^[a-z]+[ \t]*=[ \t]*.*$").match(str))
+ * {
+ * }
+ * @endcode
+ */
+ bool match (const std::string &str,
+ size_t index = 0,
+ int eflags = 0) const;
+
+private:
+ pcre *m_pcre;
+ int m_flags;
+ mutable int m_ecode;
+ mutable std::string m_error;
+ std::string m_rxstr;
+};
+
+} // End of BLOCXX_NAMESPACE
+
+
+#endif // LIMAL_PERL_REGEX_HPP
+/* vim: set ts=8 sts=8 sw=8 ai noet: */
+
--
To unsubscribe, e-mail: limal-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: limal-commit+help(a)opensuse.org
1
0
r2673 - in /limal-branches/mc-devel/limal-ca-mgm/src/INIParser: IniFile.cpp IniFile.h IniParser.h
by mcalmer@svn.opensuse.org 12 Jun '10
by mcalmer@svn.opensuse.org 12 Jun '10
12 Jun '10
Author: mcalmer
Date: Sat Jun 12 23:58:06 2010
New Revision: 2673
URL: http://svn.opensuse.org/viewcvs/limal?rev=2673&view=rev
Log:
fixed missing maps and lists
Modified:
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.cpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.cpp Sat Jun 12 23:58:06 2010
@@ -13,7 +13,7 @@
#include <stdio.h>
#include <ctype.h>
#include <cassert>
-#include <blocxx/List.hpp>
+#include <list>
#include "INIParser/IniFile.h"
#include "INIParser/IniParser.h"
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h Sat Jun 12 23:58:06 2010
@@ -16,7 +16,6 @@
#include <limal/Logger.hpp>
#include <blocxx/String.hpp>
-#include <blocxx/Map.hpp>
#include <blocxx/IntrusiveReference.hpp>
#include "INIParser/INIParserDescr.hpp"
#include <list>
@@ -49,7 +48,7 @@
};
typedef std::list<blocxx::String> StringList;
-typedef blocxx::Map<blocxx::String, blocxx::String> StringMap;
+typedef std::map<blocxx::String, blocxx::String> StringMap;
/**
* Base class of IniEntry and IniSection.
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h Sat Jun 12 23:58:06 2010
@@ -143,7 +143,7 @@
* Times of last modification of read files, used in multiple files
* mode.
*/
- blocxx::Map<blocxx::String,FileDescr> multi_files;
+ std::map<blocxx::String,FileDescr> multi_files;
/**
* File name of the ini file -- single file mode only.
*/
--
To unsubscribe, e-mail: limal-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: limal-commit+help(a)opensuse.org
1
0
r2672 - in /limal-branches/mc-devel/limal-ca-mgm: src/ src/limal/ testsuite/TestRepos/Test_CA1/ testsuite/TestRepos/Test_CA2/ testsuite/TestRepos/Test_CA2/crl/
by mcalmer@svn.opensuse.org 12 Jun '10
by mcalmer@svn.opensuse.org 12 Jun '10
12 Jun '10
Author: mcalmer
Date: Sat Jun 12 23:53:00 2010
New Revision: 2672
URL: http://svn.opensuse.org/viewcvs/limal?rev=2672&view=rev
Log:
blocxx::DateTime => Date
Added:
limal-branches/mc-devel/limal-ca-mgm/src/Date.cpp
limal-branches/mc-devel/limal-ca-mgm/src/String.cpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/Date.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/String.hpp
Modified:
limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLReason.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLReason_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/Makefile.am
limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp
limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/Makefile.am
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp Sat Jun 12 23:53:00 2010
@@ -26,7 +26,8 @@
#include <limal/PathUtils.hpp>
#include <limal/PathInfo.hpp>
#include <blocxx/MD5.hpp>
-#include <blocxx/DateTime.hpp>
+#include <limal/Date.hpp>
+#include <limal/String.hpp>
#include <blocxx/StringBuffer.hpp>
#include <blocxx/COWIntrusiveCountableBase.hpp>
@@ -307,7 +308,7 @@
String opensslDN = requestData.getSubjectDN().getOpenSSLString();
blocxx::MD5 md5(opensslDN);
String request = md5.toString() + "-" +
- String(blocxx::DateTime::getCurrent().get());
+ String(Date::now());
path::PathInfo dKey(m_impl->repositoryDir + "/" + m_impl->caName + "/keys/"+ request + ".key");
if(dKey.exists())
@@ -555,7 +556,7 @@
blocxx::MD5 md5(name);
String requestName = md5.toString() + "-" +
- String(blocxx::DateTime::getCurrent().get());
+ String(Date::now());
path::PathInfo outPi(m_impl->repositoryDir + "/" + m_impl->caName + "/req/" + requestName + ".req");
@@ -1504,7 +1505,7 @@
LocalManagement::getCertificate(repos + "/" + caName + "/cacert.pem",
E_PEM);
- if( ca.getEndDate() > DateTime::getCurrent().get() )
+ if( ca.getEndDate() > Date::now() )
{
LOGIT_ERROR("Deleting the CA is not allowed. " <<
"The CA must be expired or no certificate was signed with this CA");
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp Sat Jun 12 23:53:00 2010
@@ -34,7 +34,8 @@
#include <limal/ValueRegExCheck.hpp>
#include <limal/Exception.hpp>
#include <blocxx/Format.hpp>
-#include <blocxx/DateTime.hpp>
+#include <limal/Date.hpp>
+#include <limal/String.hpp>
#include "CRLDataImpl.hpp"
#include "Utils.hpp"
@@ -74,36 +75,12 @@
memcpy(cbuf, rev->revocationDate->data, rev->revocationDate->length);
cbuf[rev->revocationDate->length] = '\0';
- String sbuf = String(cbuf);
+ std::string sbuf(cbuf);
delete [] cbuf;
-
LOGIT_DEBUG("Revocation Date: " << sbuf);
+ Date dt(sbuf, "%y%m%d%H%M%S", true);
- PerlRegEx r("^(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)Z$");
- std::vector<blocxx::String> sa = convStringArray(r.capture(sbuf));
-
- if(sa.size() != 7)
- {
- LOGIT_ERROR("Can not parse date: " << sbuf);
- BLOCXX_THROW(ca_mgm::RuntimeException,
- Format(__("Cannot parse date %1."), sbuf).c_str());
- }
-
- int year = 1970;
- if(sa[1].toInt() >= 70 && sa[1].toInt() <= 99)
- {
- year = sa[1].toInt() + 1900;
- }
- else
- {
- year = sa[1].toInt() + 2000;
- }
-
- DateTime dt = DateTime(year, sa[2].toInt(), sa[3].toInt(),
- sa[4].toInt(), sa[5].toInt(), sa[6].toInt(),
- 0, DateTime::E_UTC_TIME);
-
- setRevocationDate(dt.get());
+ setRevocationDate(dt);
// get CRL Reason
@@ -326,33 +303,10 @@
memcpy(cbuf, t->data, t->length);
cbuf[t->length] = '\0';
- String sbuf = String(cbuf);
+ std::string sbuf(cbuf);
delete [] cbuf;
-
- PerlRegEx r("^(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)Z$");
- std::vector<blocxx::String> sa = convStringArray(r.capture(sbuf));
-
- if(sa.size() != 7)
- {
- LOGIT_ERROR("Can not parse date: " << sbuf);
- BLOCXX_THROW(ca_mgm::RuntimeException,
- Format(__("Cannot parse date %1."), sbuf).c_str());
- }
-
- int year = 1970;
- if(sa[1].toInt() >= 70 && sa[1].toInt() <= 99)
- {
- year = sa[1].toInt() + 1900;
- }
- else
- {
- year = sa[1].toInt() + 2000;
- }
-
- DateTime dt(year, sa[2].toInt(), sa[3].toInt(),
- sa[4].toInt(), sa[5].toInt(), sa[6].toInt(),
- 0, DateTime::E_UTC_TIME);
- time_t lastUpdate = dt.get();
+ Date dt(sbuf, "%y%m%d%H%M%S", true);
+ time_t lastUpdate = dt;
// get nextUpdate
t = X509_CRL_get_nextUpdate(x509);
@@ -361,32 +315,11 @@
memcpy(cbuf, t->data, t->length);
cbuf[t->length] = '\0';
- sbuf = String(cbuf);
+ sbuf = std::string(cbuf);
delete [] cbuf;
+ dt = Date(sbuf, "%y%m%d%H%M%S", true);
- sa = convStringArray(r.capture(sbuf));
-
- if(sa.size() != 7)
- {
- LOGIT_ERROR("Can not parse date: " << sbuf);
- BLOCXX_THROW(ca_mgm::RuntimeException,
- Format(__("Cannot parse date %1."), sbuf).c_str());
- }
-
- year = 1970;
- if(sa[1].toInt() >= 70 && sa[1].toInt() <= 99)
- {
- year = sa[1].toInt() + 1900;
- }
- else
- {
- year = sa[1].toInt() + 2000;
- }
-
- dt = DateTime(year, sa[2].toInt(), sa[3].toInt(),
- sa[4].toInt(), sa[5].toInt(), sa[6].toInt(),
- 0, DateTime::E_UTC_TIME);
- time_t nextUpdate = dt.get();
+ time_t nextUpdate = dt;
setValidityPeriod(lastUpdate, nextUpdate);
@@ -400,18 +333,18 @@
i2a_ASN1_OBJECT(bio, x509->sig_alg->algorithm);
n = BIO_get_mem_data(bio, &cbuf);
- sbuf = String(cbuf, n);
+ sbuf = std::string(cbuf, n);
BIO_free(bio);
- if(sbuf.equalsIgnoreCase("sha1WithRSAEncryption") )
+ if(str::compareCI(sbuf, "sha1WithRSAEncryption") == 0 )
{
setSignatureAlgorithm(E_SHA1RSA);
}
- else if(sbuf.equalsIgnoreCase("md5WithRSAEncryption") )
+ else if(str::compareCI(sbuf, "md5WithRSAEncryption") == 0)
{
setSignatureAlgorithm(E_MD5RSA);
}
- else if(sbuf.equalsIgnoreCase("dsaWithSHA1") )
+ else if(str::compareCI(sbuf, "dsaWithSHA1") == 0 )
{
setSignatureAlgorithm(E_SHA1DSA);
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLReason.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLReason.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLReason.cpp Sat Jun 12 23:53:00 2010
@@ -24,7 +24,7 @@
#include <limal/ValueRegExCheck.hpp>
#include <limal/Exception.hpp>
#include <blocxx/Format.hpp>
-#include <blocxx/DateTime.hpp>
+#include <limal/Date.hpp>
#include <blocxx/COWIntrusiveCountableBase.hpp>
#include "Utils.hpp"
@@ -212,8 +212,8 @@
if(m_impl->compromiseDate != 0)
{
- DateTime dt(m_impl->compromiseDate);
- time = dt.toString("%Y%m%d%H%M%S") + "Z";
+ Date dt(m_impl->compromiseDate);
+ time = String(dt.form("%Y%m%d%H%M%SZ", true));
}
return time;
@@ -257,8 +257,8 @@
if(m_impl->compromiseDate != 0)
{
- DateTime dt(m_impl->compromiseDate);
- time = dt.toString("%Y%m%d%H%M%S") + "Z";
+ Date dt(m_impl->compromiseDate);
+ time = String(dt.form("%Y%m%d%H%M%SZ", true));
}
return time;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLReason_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLReason_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLReason_Priv.cpp Sat Jun 12 23:53:00 2010
@@ -30,7 +30,7 @@
#include <limal/Exception.hpp>
#include <blocxx/Format.hpp>
-#include <blocxx/DateTime.hpp>
+#include <limal/Date.hpp>
#include "Utils.hpp"
@@ -136,15 +136,15 @@
else if(nid == NID_invalidity_date)
{
// e.g. Aug 18 15:56:46 2005 GMT
- DateTime dtime(valueString);
+ Date dtime(std::string(valueString.c_str()), "%B %d %H:%M:%S %Y %Z", true);
if(getReason().equalsIgnoreCase("keyCompromise"))
{
- setKeyCompromiseDate(dtime.get());
+ setKeyCompromiseDate(dtime);
}
else if(getReason().equalsIgnoreCase("CACompromise"))
{
- setCACompromiseDate(dtime.get());
+ setCACompromiseDate(dtime);
}
else
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp Sat Jun 12 23:53:00 2010
@@ -30,7 +30,8 @@
#include <openssl/rsa.h>
#include <openssl/evp.h>
-#include <blocxx/DateTime.hpp>
+#include <limal/Date.hpp>
+#include <limal/String.hpp>
#include <limal/Exception.hpp>
#include <limal/PathInfo.hpp>
@@ -284,34 +285,9 @@
memcpy(cbuf, t->data, t->length);
cbuf[t->length] = '\0';
- String sbuf = String(cbuf);
+ std::string sbuf = std::string(cbuf);
delete [] cbuf;
-
- PerlRegEx r("^(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)Z$");
- std::vector<blocxx::String> sa = convStringArray(r.capture(sbuf));
-
- if(sa.size() != 7)
- {
- LOGIT_ERROR("Can not parse date: " << sbuf);
- BLOCXX_THROW(ca_mgm::RuntimeException,
- // %1 is an invalid date string
- Format(__("Cannot parse date %1."), sbuf).c_str());
- }
- int year = 1970;
- if(sa[1].toInt() >= 70 && sa[1].toInt() <= 99)
- {
- year = sa[1].toInt() + 1900;
- }
- else
- {
- year = sa[1].toInt() + 2000;
- }
-
- DateTime dt(year, sa[2].toInt(), sa[3].toInt(),
- sa[4].toInt(), sa[5].toInt(), sa[6].toInt(),
- 0, DateTime::E_UTC_TIME);
-
- time_t notBefore = dt.get();
+ Date notBefore(sbuf, "%y%m%d%H%M%S", true);
// get notAfter
t = X509_get_notAfter(x509);
@@ -320,32 +296,11 @@
memcpy(cbuf, t->data, t->length);
cbuf[t->length] = '\0';
- sbuf = String(cbuf);
+ sbuf = std::string(cbuf);
delete [] cbuf;
+ Date notAfter(sbuf, "%y%m%d%H%M%S", true);
- sa = convStringArray(r.capture(sbuf));
-
- if(sa.size() != 7)
- {
- LOGIT_ERROR("Can not parse date: " << sbuf);
- BLOCXX_THROW(ca_mgm::RuntimeException,
- Format(__("Cannot parse date %1."), sbuf).c_str());
- }
- year = 1970;
- if(sa[1].toInt() >= 70 && sa[1].toInt() <= 99)
- {
- year = sa[1].toInt() + 1900;
- }
- else
- {
- year = sa[1].toInt() + 2000;
- }
-
- dt = DateTime(year, sa[2].toInt(), sa[3].toInt(),
- sa[4].toInt(), sa[5].toInt(), sa[6].toInt(),
- 0, DateTime::E_UTC_TIME);
-
- setCertifyPeriode(notBefore, dt.get());
+ setCertifyPeriode(notBefore, notAfter);
// fingerprint
@@ -461,18 +416,18 @@
i2a_ASN1_OBJECT(bio, x509->cert_info->signature->algorithm);
n = BIO_get_mem_data(bio, &cbuf);
- sbuf = String(cbuf, n);
+ sbuf = std::string(cbuf, n);
BIO_free(bio);
- if(sbuf.equalsIgnoreCase("sha1WithRSAEncryption") )
+ if(str::compareCI(sbuf, "sha1WithRSAEncryption") == 0)
{
setSignatureAlgorithm( E_SHA1RSA );
}
- else if(sbuf.equalsIgnoreCase("md5WithRSAEncryption") )
+ else if(str::compareCI(sbuf, "md5WithRSAEncryption") == 0)
{
setSignatureAlgorithm( E_MD5RSA );
}
- else if(sbuf.equalsIgnoreCase("dsaWithSHA1") )
+ else if(str::compareCI(sbuf, "dsaWithSHA1") == 0)
{
setSignatureAlgorithm( E_SHA1DSA );
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp Sat Jun 12 23:53:00 2010
@@ -24,7 +24,7 @@
#include <limal/ca-mgm/CertificateIssueData.hpp>
#include <limal/Exception.hpp>
#include <blocxx/Format.hpp>
-#include <blocxx/DateTime.hpp>
+#include <limal/Date.hpp>
#include <blocxx/COWIntrusiveCountableBase.hpp>
#include "Utils.hpp"
@@ -79,12 +79,12 @@
CertificateIssueData::CertificateIssueData(CAConfig* caConfig, Type type)
: m_impl(new CertificateIssueDataImpl())
{
- m_impl->notBefore = DateTime::getCurrent().get();
+ m_impl->notBefore = Date::now();
uint32_t days = caConfig->getValue(type2Section(type, false), "default_days").toUInt32();
- DateTime dt = DateTime(getStartDate());
- dt.addDays(days);
- m_impl->notAfter = dt.get();
+ Date dt = Date(getStartDate());
+ dt += (days*24*60*60);
+ m_impl->notAfter = dt;
String md = caConfig->getValue(type2Section(type, false), "default_md");
if(md.equalsIgnoreCase("sha1"))
@@ -148,8 +148,8 @@
blocxx::String
CertificateIssueData::getStartDateAsString() const
{
- DateTime dt(getStartDate());
- String time = dt.toString("%y%m%d%H%M%S", DateTime::E_UTC_TIME) + "Z";
+ Date dt(getStartDate());
+ blocxx::String time(dt.form("%y%m%d%H%M%S", true) + "Z");
return time;
}
@@ -157,8 +157,8 @@
blocxx::String
CertificateIssueData::getEndDateAsString() const
{
- DateTime dt(getEndDate());
- String time = dt.toString("%y%m%d%H%M%S", DateTime::E_UTC_TIME) + "Z";
+ Date dt(getEndDate());
+ blocxx::String time(dt.form("%y%m%d%H%M%S", true) + "Z");
return time;
}
Added: limal-branches/mc-devel/limal-ca-mgm/src/Date.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/Date.cpp (added)
+++ limal-branches/mc-devel/limal-ca-mgm/src/Date.cpp Sat Jun 12 23:53:00 2010
@@ -0,0 +1,135 @@
+/*---------------------------------------------------------------------\
+| |
+| _ _ _ _ __ _ |
+| | | | | | \_/ | / \ | | |
+| | | | | | |_| | / /\ \ | | |
+| | |__ | | | | | | / ____ \ | |__ |
+| |____||_| |_| |_|/ / \ \|____| |
+| |
+| core library |
+| |
+| (C) SUSE Linux Products GmbH |
+\----------------------------------------------------------------------/
+
+ File: Date.cpp
+
+ Author: Michael Andres
+
+/-*/
+#include <iostream>
+
+#include <limal/Date.hpp>
+#include <limal/String.hpp>
+
+#include "Utils.hpp"
+
+using std::endl;
+
+///////////////////////////////////////////////////////////////////
+namespace ca_mgm
+{ /////////////////////////////////////////////////////////////////
+
+ static std::string adjustLocale();
+ static void restoreLocale(const std::string & locale);
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : Date::Date
+ // METHOD TYPE : Constructor
+ //
+ Date::Date( const std::string & seconds_r )
+ { str::strtonum( seconds_r, _date ); }
+
+ Date::Date( const std::string & date_str, const std::string & format, bool utc )
+ : _date(0)
+ {
+ struct tm tm = {0,0,0,0,0,0,0,0,0,0,0};
+ std::string thisLocale = adjustLocale();
+
+ char * res = ::strptime( date_str.c_str(), format.c_str(), &tm );
+ if ( res != NULL )
+ if(utc)
+ _date = ::timegm( &tm );
+ else
+ _date = ::timelocal( &tm );
+
+ restoreLocale(thisLocale);
+
+ if (res == NULL)
+ BLOCXX_THROW(ca_mgm::ValueException,
+ str::form( __("Invalid date format: '%s'"), date_str.c_str() ).c_str() );
+ }
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : Date::form
+ // METHOD TYPE : std::string
+ //
+ std::string Date::form( const std::string & format_r, bool utc ) const
+ {
+ static char buf[1024];
+ std::string thisLocale = adjustLocale();
+ if ( utc )
+ {
+ if ( ! strftime( buf, 1024, format_r.c_str(), gmtime( &_date ) ) )
+ *buf = '\0';
+ } else {
+ if ( ! strftime( buf, 1024, format_r.c_str(), localtime( &_date ) ) )
+ *buf = '\0';
+ }
+ restoreLocale(thisLocale);
+
+ return buf;
+ }
+
+ static std::string adjustLocale()
+ {
+ const char * tmp = ::setlocale( LC_TIME, NULL );
+ std::string thisLocale( tmp ? tmp : "" );
+
+ if ( thisLocale.find( "UTF-8" ) == std::string::npos
+ && thisLocale.find( "utf-8" ) == std::string::npos
+ && thisLocale != "POSIX"
+ && thisLocale != "C"
+ && thisLocale != "" )
+ {
+ // language[_territory][.codeset][@modifier]
+ // add/exchange codeset with UTF-8
+ std::string needLocale = ".UTF-8";
+ std::string::size_type loc = thisLocale.find_first_of( ".@" );
+ if ( loc != std::string::npos )
+ {
+ // prepend language[_territory]
+ needLocale = thisLocale.substr( 0, loc ) + needLocale;
+ loc = thisLocale.find_last_of( "@" );
+ if ( loc != std::string::npos )
+ {
+ // append [@modifier]
+ needLocale += thisLocale.substr( loc );
+ }
+ }
+ else
+ {
+ // append ".UTF-8"
+ needLocale = thisLocale + needLocale;
+ }
+ ::setlocale( LC_TIME, needLocale.c_str() );
+ }
+ else
+ {
+ // no need to change the locale
+ thisLocale.clear();
+ }
+
+ return thisLocale;
+ }
+
+ static void restoreLocale(const std::string & locale)
+ {
+ if ( ! locale.empty() )
+ ::setlocale( LC_TIME, locale.c_str() );
+ }
+
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
Modified: limal-branches/mc-devel/limal-ca-mgm/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/Makefile.am (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/Makefile.am Sat Jun 12 23:53:00 2010
@@ -13,6 +13,8 @@
limallib_LTLIBRARIES = liblimal-ca-mgm.la
liblimal_ca_mgm_la_SOURCES = \
+ Date.cpp \
+ String.cpp \
ValuePosixRECheck.cpp \
ValuePerlRECheck.cpp \
ValueIntCheck.cpp \
@@ -87,5 +89,5 @@
CLEANFILES = *~
DISTCLEANFILES = Commands.hpp Utils.hpp config.log
EXTRA_DIST = *.hpp Commands.hpp.in openssl.cnf.tmpl \
- INIParser/*.h INIParser/*.hpp
+ INIParser/*.h INIParser/*.hpp
Modified: limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp Sat Jun 12 23:53:00 2010
@@ -29,7 +29,7 @@
#include <blocxx/Exec.hpp>
#include <blocxx/EnvVars.hpp>
#include <blocxx/System.hpp>
-#include <blocxx/DateTime.hpp>
+#include <limal/Date.hpp>
#include "Utils.hpp"
@@ -2104,8 +2104,8 @@
{
md5 += "-" + sa[2];
- DateTime dt( sa[2].toInt64() );
- date = dt.toString("%Y-%m-%d %H:%M:%S", DateTime::E_LOCAL_TIME);
+ Date dt( sa[2].toInt64() );
+ date = String(dt.form("%Y-%m-%d %H:%M:%S"));
}
std::map<String, String> reqLine;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp Sat Jun 12 23:53:00 2010
@@ -30,7 +30,6 @@
#include <openssl/rsa.h>
#include <openssl/evp.h>
-#include <blocxx/DateTime.hpp>
#include <blocxx/Format.hpp>
#include <limal/Exception.hpp>
#include <limal/PathUtils.hpp>
Added: limal-branches/mc-devel/limal-ca-mgm/src/String.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/String.cpp (added)
+++ limal-branches/mc-devel/limal-ca-mgm/src/String.cpp Sat Jun 12 23:53:00 2010
@@ -0,0 +1,407 @@
+/*---------------------------------------------------------------------\
+| |
+| _ _ _ _ __ _ |
+| | | | | | \_/ | / \ | | |
+| | | | | | |_| | / /\ \ | | |
+| | |__ | | | | | | / ____ \ | |__ |
+| |____||_| |_| |_|/ / \ \|____| |
+| |
+| core library |
+| |
+| (C) SUSE Linux Products GmbH |
+\----------------------------------------------------------------------/
+
+ File: String.cpp
+
+ Author: Michael Andres
+
+/-*/
+
+#include <cstdio>
+#include <cstdarg>
+
+#include <iostream>
+
+#include "limal/String.hpp"
+
+using std::string;
+
+///////////////////////////////////////////////////////////////////
+namespace ca_mgm
+{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ namespace str
+ { /////////////////////////////////////////////////////////////////
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : form
+ ** FUNCTION TYPE : std::string
+ */
+ std::string form( const char * format, ... )
+ {
+ SafeBuf safe;
+
+ va_list ap;
+ va_start( ap, format );
+ vasprintf( &safe._buf, format, ap );
+ va_end( ap );
+
+ return safe.asString();
+ }
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : strerror
+ ** FUNCTION TYPE : std::string
+ */
+ std::string strerror( int errno_r )
+ {
+ return form( "(%d)%s", errno_r, ::strerror( errno_r ) );
+ }
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : strToTrue
+ ** FUNCTION TYPE : bool
+ */
+ bool strToTrue( const C_Str & str )
+ {
+ std::string t( toLower( str ) );
+ return( t == "1"
+ || t == "yes"
+ || t == "true"
+ || t == "on"
+ || strtonum<long long>( str )
+ );
+ }
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : strToFalse
+ ** FUNCTION TYPE : bool
+ */
+ bool strToFalse( const C_Str & str )
+ {
+ std::string t( toLower( str ) );
+ return ! ( t == "0"
+ || t == "no"
+ || t == "false"
+ || t == "off"
+ );
+ }
+
+ ///////////////////////////////////////////////////////////////////
+ // Hexencode
+ ///////////////////////////////////////////////////////////////////
+ namespace {
+ /** What's not decoded. */
+ inline bool heIsAlNum( char ch )
+ {
+ return ( ( 'a' <= ch && ch <= 'z' )
+ ||( 'A' <= ch && ch <= 'Z' )
+ ||( '0' <= ch && ch <= '9' ) );
+ }
+ /** Hex-digit to number or -1. */
+ inline int heDecodeCh( char ch )
+ {
+ if ( '0' <= ch && ch <= '9' )
+ return( ch - '0' );
+ if ( 'A' <= ch && ch <= 'Z' )
+ return( ch - 'A' + 10 );
+ if ( 'a' <= ch && ch <= 'z' )
+ return( ch - 'A' + 10 );
+ return -1;
+ }
+ }
+
+ std::string hexencode( const C_Str & str_r )
+ {
+ static const char *const hdig = "0123456789ABCDEF";
+ std::string res;
+ res.reserve( str_r.size() );
+ for ( const char * it = str_r.c_str(); *it; ++it )
+ {
+ if ( heIsAlNum( *it ) )
+ {
+ res += *it;
+ }
+ else
+ {
+ res += '%';
+ res += hdig[(unsigned char)(*it)/16];
+ res += hdig[(unsigned char)(*it)%16];
+ }
+ }
+ return res;
+ }
+
+ std::string hexdecode( const C_Str & str_r )
+ {
+ std::string res;
+ res.reserve( str_r.size() );
+ for_( it, str_r.c_str(), str_r.c_str()+str_r.size() )
+ {
+ if ( *it == '%' )
+ {
+ int d1 = heDecodeCh( *(it+1) );
+ if ( d1 != -1 )
+ {
+ int d2 = heDecodeCh( *(it+2) );
+ if ( d2 != -1 )
+ {
+ res += (d1<<4)|d2;
+ it += 2;
+ continue;
+ }
+ }
+ }
+ // verbatim if no %XX:
+ res += *it;
+ }
+ return res;
+ }
+ ///////////////////////////////////////////////////////////////////
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : toLower
+ ** FUNCTION TYPE : std::string
+ */
+ std::string toLower( const std::string & s )
+ {
+ if ( s.empty() )
+ return s;
+
+ std::string ret( s );
+ for ( std::string::size_type i = 0; i < ret.length(); ++i )
+ {
+ if ( isupper( ret[i] ) )
+ ret[i] = static_cast<char>(tolower( ret[i] ));
+ }
+ return ret;
+ }
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : toUpper
+ ** FUNCTION TYPE : std::string
+ */
+ std::string toUpper( const std::string & s )
+ {
+ if ( s.empty() )
+ return s;
+
+ std::string ret( s );
+ for ( std::string::size_type i = 0; i < ret.length(); ++i )
+ {
+ if ( islower( ret[i] ) )
+ ret[i] = static_cast<char>(toupper( ret[i] ));
+ }
+ return ret;
+ }
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : trim
+ ** FUNCTION TYPE : std::string
+ */
+ std::string trim( const std::string & s, const Trim trim_r )
+ {
+ if ( s.empty() || trim_r == NO_TRIM )
+ return s;
+
+ std::string ret( s );
+
+ if ( trim_r & L_TRIM )
+ {
+ std::string::size_type p = ret.find_first_not_of( " \t\n" );
+ if ( p == std::string::npos )
+ return std::string();
+
+ ret = ret.substr( p );
+ }
+
+ if ( trim_r & R_TRIM )
+ {
+ std::string::size_type p = ret.find_last_not_of( " \t\n" );
+ if ( p == std::string::npos )
+ return std::string();
+
+ ret = ret.substr( 0, p+1 );
+ }
+
+ return ret;
+ }
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : stripFirstWord
+ ** FUNCTION TYPE : std::string
+ */
+ std::string stripFirstWord( std::string & line, const bool ltrim_first )
+ {
+ if ( ltrim_first )
+ line = ltrim( line );
+
+ if ( line.empty() )
+ return line;
+
+ std::string ret;
+ std::string::size_type p = line.find_first_of( " \t" );
+
+ if ( p == std::string::npos ) {
+ // no ws on line
+ ret = line;
+ line.erase();
+ } else if ( p == 0 ) {
+ // starts with ws
+ // ret remains empty
+ line = ltrim( line );
+ }
+ else {
+ // strip word and ltim line
+ ret = line.substr( 0, p );
+ line = ltrim( line.erase( 0, p ) );
+ }
+ return ret;
+ }
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : stripLastWord
+ ** FUNCTION TYPE : std::string
+ */
+ std::string stripLastWord( std::string & line, const bool rtrim_first )
+ {
+ if ( rtrim_first )
+ line = rtrim( line );
+
+ if ( line.empty() )
+ return line;
+
+ std::string ret;
+ std::string::size_type p = line.find_last_of( " \t" );
+
+ if ( p == std::string::npos ) {
+ // no ws on line
+ ret = line;
+ line.erase();
+ } else if ( p == line.size()-1 ) {
+ // ends with ws
+ // ret remains empty
+ line = rtrim( line );
+ }
+ else {
+ // strip word and rtim line
+ ret = line.substr( p+1 );
+ line = rtrim( line.erase( p ) );
+ }
+ return ret;
+ }
+
+ string gsub(const string& sData, const string& sFrom, const string& sTo)
+ {
+ string sNew;
+ sNew.reserve(sData.size());
+
+ if (! sData.empty())
+ {
+ string::size_type frLen = sFrom.length();
+ string::size_type loc = 0;
+ string::size_type oldLoc = 0;
+
+ while (string::npos != (loc = sData.find(sFrom, loc)))
+ {
+ sNew.append(sData,oldLoc,loc-oldLoc);
+ sNew.append(sTo);
+ loc += frLen;
+ oldLoc = loc;
+ if (loc >= sData.length())
+ break;
+ }
+ if (oldLoc!=sData.size())
+ sNew.append(sData,oldLoc,sData.size()-oldLoc);
+ }
+
+ return sNew;
+ }
+
+ string & replaceAll(string & str, const string & from, const string & to)
+ {
+ string::size_type pos = 0;
+ while((pos = str.find(from, pos)) != string::npos)
+ {
+ str.replace(pos, from.size(), to);
+ pos += to.size();
+
+ if (pos >= str.length())
+ break;
+ }
+ return str;
+ }
+
+
+ std::string escape( const std::string & str_r, const char sep_r )
+ {
+ std::vector<char> buf;
+ for_( s, str_r.begin(), str_r.end() )
+ {
+ switch ( *s )
+ {
+ case '"':
+ case '\'':
+ case '\\':
+ buf.push_back( '\\' );
+ buf.push_back( *s );
+ break;
+ default:
+ if ( *s == sep_r )
+ buf.push_back( '\\' );
+ buf.push_back( *s );
+ }
+ }
+ return std::string( buf.begin(), buf.end() );
+ }
+
+
+
+ /******************************************************************
+ **
+ **
+ ** FUNCTION NAME : getline
+ ** FUNCTION TYPE : std::string
+ **
+ ** DESCRIPTION :
+ */
+ static inline std::string _getline( std::istream & str, const Trim trim_r )
+ {
+ const unsigned tmpBuffLen = 1024;
+ char tmpBuff[tmpBuffLen];
+
+ std::string ret;
+ do {
+ str.clear();
+ str.getline( tmpBuff, tmpBuffLen ); // always writes '\0' terminated
+ ret += tmpBuff;
+ } while( str.rdstate() == std::ios::failbit );
+
+ return trim( ret, trim_r );
+ }
+
+ std::string getline( std::istream & str, const Trim trim_r )
+ {
+ return _getline(str, trim_r);
+ }
+
+ std::string getline( std::istream & str, bool trim )
+ {
+ return _getline(str, trim?TRIM:NO_TRIM);
+ }
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace str
+ ///////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////
+} // namespace ca_mgm
+//////////////////////////////////////////////////////////////////
Added: limal-branches/mc-devel/limal-ca-mgm/src/limal/Date.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/Date.hpp (added)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/Date.hpp Sat Jun 12 23:53:00 2010
@@ -0,0 +1,127 @@
+/*---------------------------------------------------------------------\
+| |
+| _ _ _ _ __ _ |
+| | | | | | \_/ | / \ | | |
+| | | | | | |_| | / /\ \ | | |
+| | |__ | | | | | | / ____ \ | |__ |
+| |____||_| |_| |_|/ / \ \|____| |
+| |
+| core library |
+| |
+| (C) SUSE Linux Products GmbH |
+\----------------------------------------------------------------------/
+
+ File: Date.hpp
+
+ Author: Michael Andres
+
+/-*/
+#ifndef LIMAL_DATE_HPP
+#define LIMAL_DATE_HPP
+
+#include <ctime>
+#include <iosfwd>
+#include <string>
+
+#include "limal/Exception.hpp"
+
+///////////////////////////////////////////////////////////////////
+namespace ca_mgm
+{ /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : Date
+ //
+ /** Store and operate on date (time_t).
+ */
+ class Date
+ {
+ friend std::ostream & operator<<( std::ostream & str, const Date & obj );
+
+ public:
+
+ typedef time_t ValueType;
+
+ /** Default ctor: 0 */
+ Date()
+ : _date( 0 )
+ {}
+ /** Ctor taking time_t value. */
+ Date( ValueType date_r )
+ : _date( date_r )
+ {}
+ /** Ctor taking time_t value as string. */
+ Date( const std::string & seconds_r );
+
+ /**
+ * Ctor from a \a date_str formatted using \a format.
+ *
+ * \throws DateFormatException in case \a date_str cannot be
+ * parsed according to \a format.
+ */
+ Date( const std::string & date_str, const std::string & format, bool utc = false);
+
+ /** Return the current time. */
+ static Date now()
+ { return ::time( 0 ); }
+
+ public:
+ /** Conversion to time_t. */
+ operator ValueType() const
+ { return _date; }
+
+ /** \name Arithmetic operations.
+ * \c + \c - \c * \c / are provided via conversion to time_t.
+ */
+ //@{
+ Date & operator+=( const time_t rhs ) { _date += rhs; return *this; }
+ Date & operator-=( const time_t rhs ) { _date -= rhs; return *this; }
+ Date & operator*=( const time_t rhs ) { _date *= rhs; return *this; }
+ Date & operator/=( const time_t rhs ) { _date /= rhs; return *this; }
+
+ Date & operator++(/*prefix*/) { _date += 1; return *this; }
+ Date & operator--(/*prefix*/) { _date -= 1; return *this; }
+
+ Date operator++(int/*postfix*/) { return _date++; }
+ Date operator--(int/*postfix*/) { return _date--; }
+ //@}
+
+ public:
+ /** Return string representation according to format.
+ * \see 'man strftime' (which is used internaly) for valid
+ * conversion specifiers in format.
+ *
+ * \return An empty string on illegal format.
+ **/
+ std::string form( const std::string & format_r, bool utc = false ) const;
+
+ /** Default string representation of Date.
+ * The preferred date and time representation for the current locale.
+ **/
+ std::string asString() const
+ { return form( "%c" ); }
+
+ /** Convert to string representation of calendar time in
+ * numeric form (like "1029255142").
+ **/
+ std::string asSeconds() const
+ { return form( "%s" ); }
+
+ private:
+ /** Calendar time.
+ * The number of seconds elapsed since 00:00:00 on January 1, 1970,
+ * Coordinated Universal Time (UTC).
+ **/
+ ValueType _date;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /** \relates Date Stream output */
+ inline std::ostream & operator<<( std::ostream & str, const Date & obj )
+ { return str << obj.asString(); }
+
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // LIMAL_DATE_HPP
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/Makefile.am
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/Makefile.am (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/Makefile.am Sat Jun 12 23:53:00 2010
@@ -20,7 +20,9 @@
ByteBuffer.hpp \
UrlUtils.hpp \
UrlBase.hpp \
- Url.hpp
+ Url.hpp \
+ Date.hpp \
+ String.hpp
CLEANFILES = *~
Added: limal-branches/mc-devel/limal-ca-mgm/src/limal/String.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/String.hpp (added)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/String.hpp Sat Jun 12 23:53:00 2010
@@ -0,0 +1,789 @@
+/*---------------------------------------------------------------------\
+| |
+| _ _ _ _ __ _ |
+| | | | | | \_/ | / \ | | |
+| | | | | | |_| | / /\ \ | | |
+| | |__ | | | | | | / ____ \ | |__ |
+| |____||_| |_| |_|/ / \ \|____| |
+| |
+| core library |
+| |
+| (C) SUSE Linux Products GmbH |
+\----------------------------------------------------------------------/
+
+ File: String.hpp
+
+ Author: Michael Andres
+
+/-*/
+#ifndef LIMAL_STRING_HPP
+#define LIMAL_STRING_HPP
+
+#include <cstring>
+
+#include <iosfwd>
+#include <vector>
+#include <string>
+
+#include <stdlib.h>
+
+//#include "zypp/base/Easy.h"
+//#include "zypp/base/PtrTypes.h"
+
+#define for_(IT,BEG,END) for ( typeof(BEG) IT = BEG, _for_end = END; IT != _for_end; ++IT )
+
+///////////////////////////////////////////////////////////////////
+namespace ca_mgm
+{ /////////////////////////////////////////////////////////////////
+
+ /** Convenience \c char* constructible from \c std::string and \c char*,
+ * it maps \c (char*)0 to an empty string.
+ *
+ * \code
+ * bool hasPrefix( const std::string & str_r, const std::string & prefix_r )
+ * { return( ::strncmp( str_r.c_str(), prefix_r.c_str(), prefix_r.size() ) == 0 ); }
+ * \endcode
+ *
+ * Called with a plain \c char* as argument, the \c std::string is created form
+ * for nothing. The implementation actually does not use the \c std::string.
+ *
+ * Best would be to implement \c hasPrefix for each combination of \c char*
+ * and \c std::string arguments:
+ *
+ * \code
+ * bool hasPrefix( const std::string & str_r, const std::string & prefix_r )
+ * { return( ::strncmp( str_r.c_str(), prefix_r.c_str(), prefix_r.size() ) == 0 ); }
+ *
+ * bool hasPrefix( const std::string & str_r, const char * prefix_r )
+ * { return( !prefix_r || ::strncmp( str_r.c_str(), prefix_r, ::strlen(prefix_r) ) == 0 ); }
+ *
+ * bool hasPrefix( const char * str_r, const std::string & prefix_r )
+ * { return( str_r ? ::strncmp( str_r, prefix_r.c_str(), prefix_r.size() ) == 0 : prefix_r.empty() ); }
+ *
+ * bool hasPrefix( const char * str_r, const char * prefix_r )
+ * { return( str && prefix_r ? ::strncmp( str_r, prefix_r, ::strlen(prefix_r) ) == 0
+ * : !((str_r && *str_r) || (prefix_r && *prefix_r)); }
+ * \endcode
+ *
+ * This is where \ref C_Str can help. Constructible from \c std::string and \c char*,
+ * it \e reduces the \c std::string to it's \c char*. At the same time it converts
+ * \c (char*)0 into an \c "" string.
+ *
+ * \code
+ * bool hasPrefix( const C_Str & str_r, const C_Str & prefix_r )
+ * { return( ::strncmp( str_r, prefix_r, prefix_r.size() ) == 0 ); }
+ * \endcode
+ */
+ class C_Str
+ {
+ public:
+ typedef std::string::size_type size_type;
+
+ public:
+ C_Str() : _val( 0 ), _sze( 0 ) {}
+ C_Str( char * c_str_r ) : _val( c_str_r ), _sze( std::string::npos ) {}
+ C_Str( const char * c_str_r ) : _val( c_str_r ), _sze( std::string::npos ) {}
+ C_Str( const std::string & str_r ) : _val( str_r.c_str() ), _sze( str_r.size() ) {}
+
+ public:
+ bool isNull() const { return !_val; }
+ bool empty() const { return !(_val && *_val); }
+ size_type size() const
+ {
+ if ( _sze == std::string::npos )
+ { _sze = _val ? ::strlen( _val ) : 0; }
+ return _sze;
+ };
+
+ operator const char *() const { return c_str(); }
+ const char * c_str() const { return _val ? _val : ""; }
+
+ private:
+ const char *const _val;
+ mutable size_type _sze;
+ };
+
+ /** \relates C_Str Stream output */
+ inline std::ostream & operator<<( std::ostream & str, const C_Str & obj )
+ { return str << obj.c_str(); }
+
+ ///////////////////////////////////////////////////////////////////
+ /** String related utilities and \ref ZYPP_STR_REGEX.
+ \see \ref ZYPP_STR_REGEX
+ */
+ namespace str
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ /**
+ * Global asString() that works with std::string too
+ */
+ template<class _T>
+ inline std::string asString( const _T &t )
+ { return t.asString(); }
+
+ /*
+ template<class _T>
+ inline std::string asString( const intrusive_ptr<_T> &p )
+ { return p->asString(); }
+
+ template<class _T>
+ inline std::string asString( const weak_ptr<_T> &p )
+ { return p->asString(); }
+ */
+ template<>
+ inline std::string asString( const std::string &t )
+ { return t; }
+
+ ///////////////////////////////////////////////////////////////////
+ /** Printf style construction of std::string. */
+ std::string form( const char * format, ... )
+ __attribute__ ((format (printf, 1, 2)));
+
+ ///////////////////////////////////////////////////////////////////
+ /** Return string describing the \a error_r code.
+ * Like ::strerror, but the numerical value is included in
+ * the string as well.
+ */
+ std::string strerror( int errno_r );
+
+ ///////////////////////////////////////////////////////////////////
+ /** Assert \c free called for allocated <tt>char *</tt>.
+ * \code
+ * ...
+ * SafeBuf safe;
+ * vasprintf( &safe._buf, format, ap );
+ * return safe.asString();
+ * \endcode
+ *
+ * \ingroup g_RAII
+ */
+ struct SafeBuf
+ {
+ char * _buf;
+ SafeBuf() : _buf( 0 ) {}
+ ~SafeBuf() { if ( _buf ) free( _buf ); }
+ std::string asString() const
+ { return _buf ? std::string(_buf) : std::string(); }
+ };
+
+ ///////////////////////////////////////////////////////////////////
+ /** \name String representation of number.
+ *
+ * Optional second argument sets the minimal string width (' ' padded).
+ * Negative values will cause the number to be left adjusted within the string.
+ *
+ * Default width is 0.
+ * \code
+ * numstring(42) -> "42"
+ * numstring(42, 4) -> " 42"
+ * numstring(42,-4) -> "42 "
+ * \endcode
+ **/
+ //@{
+ inline std::string numstring( char n, int w = 0 ) { return form( "%*hhd", w, n ); }
+ inline std::string numstring( unsigned char n, int w = 0 ) { return form( "%*hhu", w, n ); }
+ inline std::string numstring( short n, int w = 0 ) { return form( "%*hd", w, n ); }
+ inline std::string numstring( unsigned short n, int w = 0 ) { return form( "%*hu", w, n ); }
+ inline std::string numstring( int n, int w = 0 ) { return form( "%*d", w, n ); }
+ inline std::string numstring( unsigned n, int w = 0 ) { return form( "%*u", w, n ); }
+ inline std::string numstring( long n, int w = 0 ) { return form( "%*ld", w, n ); }
+ inline std::string numstring( unsigned long n, int w = 0 ) { return form( "%*lu", w, n ); }
+ inline std::string numstring( long long n, int w = 0 ) { return form( "%*lld", w, n ); }
+ inline std::string numstring( unsigned long long n, int w = 0 ) { return form( "%*llu", w, n ); }
+ //@}
+
+ ///////////////////////////////////////////////////////////////////
+ /** \name String representation of number as hex value with leading '0x'.
+ * Optional second argument sets the minimal
+ * string width (0 padded). Negative values will cause the number to be left adjusted
+ * within the string. Default width is 10 (4 for char).
+ * <PRE>
+ * hexstring(42) -> "0x0000002a"
+ * hexstring(42, 4) -> "0x2a"
+ * hexstring(42,-4) -> "0x2a"
+ * </PRE>
+ **/
+ //@{
+ inline std::string hexstring( char n, int w = 4 ) { return form( "%#0*hhx", w, n ); }
+ inline std::string hexstring( unsigned char n, int w = 4 ) { return form( "%#0*hhx", w, n ); }
+ inline std::string hexstring( short n, int w = 10 ){ return form( "%#0*hx", w, n ); }
+ inline std::string hexstring( unsigned short n, int w = 10 ){ return form( "%#0*hx", w, n ); }
+ inline std::string hexstring( int n, int w = 10 ){ return form( "%#0*x", w, n ); }
+ inline std::string hexstring( unsigned n, int w = 10 ){ return form( "%#0*x", w, n ); }
+ inline std::string hexstring( long n, int w = 10 ){ return form( "%#0*lx", w, n ); }
+ inline std::string hexstring( unsigned long n, int w = 10 ){ return form( "%#0*lx", w, n ); }
+ inline std::string hexstring( long long n, int w = 0 ) { return form( "%#0*llx", w, n ); }
+ inline std::string hexstring( unsigned long long n, int w = 0 ) { return form( "%#0*llx", w, n ); }
+ //@}
+
+ ///////////////////////////////////////////////////////////////////
+ /** \name String representation of number as octal value with leading '0'.
+ * Optional second argument sets the minimal
+ * string width (0 padded). Negative values will cause the number to be left adjusted
+ * within the string. Default width is 5 (4 for char).
+ * <PRE>
+ * octstring(42) -> "00052"
+ * octstring(42, 4) -> "0052"
+ * octstring(42,-4) -> "052 "
+ * </PRE>
+ **/
+ //@{
+ inline std::string octstring( char n, int w = 4 ) { return form( "%#0*hho", w, n ); }
+ inline std::string octstring( unsigned char n, int w = 4 ) { return form( "%#0*hho", w, n ); }
+ inline std::string octstring( short n, int w = 5 ) { return form( "%#0*ho", w, n ); }
+ inline std::string octstring( unsigned short n, int w = 5 ) { return form( "%#0*ho", w, n ); }
+ inline std::string octstring( int n, int w = 5 ) { return form( "%#0*o", w, n ); }
+ inline std::string octstring( unsigned n, int w = 5 ) { return form( "%#0*o", w, n ); }
+ inline std::string octstring( long n, int w = 5 ) { return form( "%#0*lo", w, n ); }
+ inline std::string octstring( unsigned long n, int w = 5 ) { return form( "%#0*lo", w, n ); }
+ inline std::string octstring( long long n, int w = 0 ) { return form( "%#0*llo", w, n ); }
+ inline std::string octstring( unsigned long long n, int w = 0 ) { return form( "%#0*llo", w, n ); }
+ //@}
+
+ ///////////////////////////////////////////////////////////////////
+ /** Parsing numbers from string.
+ */
+ //@{
+ /** String to integer type determined by template arg.
+ * \note Only specializations are defined.
+ * \code
+ * time_t t = strtonum<time_t>( "42" );
+ * \endcode
+ */
+ template<typename _It>
+ _It strtonum( const C_Str & str );
+
+ template<>
+ inline short strtonum( const C_Str & str ) { return ::strtol ( str, NULL, 0 ); }
+ template<>
+ inline int strtonum( const C_Str & str ) { return ::strtol ( str, NULL, 0 ); }
+ template<>
+ inline long strtonum( const C_Str & str ) { return ::strtol ( str, NULL, 0 ); }
+ template<>
+ inline long long strtonum( const C_Str & str ) { return ::strtoll ( str, NULL, 0 ); }
+
+ template<>
+ inline unsigned short strtonum( const C_Str & str ) { return ::strtoul ( str, NULL, 0 ); }
+ template<>
+ inline unsigned strtonum( const C_Str & str ) { return ::strtoul ( str, NULL, 0 ); }
+ template<>
+ inline unsigned long strtonum( const C_Str & str ) { return ::strtoul ( str, NULL, 0 ); }
+ template<>
+ inline unsigned long long strtonum( const C_Str & str ) { return ::strtoull( str, NULL, 0 ); }
+
+ /** String to integer type detemined 2nd function arg \a i.
+ * \code
+ * time_t t; strtonum( "42", t );
+ * \endcode
+ */
+ template<typename _It>
+ inline _It strtonum( const C_Str & str, _It & i )
+ { return i = strtonum<_It>( str ); }
+ //@}
+
+ ///////////////////////////////////////////////////////////////////
+ /** Parsing boolean from string.
+ */
+ //@{
+ /** Return \c true if str is <tt>1, true, yes, on</tt> (or a nonzero number). */
+ bool strToTrue( const C_Str & str );
+
+ /** Return \c false if str is <tt>0, false, no, off</tt>. */
+ bool strToFalse( const C_Str & str );
+
+ /** Parse \c str into a bool depending on the default value.
+ * If the \c default is true, look for a legal \c false string.
+ * If the \c default is false, look for a legal \c true string.
+ */
+ inline bool strToBool( const C_Str & str, bool default_r )
+ { return( default_r ? strToFalse( str ) : strToTrue( str ) ); }
+
+ /** Parse \c str into a bool if it's a legal \c true or \c false string.
+ * If \c str is not a recognized \c true or \c false string, \a return_r
+ * is left unchanged.
+ */
+ inline bool strToBoolNodefault( const C_Str & str, bool & return_r )
+ {
+ if ( strToTrue( str ) ) return (return_r = true);
+ if ( !strToFalse( str ) ) return (return_r = false);
+ return return_r;
+ }
+
+ //@}
+
+ /**
+ * \short Looks for text in a string and replaces it.
+ *
+ * \note It only perform substtution in one pass
+ */
+ std::string gsub( const std::string& sData, const std::string& sFrom, const std::string& sTo);
+
+ /**
+ * \short Looks for text in string and replaces it in place
+ *
+ *
+ * \note It only perform substtution in one pass
+ * \note use only if you replace same lenght strings, otherwise use gsub
+ */
+ std::string& replaceAll( std::string & str, const std::string & from, const std::string & to);
+
+ ///////////////////////////////////////////////////////////////////
+ /** \name Split. */
+ //@{
+ /** Split \a line_r into words.
+ * Any sequence of characters in \a sepchars_r is treated as
+ * delimiter. The words are passed to OutputIterator \a result_r.
+ * \code
+ * std::vector<std::string> words;
+ * str::split( "some line", std::back_inserter(words) )
+ * \endcode
+ *
+ */
+ template<class _OutputIterator>
+ unsigned split( const C_Str & line_r,
+ _OutputIterator result_r,
+ const C_Str & sepchars_r = " \t" )
+ {
+ const char * beg = line_r;
+ const char * cur = beg;
+ // skip leading sepchars
+ while ( *cur && ::strchr( sepchars_r, *cur ) )
+ ++cur;
+ unsigned ret = 0;
+ for ( beg = cur; *beg; beg = cur, ++result_r, ++ret )
+ {
+ // skip non sepchars
+ while( *cur && !::strchr( sepchars_r, *cur ) )
+ ++cur;
+ // build string
+ *result_r = std::string( beg, cur-beg );
+ // skip sepchars
+ while ( *cur && ::strchr( sepchars_r, *cur ) )
+ ++cur;
+ }
+ return ret;
+ }
+
+ /** Split \a line_r into words with respect to escape delimeters.
+ * Any sequence of characters in \a sepchars_r is treated as
+ * delimiter if not inside "" or "" or escaped by \, but not \\.
+ * The words are passed to OutputIterator \a result_r.
+ *
+ * \see \ref splitEscaped
+ *
+ * \code
+ * std::vector<std::string> words;
+ * str::splitEscaped( "some line", std::back_inserter(words) )
+ * \endcode
+ *
+ * \code
+ * example splitted strings
+ * normal line -> 2 elements ( "normal", "line" )
+ * escaped\ line -> 1 element( "escaped line" )
+ * "quoted line" -> 1 element same as above
+ * 'quoted line' -> 1 element same as above
+ * "escaped quote\'" -> 1 element ( "escaped quote'" )
+ *
+ * \param line_r The string to parse.
+ * \param result_r
+ * \param sepchars_r String of separator characters.
+ * \param withEmpty Whether to include empty fields between separators in the result.
+ *
+ * \endcode
+ */
+ template<class _OutputIterator>
+ unsigned splitEscaped( const C_Str & line_r,
+ _OutputIterator result_r,
+ const C_Str & sepchars_r = " \t",
+ bool withEmpty = false)
+ {
+ const char * beg = line_r;
+ const char * cur = beg;
+ unsigned ret = 0;
+
+ // skip leading sepchars
+ while ( *cur && ::strchr( sepchars_r, *cur ) )
+ {
+ ++cur;
+ if (withEmpty)
+ {
+ *result_r = "";
+ ++ret;
+ }
+ }
+
+ // there were only sepchars in the string
+ if (!*cur && withEmpty)
+ {
+ *result_r = "";
+ return ++ret;
+ }
+
+ // after the leading sepchars
+ for ( beg = cur; *beg; beg = cur, ++result_r, ++ret )
+ {
+ if ( *cur == '"' || *cur == '\'' )
+ {
+ char closeChar = *cur;
+ ++cur;
+ bool cont = true;
+ while (cont)
+ {
+ while ( *cur && *cur != closeChar)
+ ++cur;
+ if ( *cur == '\0' )
+ {
+ return ret; //TODO parsing exception no closing quote
+ }
+ int escCount = 0;
+ const char * esc = cur-1;
+ while ( esc != beg && *esc == '\\' )
+ {
+ escCount++;
+ --esc;
+ }
+ cont = (escCount % 2 == 1); // find some non escaped escape char
+ cur++; //skip quote
+ }
+
+ std::string s( beg+1, cur-beg-2 ); //without quotes
+ //transform escaped escape
+ replaceAll( s, "\\\\", "\\" );
+ //transform escaped quotes (only same as open
+ char tmpn[2] = { closeChar, 0 };
+ char tmpo[3] = { '\\', closeChar, 0 };
+ replaceAll( s, tmpo, tmpn );
+
+ *result_r = s;
+ }
+ else
+ {
+ // skip non sepchars
+ while( *cur && !::strchr( sepchars_r, *cur ) )
+ {
+ //ignore char after backslash
+ if ( *cur == '\\' )
+ {
+ ++cur;
+ }
+ ++cur;
+ }
+ // build string
+ std::string s( beg, cur-beg );
+ //transform escaped escape
+ replaceAll( s, "\\\\", "\\" );
+
+ const char *delimeter = sepchars_r;
+ while ( *delimeter )
+ {
+ std::string ds("\\");
+ const char tmp[2] = { *delimeter, '\0' };
+ std::string del(tmp);
+ ds+= del;
+ replaceAll( s, ds, del );
+ ++delimeter;
+ }
+
+ *result_r = s;
+ }
+ // skip sepchars
+ if ( *cur && ::strchr( sepchars_r, *cur ) )
+ ++cur;
+ while ( *cur && ::strchr( sepchars_r, *cur ) )
+ {
+ ++cur;
+ if (withEmpty)
+ {
+ *result_r = "";
+ ++ret;
+ }
+ }
+ // the last was a separator => one more field
+ if ( !*cur && withEmpty && ::strchr( sepchars_r, *(cur-1) ) )
+ {
+ *result_r = "";
+ ++ret;
+ }
+ }
+ return ret;
+ }
+
+ /** Split \a line_r into fields.
+ * Any single character in \a sepchars_r is treated as a
+ * field separator. The words are passed to OutputIterator
+ * \a result_r.
+ * \code
+ * "" -> words 0
+ * ":" -> words 2 |||
+ * "a" -> words 1 |a|
+ * ":a" -> words 2 ||a|
+ * "a:" -> words 2 |a||
+ * ":a:" -> words 3 ||a||
+ *
+ * \endcode
+ *
+ * \code
+ * std::vector<std::string> words;
+ * str::split( "some line", std::back_inserter(words) )
+ * \endcode
+ *
+ */
+ template<class _OutputIterator>
+ unsigned splitFields( const C_Str & line_r,
+ _OutputIterator result_r,
+ const C_Str & sepchars_r = ":" )
+ {
+ const char * beg = line_r;
+ const char * cur = beg;
+ unsigned ret = 0;
+ for ( beg = cur; *beg; beg = cur, ++result_r )
+ {
+ // skip non sepchars
+ while( *cur && !::strchr( sepchars_r, *cur ) )
+ ++cur;
+ // build string
+ *result_r = std::string( beg, cur-beg );
+ ++ret;
+ // skip sepchar
+ if ( *cur )
+ {
+ ++cur;
+ if ( ! *cur ) // ending with sepchar
+ {
+ *result_r = std::string(); // add final empty field
+ ++ret;
+ break;
+ }
+ }
+ }
+ return ret;
+ }
+
+ /**
+ * Split \a line_r into fields handling also escaped separators.
+ *
+ * \see splitFields()
+ * \see splitEscaped()
+ */
+ template<class _OutputIterator>
+ unsigned splitFieldsEscaped( const C_Str & line_r,
+ _OutputIterator result_r,
+ const C_Str & sepchars_r = ":" )
+ {
+ return
+ splitEscaped( line_r, result_r, sepchars_r, true /* withEmpty */ );
+ }
+
+ //@}
+
+ ///////////////////////////////////////////////////////////////////
+ /** \name Join. */
+ //@{
+ /** Join strings using separator \a sep_r (defaults to BLANK). */
+ template <class _Iterator>
+ std::string join( _Iterator begin, _Iterator end,
+ const C_Str & sep_r = " " )
+ {
+ std::string res;
+ for ( _Iterator iter = begin; iter != end; ++ iter )
+ {
+ if ( iter != begin )
+ res += sep_r;
+ res += asString(*iter);
+ }
+ return res;
+ }
+
+ /** Join strings using separator \a sep_r (defaults to BLANK). */
+ template <class _Container>
+ std::string join( const _Container & cont_r,
+ const C_Str & sep_r = " " )
+ { return join( cont_r.begin(), cont_r.end(), sep_r ); }
+
+ /** Join strings using separator \a sep_r, quoting or escaping the values.
+ * Separator defaults to BLANK. Use \ref splitEscaped to restore the
+ * values.
+ */
+ template <class _Iterator>
+ std::string joinEscaped( _Iterator begin, _Iterator end,
+ const char sep_r = ' ' )
+ {
+ std::vector<char> buf;
+ for ( _Iterator iter = begin; iter != end; ++ iter )
+ {
+ if ( iter != begin )
+ buf.push_back( sep_r );
+
+ if ( iter->empty() )
+ {
+ // empty string goes ""
+ buf.push_back( '"' );
+ buf.push_back( '"' );
+ }
+ else
+ {
+ std::string toadd( asString(*iter) );
+ for_( ch, toadd.begin(), toadd.end() )
+ {
+ switch ( *ch )
+ {
+ case '"':
+ case '\'':
+ case '\\':
+ buf.push_back( '\\' );
+ buf.push_back( *ch );
+ break;
+ default:
+ if ( *ch == sep_r )
+ buf.push_back( '\\' );
+ buf.push_back( *ch );
+ }
+ }
+ }
+ }
+ return std::string( buf.begin(), buf.end() );
+ }
+
+
+ /**
+ * Escape desired character \a c using a backslash.
+ *
+ * For use when printing \a c separated values, and where
+ * \ref joinEscaped() is too heavy.
+ *
+ * \todo use C_Str instead of std::string to prevent unnecessary
+ * promotion to string if used with "string".
+ *
+ * \todo shoud not be documented in doxy-group 'Join'
+ */
+ std::string escape(const std::string & str_r, const char c = ' ' );
+
+ //! \todo unsecape()
+
+ //@}
+ ///////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ /** \name Hexencode.
+ * Encode all characters other than [a-zA-Z0-9] as %XX.
+ * This includes the % character itself, which becomes %25.
+ */
+ //@{
+ /** Encode all characters other than [a-zA-Z0-9] as %XX.
+ * This includes the % character itself, which becomes %25.
+ */
+ std::string hexencode( const C_Str & str_r );
+ /** Decode hexencoded %XX sequences. */
+ std::string hexdecode( const C_Str & str_r );
+ //@}
+ ///////////////////////////////////////////////////////////////////
+
+ /** \name Case conversion. */
+ //@{
+ /** Return lowercase version of \a s
+ * \todo improve
+ */
+ std::string toLower( const std::string & s );
+ /** \overload */
+ inline std::string toLower( const char * s )
+ { return( s ? toLower( std::string(s) ) : std::string() ); }
+
+ /** Return uppercase version of \a s
+ * \todo improve
+ */
+ std::string toUpper( const std::string & s );
+ /** \overload */
+ inline std::string toUpper( const char * s )
+ { return( s ? toUpper( std::string(s) ) : std::string() ); }
+ //@}
+
+
+ /** \name Case insensitive comparison. */
+ //@{
+ inline int compareCI( const C_Str & lhs, const C_Str & rhs )
+ {
+ if ( lhs == rhs )
+ return 0;
+ return ::strcasecmp( lhs, rhs );
+ }
+ //@}
+
+ /** \name Locate substring. */
+ //@{
+ /** Locate substring case sensitive. */
+ inline bool contains( const C_Str & str_r, const C_Str & val_r )
+ { return ::strstr( str_r, val_r ); }
+ /** Locate substring case insensitive. */
+ inline bool containsCI( const C_Str & str_r, const C_Str & val_r )
+ { return ::strcasestr( str_r, val_r ); }
+ //@}
+
+ ///////////////////////////////////////////////////////////////////
+ /** \name Trimming whitepace.
+ * \todo optimize l/r trim.
+ */
+ //@{
+ /** To define how to trim. */
+ enum Trim {
+ NO_TRIM = 0x00,
+ L_TRIM = 0x01,
+ R_TRIM = 0x02,
+ TRIM = (L_TRIM|R_TRIM)
+ };
+
+ std::string trim( const std::string & s, const Trim trim_r = TRIM );
+
+ inline std::string ltrim( const std::string & s )
+ { return trim( s, L_TRIM ); }
+
+ inline std::string rtrim( const std::string & s )
+ { return trim( s, R_TRIM ); }
+ //@}
+
+ std::string stripFirstWord( std::string & line, const bool ltrim_first );
+
+ std::string stripLastWord( std::string & line, const bool rtrim_first );
+
+ std::string getline( std::istream & str, bool trim = false );
+
+ std::string getline( std::istream & str, const Trim trim_r );
+
+ ///////////////////////////////////////////////////////////////////
+
+ /** \name String prefix/suffix handling.
+ */
+ //@{
+ /** Return whether \a str_r has prefix \a prefix_r. */
+ inline bool hasPrefix( const C_Str & str_r, const C_Str & prefix_r )
+ { return( ::strncmp( str_r, prefix_r, prefix_r.size() ) == 0 ); }
+
+ /** Strip a \a prefix_r from \a str_r and return the resulting string. */
+ inline std::string stripPrefix( const C_Str & str_r, const C_Str & prefix_r )
+ { return( hasPrefix( str_r, prefix_r ) ? str_r + prefix_r.size() : str_r.c_str() ); }
+
+ /** Return whether \a str_r has suffix \a suffix_r. */
+ inline bool hasSuffix( const C_Str & str_r, const C_Str & suffix_r )
+ { return( str_r.size() >= suffix_r.size() && ::strncmp( str_r + str_r.size() - suffix_r.size() , suffix_r, suffix_r.size() ) == 0 ); }
+
+ /** Strip a \a suffix_r from \a str_r and return the resulting string. */
+ inline std::string stripSuffix( const C_Str & str_r, const C_Str & suffix_r )
+ {
+ if ( hasSuffix( str_r, suffix_r ) )
+ return std::string( str_r, str_r.size() - suffix_r.size() );
+ return str_r.c_str();
+ }
+
+ /** alias for \ref hasPrefix */
+ inline bool startsWith( const C_Str & str_r, const C_Str & prefix_r )
+ { return hasPrefix( str_r, prefix_r ); }
+ /** alias for \ref hasSuffix */
+ inline bool endsWith( const C_Str & str_r, const C_Str & prefix_r )
+ { return hasSuffix( str_r, prefix_r ); }
+ //@}
+ /////////////////////////////////////////////////////////////////
+ } // namespace str
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace ca_mgm
+///////////////////////////////////////////////////////////////////
+#endif // LIMAL_STRING_HPP
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt Sat Jun 12 23:53:00 2010
@@ -1,14 +1,14 @@
-b4d4e48e6de644c953290eb2854a6ced-1276349522 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-bc5324c7f5c2a27492fb6795745b596b-1276349524 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1276349528 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1276349531 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1276349534 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1276349542 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c293624b6a877f401407ce8f8f1f327e-1276349543 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1276349545 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c1943ae4b9bd7320fae3e29f217483e3-1276349546 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
-d816690a832b0e52becd255d3a62e975-1276349550 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-9198f6798d9da70d7cbfb67b610633f5-1276349554 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-3e248858337c2b46dc67a0f9389376dd-1276349556 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-bf04fdd95062554800c1556085f47063-1276349559 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-9797ac11af29f94b82c1e5b0499ab5f2-1276349560 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276379457 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+bc5324c7f5c2a27492fb6795745b596b-1276379459 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276379465 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276379469 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276379472 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276379481 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c293624b6a877f401407ce8f8f1f327e-1276379482 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276379484 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c1943ae4b9bd7320fae3e29f217483e3-1276379485 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
+d816690a832b0e52becd255d3a62e975-1276379486 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+9198f6798d9da70d7cbfb67b610633f5-1276379491 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+3e248858337c2b46dc67a0f9389376dd-1276379492 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+bf04fdd95062554800c1556085f47063-1276379493 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+9797ac11af29f94b82c1e5b0499ab5f2-1276379496 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt Sat Jun 12 23:53:00 2010
@@ -1,11 +1,11 @@
-V 110612133204Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110612133204Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110612133206Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110612133209Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110612133212Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-R 110612133228Z 100612133230Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
-R 110612133230Z 100612133233Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-R 110612133234Z 100612133236Z,keyTime,20100612151556Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-R 110612133236Z 100612133238Z,CAkeyTime,20100612151558Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-R 110612133238Z 100612133239Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-V 120611133240Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+V 110612215059Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110612215059Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110612215103Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110612215106Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110612215110Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+R 110612215125Z 100612215126Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
+R 110612215126Z 100612215130Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+R 110612215131Z 100612215131Z,keyTime,20100612213451Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+R 110612215132Z 100612215133Z,CAkeyTime,20100612213452Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+R 110612215133Z 100612215135Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+V 120611215136Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
Binary files - no diff available.
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem Sat Jun 12 23:53:00 2010
@@ -1,7 +1,7 @@
-----BEGIN X509 CRL-----
MIIC+TCCAeECAQEwDQYJKoZIhvcNAQEFBQAwQzELMAkGA1UEBhMCREUxFzAVBgNV
BAMTDlN0YXRpYyBUZXN0IENBMRswGQYJKoZIhvcNAQkBFgxzdXNlQHN1c2UuZGUX
-DTEwMDYxMjEzMzI0MloXDTEwMDYxMzEzMzI0MlowgfAwEgIBAxcNMDUwODE4MTQx
+DTEwMDYxMjIxNTEzOFoXDTEwMDYxMzIxNTEzOFowgfAwEgIBAxcNMDUwODE4MTQx
MzIzWjAyAgEEFw0wNTA4MTgxNDEzMjVaMB4wCgYDVR0VBAMKAQYwEAYDVR0XBAkG
ByqGSM44AgIwOgIBBRcNMDUwODE4MTQxMzI2WjAmMAoGA1UdFQQDCgEBMBgGA1Ud
GAQRGA8yMDA1MDgxODE1NTY0NlowOgIBBhcNMDUwODE4MTQxMzI4WjAmMAoGA1Ud
@@ -9,10 +9,10 @@
ODE4WjAaMAoGA1UdFQQDCgEGMAwGA1UdFwQFBgMuFSugdzB1MHMGA1UdIwRsMGqA
FDIAwASkKojCPsrVvdhM01KIIH87oUekRTBDMQswCQYDVQQGEwJERTEXMBUGA1UE
AxMOU3RhdGljIFRlc3QgQ0ExGzAZBgkqhkiG9w0BCQEWDHN1c2VAc3VzZS5kZYIJ
-AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQBX/NdnQGnTnXoCUolvtVcY/Av3
-bkp8o8AXuNJ7UYndgqCF1Im5xT2c8ZVVftolb/ThgseCKbeFZJ3vMdkZOfqZuITh
-jrbgYgmkUKohCsJG5NmvGIpdTRGszreVoVbWz7Gp25qSmUgq+7VGD6Zj2NwmNKFH
-5YJfYdwRw2lsY0tfkNSlVqxO2XeBDqAqm2+4vLdPPpba2UfbiIoEF2LLKHT+43VP
-kfwzB5tgngtab8AZ+5kFPlcbghxfYb1ajHF5LnCjb5kM3Xj6NP4t8bszM5omnKVf
-ZTi4J99C7uShLnxYxN1Oh5u2QHOPvSlBLaLEfj8tbdOPzEmMheuGh/y0cgMb
+AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQAuCzexvYgJxzwNNm0CNqu++P6D
+9QloSbMtTl+eZZb8xtXHo7ZKRBXfWdIulv8INN5S3lLZMKxUvbrUWPdRNWvGBAS2
+iFdOykY/KUr25u/MGkIadqObtViyYPK4zPozEdegqOPcR7h5sDMCd76rkaqLP5tS
+vg98Sfthx96uAdxKPuKl4Kz9r4h6TbVC98aIjpi6VIAtiZGX9i+GQt7Rf8thi04f
+46DZNbbBmDbFSzgyc4H94qPx3HHgMAmnrNXRgjcjQjXuPJTT/1x+zRArR97c+tRt
+k9jvziQPQIp1K1XVewlXYAM7BYhyy7wwEZalarOqCmoagJNqpWyzGT5wwqbT
-----END X509 CRL-----
--
To unsubscribe, e-mail: limal-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: limal-commit+help(a)opensuse.org
1
0
r2671 - in /limal-branches/mc-devel/limal-ca-mgm: src/ src/limal/ src/limal/ca-mgm/ testsuite/TestRepos/Test_CA1/ testsuite/TestRepos/Test_CA2/ testsuite/TestRepos/Test_CA2/crl/
by mcalmer@svn.opensuse.org 12 Jun '10
by mcalmer@svn.opensuse.org 12 Jun '10
12 Jun '10
Author: mcalmer
Date: Sat Jun 12 15:33:41 2010
New Revision: 2671
URL: http://svn.opensuse.org/viewcvs/limal?rev=2671&view=rev
Log:
blocxx int types to standard int types
Modified:
limal-branches/mc-devel/limal-ca-mgm/src/BasicConstraintsExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/BitExtensions.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLDataImpl.hpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.hpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLGenerationData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificateData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificateDataImpl.hpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.hpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp
limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.hpp
limal-branches/mc-devel/limal-ca-mgm/src/LiteralValues.cpp
limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp
limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp
limal-branches/mc-devel/limal-ca-mgm/src/PathName.cpp
limal-branches/mc-devel/limal-ca-mgm/src/RequestData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/RequestDataImpl.hpp
limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.hpp
limal-branches/mc-devel/limal-ca-mgm/src/RequestGenerationData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp
limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp
limal-branches/mc-devel/limal-ca-mgm/src/ValueIntCheck.cpp
limal-branches/mc-devel/limal-ca-mgm/src/ValuePerlRECheck.cpp
limal-branches/mc-devel/limal-ca-mgm/src/ValuePosixRECheck.cpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/Logger.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueIntCheck.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ValuePerlRECheck.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ValuePosixRECheck.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BasicConstraintsExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BitExtensions.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLGenerationData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/LiteralValues.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestGenerationData.hpp
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
Modified: limal-branches/mc-devel/limal-ca-mgm/src/BasicConstraintsExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/BasicConstraintsExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/BasicConstraintsExtension.cpp Sat Jun 12 15:33:41 2010
@@ -43,7 +43,7 @@
, pathlen(-1)
{}
- BasicConstraintsExtImpl(bool isCA, blocxx::Int32 pathLength)
+ BasicConstraintsExtImpl(bool isCA, int32_t pathLength)
: ca(isCA)
, pathlen(pathLength)
{}
@@ -60,7 +60,7 @@
}
bool ca;
- blocxx::Int32 pathlen;
+ int32_t pathlen;
};
@@ -86,7 +86,7 @@
if(p)
{
bool isCA = false;
- blocxx::Int32 pl = -1;
+ int32_t pl = -1;
std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
.split(caConfig->getValue(type2Section(type, true), "basicConstraints")));
@@ -108,7 +108,7 @@
setPresent(p);
}
-BasicConstraintsExt::BasicConstraintsExt(bool isCa, blocxx::Int32 pathLength)
+BasicConstraintsExt::BasicConstraintsExt(bool isCa, int32_t pathLength)
: ExtensionBase()
, m_impl(new BasicConstraintsExtImpl(isCa, pathLength))
{
@@ -136,7 +136,7 @@
}
void
-BasicConstraintsExt::setBasicConstraints(bool isCa, blocxx::Int32 pathLength)
+BasicConstraintsExt::setBasicConstraints(bool isCa, int32_t pathLength)
{
m_impl->ca = isCa;
m_impl->pathlen = pathLength;
@@ -155,7 +155,7 @@
return m_impl->ca;
}
-blocxx::Int32
+int32_t
BasicConstraintsExt::getPathLength() const
{
if(!isPresent())
Modified: limal-branches/mc-devel/limal-ca-mgm/src/BitExtensions.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/BitExtensions.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/BitExtensions.cpp Sat Jun 12 15:33:41 2010
@@ -41,7 +41,7 @@
: value(0)
{}
- BitExtensionImpl(blocxx::UInt32 val)
+ BitExtensionImpl(uint32_t val)
: value(val)
{}
@@ -57,7 +57,7 @@
return new BitExtensionImpl(*this);
}
- blocxx::UInt32 value;
+ uint32_t value;
};
@@ -69,7 +69,7 @@
, m_impl(new BitExtensionImpl())
{}
-BitExtension::BitExtension(blocxx::UInt32 value)
+BitExtension::BitExtension(uint32_t value)
: ExtensionBase()
, m_impl(new BitExtensionImpl(value))
{}
@@ -94,13 +94,13 @@
}
void
-BitExtension::setValue(blocxx::UInt32 value)
+BitExtension::setValue(uint32_t value)
{
m_impl->value = value;
setPresent(true); // ??
}
-blocxx::UInt32
+uint32_t
BitExtension::getValue() const
{
if(!isPresent())
@@ -135,7 +135,7 @@
bool p = caConfig->exists(type2Section(type, true), "keyUsage");
if(p)
{
- blocxx::UInt32 keyUsage = 0;
+ uint32_t keyUsage = 0;
String ku = caConfig->getValue(type2Section(type, true), "keyUsage");
std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*").split(ku));
@@ -163,7 +163,7 @@
setPresent(p);
}
-KeyUsageExt::KeyUsageExt(blocxx::UInt32 keyUsage)
+KeyUsageExt::KeyUsageExt(uint32_t keyUsage)
: BitExtension(keyUsage)
{
if(!validKeyUsage(keyUsage))
@@ -193,7 +193,7 @@
}
void
-KeyUsageExt::setKeyUsage(blocxx::UInt32 keyUsage)
+KeyUsageExt::setKeyUsage(uint32_t keyUsage)
{
if(!validKeyUsage(keyUsage))
{
@@ -204,7 +204,7 @@
setPresent(true);
}
-blocxx::UInt32
+uint32_t
KeyUsageExt::getKeyUsage() const
{
if(!isPresent())
@@ -341,9 +341,9 @@
bool
-KeyUsageExt::validKeyUsage(blocxx::UInt32 keyUsage) const
+KeyUsageExt::validKeyUsage(uint32_t keyUsage) const
{
- UInt32 mask = 0x80FF;
+ uint32_t mask = 0x80FF;
if( (keyUsage&mask) != keyUsage || keyUsage == 0)
{
return false;
@@ -375,7 +375,7 @@
bool p = caConfig->exists(type2Section(type, true), "nsCertType");
if(p)
{
- blocxx::UInt32 bits = 0;
+ uint32_t bits = 0;
String ct = caConfig->getValue(type2Section(type, true), "nsCertType");
std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*").split(ct));
@@ -401,7 +401,7 @@
setPresent(p);
}
-NsCertTypeExt::NsCertTypeExt(blocxx::UInt32 nsCertTypes)
+NsCertTypeExt::NsCertTypeExt(uint32_t nsCertTypes)
: BitExtension(nsCertTypes)
{
if(nsCertTypes > 0xFF || nsCertTypes == 0)
@@ -431,7 +431,7 @@
}
void
-NsCertTypeExt::setNsCertType(blocxx::UInt32 nsCertTypes)
+NsCertTypeExt::setNsCertType(uint32_t nsCertTypes)
{
if(nsCertTypes > 0xFF || nsCertTypes == 0)
{
@@ -442,7 +442,7 @@
setPresent(true);
}
-blocxx::UInt32
+uint32_t
NsCertTypeExt::getNsCertType() const
{
if(!isPresent())
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp Sat Jun 12 15:33:41 2010
@@ -137,7 +137,7 @@
return *this;
}
-blocxx::Int32
+int32_t
CRLData::getVersion() const
{
return m_impl->version;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLDataImpl.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLDataImpl.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLDataImpl.hpp Sat Jun 12 15:33:41 2010
@@ -104,7 +104,7 @@
return new CRLDataImpl(*this);
}
- blocxx::Int32 version;
+ int32_t version;
String fingerprint;
time_t lastUpdate;
time_t nextUpdate;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp Sat Jun 12 15:33:41 2010
@@ -211,7 +211,7 @@
{}
void
-CRLData_Priv::setVersion(blocxx::Int32 version)
+CRLData_Priv::setVersion(int32_t version)
{
m_impl->version = version;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.hpp Sat Jun 12 15:33:41 2010
@@ -62,7 +62,7 @@
virtual ~CRLData_Priv();
void
- setVersion(blocxx::Int32 version);
+ setVersion(int32_t version);
void
setFingerprint(const String& fp);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLGenerationData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLGenerationData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLGenerationData.cpp Sat Jun 12 15:33:41 2010
@@ -43,7 +43,7 @@
, extensions(X509v3CRLGenerationExts())
{}
- CRLGenerationDataImpl(blocxx::UInt32 hours,
+ CRLGenerationDataImpl(uint32_t hours,
const X509v3CRLGenerationExts& ext)
: crlHours(hours)
, extensions(ext)
@@ -62,7 +62,7 @@
return new CRLGenerationDataImpl(*this);
}
- blocxx::UInt32 crlHours;
+ uint32_t crlHours;
X509v3CRLGenerationExts extensions;
};
@@ -79,7 +79,7 @@
m_impl->crlHours = caConfig->getValue(type2Section(type, false), "default_crl_hours").toUInt32();
}
-CRLGenerationData::CRLGenerationData(blocxx::UInt32 hours,
+CRLGenerationData::CRLGenerationData(uint32_t hours,
const X509v3CRLGenerationExts& ext)
: m_impl(new CRLGenerationDataImpl(hours, ext))
{
@@ -109,12 +109,12 @@
}
void
-CRLGenerationData::setCRLLifeTime(blocxx::UInt32 hours)
+CRLGenerationData::setCRLLifeTime(uint32_t hours)
{
m_impl->crlHours = hours;
}
-blocxx::UInt32
+uint32_t
CRLGenerationData::getCRLLifeTime() const
{
return m_impl->crlHours;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificateData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificateData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificateData.cpp Sat Jun 12 15:33:41 2010
@@ -54,7 +54,7 @@
return *this;
}
-blocxx::UInt32
+uint32_t
CertificateData::getVersion() const
{
return m_impl->version;
@@ -90,7 +90,7 @@
return m_impl->subject;
}
-blocxx::UInt32
+uint32_t
CertificateData::getKeysize() const
{
return m_impl->keysize;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificateDataImpl.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificateDataImpl.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificateDataImpl.hpp Sat Jun 12 15:33:41 2010
@@ -83,7 +83,7 @@
return new CertificateDataImpl(*this);
}
- blocxx::UInt32 version; // allowed 1, 2, 3
+ uint32_t version; // allowed 1, 2, 3
String serial;
String fingerprint;
time_t notBefore;
@@ -91,7 +91,7 @@
DNObject issuer;
DNObject subject;
- blocxx::UInt32 keysize;
+ uint32_t keysize;
KeyAlg pubkeyAlgorithm;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp Sat Jun 12 15:33:41 2010
@@ -76,7 +76,7 @@
}
void
-CertificateData_Priv::setVersion(blocxx::UInt32 v)
+CertificateData_Priv::setVersion(uint32_t v)
{
m_impl->version = v;
}
@@ -126,7 +126,7 @@
}
void
-CertificateData_Priv::setKeysize(blocxx::UInt32 size)
+CertificateData_Priv::setKeysize(uint32_t size)
{
m_impl->keysize = size;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.hpp Sat Jun 12 15:33:41 2010
@@ -53,7 +53,7 @@
virtual ~CertificateData_Priv();
void
- setVersion(blocxx::UInt32 v);
+ setVersion(uint32_t v);
void
setSerial(const String& serial);
@@ -68,7 +68,7 @@
setSubjectDN(const DNObject& subject);
void
- setKeysize(blocxx::UInt32 size);
+ setKeysize(uint32_t size);
void
setPublicKeyAlgorithm(KeyAlg pubKeyAlg);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp Sat Jun 12 15:33:41 2010
@@ -81,7 +81,7 @@
{
m_impl->notBefore = DateTime::getCurrent().get();
- UInt32 days = caConfig->getValue(type2Section(type, false), "default_days").toUInt32();
+ uint32_t days = caConfig->getValue(type2Section(type, false), "default_days").toUInt32();
DateTime dt = DateTime(getStartDate());
dt.addDays(days);
m_impl->notAfter = dt.get();
@@ -216,7 +216,7 @@
BLOCXX_THROW(ca_mgm::ValueException,
Format(__("Wrong type: %1."), type).c_str());
}
- UInt32 t = (UInt32)((getEndDate() - getStartDate())/(60*60*24));
+ uint32_t t = (uint32_t)((getEndDate() - getStartDate())/(60*60*24));
ca.getConfig()->setValue(type2Section(type, false), "default_days", String(t));
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp Sat Jun 12 15:33:41 2010
@@ -40,7 +40,7 @@
UserNoticeImpl()
: explicitText("")
, organization("")
- , noticeNumbers(std::list<blocxx::Int32>())
+ , noticeNumbers(std::list<int32_t>())
{}
UserNoticeImpl(const UserNoticeImpl& impl)
@@ -63,7 +63,7 @@
// (if included) must BOTH be present.
String organization; // max 200 characters
- std::list<blocxx::Int32> noticeNumbers;
+ std::list<int32_t> noticeNumbers;
};
@@ -225,7 +225,7 @@
void
UserNotice::setOrganizationNotice(const String& org,
- const std::list<blocxx::Int32>& numbers)
+ const std::list<int32_t>& numbers)
{
m_impl->organization = org;
m_impl->noticeNumbers = numbers;
@@ -237,14 +237,14 @@
return m_impl->organization;
}
-std::list<blocxx::Int32>
+std::list<int32_t>
UserNotice::getNoticeNumbers() const
{
return m_impl->noticeNumbers;
}
blocxx::String
-UserNotice::commit2Config(CA& ca, Type type, blocxx::UInt32 num) const
+UserNotice::commit2Config(CA& ca, Type type, uint32_t num) const
{
if(!valid())
{
@@ -275,7 +275,7 @@
ca.getConfig()->setValue(sectionName, "organization", m_impl->organization);
String numbers;
- std::list<blocxx::Int32>::const_iterator it = m_impl->noticeNumbers.begin();
+ std::list<int32_t>::const_iterator it = m_impl->noticeNumbers.begin();
for(;it != m_impl->noticeNumbers.end(); ++it)
{
numbers += String(*it)+",";
@@ -333,7 +333,7 @@
result.push_back("organization = " + m_impl->organization);
String n;
- std::list< blocxx::Int32 >::const_iterator it = m_impl->noticeNumbers.begin();
+ std::list< int32_t >::const_iterator it = m_impl->noticeNumbers.begin();
for(; it != m_impl->noticeNumbers.end(); ++it)
{
n += String(*it) + " ";
@@ -503,7 +503,7 @@
}
blocxx::String
-CertificatePolicy::commit2Config(CA& ca, Type type, blocxx::UInt32 num) const
+CertificatePolicy::commit2Config(CA& ca, Type type, uint32_t num) const
{
if(!valid())
{
@@ -531,13 +531,13 @@
ca.getConfig()->setValue(sectionName, "policyIdentifier", m_impl->policyIdentifier);
StringList::const_iterator it = m_impl->cpsURI.begin();
- for(blocxx::UInt32 i = 1;it != m_impl->cpsURI.end(); ++it, ++i)
+ for(uint32_t i = 1;it != m_impl->cpsURI.end(); ++it, ++i)
{
ca.getConfig()->setValue(sectionName, "CPS."+String(i),(*it));
}
std::list<UserNotice>::const_iterator nit = m_impl->noticeList.begin();
- for(blocxx::UInt32 j = 1;nit != m_impl->noticeList.end(); ++nit, ++j)
+ for(uint32_t j = 1;nit != m_impl->noticeList.end(); ++nit, ++j)
{
String n = (*nit).commit2Config(ca, type, j);
ca.getConfig()->setValue(sectionName, "userNotice."+String(j),n);
@@ -837,7 +837,7 @@
if(m_impl->ia5org) extString += "ia5org,";
std::list<CertificatePolicy>::const_iterator it = m_impl->policies.begin();
- for(blocxx::UInt32 i = 0;it != m_impl->policies.end(); ++it, ++i)
+ for(uint32_t i = 0;it != m_impl->policies.end(); ++it, ++i)
{
extString += (*it).commit2Config(ca, type, i) + ",";
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp Sat Jun 12 15:33:41 2010
@@ -61,8 +61,8 @@
blocxx::String value;
blocxx::String prompt;
- blocxx::UInt32 min;
- blocxx::UInt32 max;
+ uint32_t min;
+ uint32_t max;
};
class DNObjectImpl : public blocxx::COWIntrusiveCountableBase
Modified: limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp Sat Jun 12 15:33:41 2010
@@ -38,8 +38,8 @@
RDNObject_Priv::RDNObject_Priv(const String& type, const String& value,
const String& prompt,
- blocxx::UInt32 min,
- blocxx::UInt32 max)
+ uint32_t min,
+ uint32_t max)
: RDNObject()
{
m_impl->type = type;
@@ -55,8 +55,8 @@
void
RDNObject_Priv::setRDN(const String& type, const String& value,
const String& prompt,
- blocxx::UInt32 min,
- blocxx::UInt32 max)
+ uint32_t min,
+ uint32_t max)
{
m_impl->type = type;
m_impl->value = value;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.hpp Sat Jun 12 15:33:41 2010
@@ -37,8 +37,8 @@
RDNObject_Priv();
RDNObject_Priv(const String& type, const String& value,
const String& prompt = String(),
- blocxx::UInt32 min = 0,
- blocxx::UInt32 max = 0);
+ uint32_t min = 0,
+ uint32_t max = 0);
virtual ~RDNObject_Priv();
@@ -53,8 +53,8 @@
*/
void setRDN(const String& type, const String& value,
const String& prompt = String(),
- blocxx::UInt32 min = 0,
- blocxx::UInt32 max = 0);
+ uint32_t min = 0,
+ uint32_t max = 0);
};
Modified: limal-branches/mc-devel/limal-ca-mgm/src/LiteralValues.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/LiteralValues.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/LiteralValues.cpp Sat Jun 12 15:33:41 2010
@@ -198,7 +198,7 @@
}
blocxx::String
-LiteralValue::commit2Config(CA &ca, Type t, blocxx::UInt32 num) const
+LiteralValue::commit2Config(CA &ca, Type t, uint32_t num) const
{
if(m_impl->literalType == "email" ||
Modified: limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp Sat Jun 12 15:33:41 2010
@@ -86,7 +86,7 @@
void
OpenSSLUtils::createRSAKey(const String &outFile,
const String &password,
- UInt32 bits,
+ uint32_t bits,
const String &cryptAlgorithm)
{
blocxx::String debugCmd;
@@ -265,7 +265,7 @@
const String &requestFile,
const String &password,
const String &extension,
- UInt32 days,
+ uint32_t days,
bool noEmailDN)
{
path::PathInfo pi(keyFile);
@@ -623,7 +623,7 @@
OpenSSLUtils::issueCRL(const blocxx::String &caCertFile,
const blocxx::String &caKeyFile,
const blocxx::String &caPassword,
- blocxx::UInt32 hours,
+ uint32_t hours,
const blocxx::String &outfile,
const blocxx::String &extension,
bool noUniqueDN)
Modified: limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp Sat Jun 12 15:33:41 2010
@@ -45,7 +45,7 @@
void createRSAKey(const blocxx::String &outFile,
const blocxx::String &password,
- blocxx::UInt32 bits = 2048,
+ uint32_t bits = 2048,
const blocxx::String &cryptAlgorithm = "des3");
void createRequest(const DNObject &dn,
@@ -62,7 +62,7 @@
const blocxx::String &requestFile,
const blocxx::String &password,
const blocxx::String &extension,
- const blocxx::UInt32 days,
+ const uint32_t days,
bool noEmailDN = false);
void signRequest(const blocxx::String &requestFile,
@@ -88,7 +88,7 @@
void issueCRL(const blocxx::String &caCertFile,
const blocxx::String &caKeyFile,
const blocxx::String &caPassword,
- blocxx::UInt32 hours,
+ uint32_t hours,
const blocxx::String &outfile,
const blocxx::String &extension,
bool noUniqueDN = false);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/PathName.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/PathName.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/PathName.cpp Sat Jun 12 15:33:41 2010
@@ -37,7 +37,6 @@
#include <limal/PathName.hpp>
#include <limal/Exception.hpp>
-#include <blocxx/Types.hpp>
#include <blocxx/EnvVars.hpp>
#include <blocxx/Format.hpp>
@@ -432,18 +431,18 @@
PathName::List
PathName::toList() const
{
- PathName::List list;
+ PathName::List list;
if( m_name.empty())
return list;
list.push_back( prefix() );
-
+
DirStack stack;
-
+
stack.split(m_name.c_str() + m_prefix);
PathName::List temp( stack.getPathList() );
list.insert( list.end(), temp.begin(), temp.end() );
- return list;
+ return list;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/RequestData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/RequestData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/RequestData.cpp Sat Jun 12 15:33:41 2010
@@ -53,13 +53,13 @@
return *this;
}
-blocxx::UInt32
+uint32_t
RequestData::getVersion() const
{
return m_impl->version;
}
-blocxx::UInt32
+uint32_t
RequestData::getKeysize() const
{
return m_impl->keysize;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/RequestDataImpl.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/RequestDataImpl.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/RequestDataImpl.hpp Sat Jun 12 15:33:41 2010
@@ -78,10 +78,10 @@
return new RequestDataImpl(*this);
}
- blocxx::UInt32 version;
+ uint32_t version;
DNObject subject;
- blocxx::UInt32 keysize;
+ uint32_t keysize;
KeyAlg pubkeyAlgorithm;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp Sat Jun 12 15:33:41 2010
@@ -77,13 +77,13 @@
void
-RequestData_Priv::setVersion(blocxx::UInt32 v)
+RequestData_Priv::setVersion(uint32_t v)
{
m_impl->version = v;
}
void
-RequestData_Priv::setKeysize(blocxx::UInt32 size)
+RequestData_Priv::setKeysize(uint32_t size)
{
m_impl->keysize = size;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.hpp Sat Jun 12 15:33:41 2010
@@ -42,8 +42,8 @@
RequestData_Priv(const RequestData_Priv& data);
virtual ~RequestData_Priv();
- void setVersion(blocxx::UInt32 v);
- void setKeysize(blocxx::UInt32 size);
+ void setVersion(uint32_t v);
+ void setKeysize(uint32_t size);
void setSubjectDN(const DNObject dn);
void setKeyAlgorithm(KeyAlg alg);
void setPublicKey(const ByteBuffer key);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/RequestGenerationData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/RequestGenerationData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/RequestGenerationData.cpp Sat Jun 12 15:33:41 2010
@@ -65,7 +65,7 @@
}
DNObject subject;
- blocxx::UInt32 keysize;
+ uint32_t keysize;
// KeyAlg pubkeyAlgorithm; // at the beginning we only support rsa
@@ -155,12 +155,12 @@
}
void
-RequestGenerationData::setKeysize(blocxx::UInt32 size)
+RequestGenerationData::setKeysize(uint32_t size)
{
m_impl->keysize = size;
}
-blocxx::UInt32
+uint32_t
RequestGenerationData::getKeysize() const
{
return m_impl->keysize;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp Sat Jun 12 15:33:41 2010
@@ -1419,7 +1419,7 @@
{
checkUrlData(port, "port number", config("rx_portnumber"));
- blocxx::UInt16 pnum = port.toUInt16();
+ uint16_t pnum = port.toUInt16();
valid = pnum >= 1;
}
catch( ... )
Modified: limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp Sat Jun 12 15:33:41 2010
@@ -27,7 +27,7 @@
#include <blocxx/Exception.hpp>
#include <blocxx/NULLValueException.hpp>
-#include <blocxx/Types.hpp>
+#include <limal/ca-mgm/CommonData.hpp>
#include <blocxx/String.hpp>
#include <blocxx/RefCount.hpp>
#include <list>
Modified: limal-branches/mc-devel/limal-ca-mgm/src/ValueIntCheck.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/ValueIntCheck.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/ValueIntCheck.cpp Sat Jun 12 15:33:41 2010
@@ -26,7 +26,7 @@
#include <limal/ca-mgm/config.h>
#include <limal/ValueIntCheck.hpp>
-#include <blocxx/Types.hpp>
+#include <limal/ca-mgm/CommonData.hpp>
#include <blocxx/String.hpp>
#include <blocxx/Format.hpp>
@@ -50,8 +50,8 @@
// -------------------------------------------------------------------
-ValueIntCheck::ValueIntCheck(blocxx::UInt64 minValue,
- blocxx::UInt64 maxValue,
+ValueIntCheck::ValueIntCheck(uint64_t minValue,
+ uint64_t maxValue,
bool inclusiveRange)
: ValueCheckBase()
, m_sign(false)
@@ -64,8 +64,8 @@
// -------------------------------------------------------------------
ValueIntCheck::
-ValueIntCheck::ValueIntCheck(blocxx::Int64 minValue,
- blocxx::Int64 maxValue,
+ValueIntCheck::ValueIntCheck(int64_t minValue,
+ int64_t maxValue,
bool inclusiveRange)
: ValueCheckBase()
, m_sign(true)
Modified: limal-branches/mc-devel/limal-ca-mgm/src/ValuePerlRECheck.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/ValuePerlRECheck.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/ValuePerlRECheck.cpp Sat Jun 12 15:33:41 2010
@@ -26,7 +26,7 @@
#include <limal/ca-mgm/config.h>
#include <limal/ValuePerlRECheck.hpp>
-#include <blocxx/Types.hpp>
+#include <limal/ca-mgm/CommonData.hpp>
#include <blocxx/String.hpp>
#include <blocxx/Format.hpp>
Modified: limal-branches/mc-devel/limal-ca-mgm/src/ValuePosixRECheck.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/ValuePosixRECheck.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/ValuePosixRECheck.cpp Sat Jun 12 15:33:41 2010
@@ -26,7 +26,7 @@
#include <limal/ca-mgm/config.h>
#include <limal/ValuePosixRECheck.hpp>
-#include <blocxx/Types.hpp>
+#include <limal/ca-mgm/CommonData.hpp>
#include <blocxx/String.hpp>
#include <blocxx/Format.hpp>
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp Sat Jun 12 15:33:41 2010
@@ -459,7 +459,7 @@
}
int len = bit->length -1;
- UInt32 ret = 0;
+ uint32_t ret = 0;
for(; len >= 0; --len)
{
@@ -1052,7 +1052,7 @@
if(qualinfo->d.usernotice->noticeref)
{
NOTICEREF *ref;
- std::list<blocxx::Int32> numberList;
+ std::list<int32_t> numberList;
ref = qualinfo->d.usernotice->noticeref;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions_Priv.cpp Sat Jun 12 15:33:41 2010
@@ -196,7 +196,7 @@
}
int len = bit->length -1;
- UInt32 ret = 0;
+ uint32_t ret = 0;
for(; len >= 0; --len)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/Logger.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/Logger.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/Logger.hpp Sat Jun 12 15:33:41 2010
@@ -35,6 +35,7 @@
#include <blocxx/LogAppender.hpp>
#include <blocxx/AppenderLogger.hpp>
#include <limal/ca-mgm/config.h>
+#include <stdint.h>
/**
@@ -407,8 +408,8 @@
const blocxx::StringArray &categories,
const blocxx::String &messageFormat,
const blocxx::String &filename,
- blocxx::UInt64 maxLogFileSize = 0,
- blocxx::UInt32 maxBackupIndex = 0
+ uint64_t maxLogFileSize = 0,
+ uint32_t maxBackupIndex = 0
);
/**
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueIntCheck.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueIntCheck.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueIntCheck.hpp Sat Jun 12 15:33:41 2010
@@ -34,11 +34,12 @@
#define LIMAL_VALUE_INT_CHECK_HPP
#include <limal/ca-mgm/config.h>
+#include <limal/ca-mgm/CommonData.hpp>
#include <limal/ValueCheck.hpp>
-#include <blocxx/Types.hpp>
#include <blocxx/String.hpp>
+
namespace LIMAL_NAMESPACE
{
@@ -60,8 +61,8 @@
* @param inclusiveRange Whether to check if the value is
* less (inclusiveRange=false) if less or equal the maxValue.
*/
- ValueIntCheck(blocxx::UInt64 minValue,
- blocxx::UInt64 maxValue,
+ ValueIntCheck(uint64_t minValue,
+ uint64_t maxValue,
bool inclusiveRange = true);
/**
@@ -72,8 +73,8 @@
* @param inclusiveRange Whether to check if the value is
* less (inclusiveRange=false) if less or equal the maxValue.
*/
- ValueIntCheck(blocxx::Int64 minValue,
- blocxx::Int64 maxValue,
+ ValueIntCheck(int64_t minValue,
+ int64_t maxValue,
bool inclusiveRange = true);
/**
@@ -126,12 +127,12 @@
bool m_sign;
bool m_incl;
union {
- blocxx::Int64 s;
- blocxx::UInt64 u;
+ int64_t s;
+ uint64_t u;
} m_min;
union {
- blocxx::Int64 s;
- blocxx::UInt64 u;
+ int64_t s;
+ uint64_t u;
} m_max;
};
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ValuePerlRECheck.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ValuePerlRECheck.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ValuePerlRECheck.hpp Sat Jun 12 15:33:41 2010
@@ -29,7 +29,7 @@
#include <limal/ca-mgm/config.h>
#include <limal/ValueCheck.hpp>
-#include <blocxx/Types.hpp>
+#include <limal/ca-mgm/CommonData.hpp>
#include <blocxx/String.hpp>
#include <blocxx/PerlRegEx.hpp>
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ValuePosixRECheck.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ValuePosixRECheck.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ValuePosixRECheck.hpp Sat Jun 12 15:33:41 2010
@@ -29,7 +29,7 @@
#include <limal/ca-mgm/config.h>
#include <limal/ValueCheck.hpp>
-#include <blocxx/Types.hpp>
+#include <limal/ca-mgm/CommonData.hpp>
#include <blocxx/String.hpp>
#include <blocxx/PosixRegEx.hpp>
@@ -43,7 +43,7 @@
*
* The ValuePosixRECheck implements a simple posix regex
* match check that can be used in ValueCheck.
- */
+ */
class ValuePosixRECheck: public ValueCheckBase
{
public:
@@ -52,7 +52,7 @@
* used to validate a value.
*
* The match is case sensitive unless the icase flag is set.
- *
+ *
* @param regex Extended regular expression string.
* @param icase Match case insensitive.
* @throws blocxx::RegExCompileException on invalid pattern
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BasicConstraintsExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BasicConstraintsExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BasicConstraintsExtension.hpp Sat Jun 12 15:33:41 2010
@@ -44,7 +44,7 @@
public:
BasicConstraintsExt();
BasicConstraintsExt(CAConfig* caConfig, Type type);
- BasicConstraintsExt(bool isCa, blocxx::Int32 pathLength=-1);
+ BasicConstraintsExt(bool isCa, int32_t pathLength=-1);
BasicConstraintsExt(const BasicConstraintsExt& extension);
virtual ~BasicConstraintsExt();
@@ -61,7 +61,7 @@
* @param pathLength maximum number of CAs that can appear below this one in a chain;
* -1 means no path Length is set.
*/
- void setBasicConstraints(bool isCa, blocxx::Int32 pathLength=-1);
+ void setBasicConstraints(bool isCa, int32_t pathLength=-1);
/**
* Return the ca parameter
@@ -71,7 +71,7 @@
/**
* Return the path length (-1 means no path length set)
*/
- blocxx::Int32 getPathLength() const;
+ int32_t getPathLength() const;
/**
* Write the informations of this object back to the configuration file
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BitExtensions.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BitExtensions.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BitExtensions.hpp Sat Jun 12 15:33:41 2010
@@ -40,7 +40,7 @@
{
public:
BitExtension();
- BitExtension(blocxx::UInt32 value);
+ BitExtension(uint32_t value);
BitExtension(const BitExtension& extension);
virtual ~BitExtension();
@@ -50,8 +50,8 @@
#endif
- void setValue(blocxx::UInt32 value);
- blocxx::UInt32 getValue() const;
+ void setValue(uint32_t value);
+ uint32_t getValue() const;
virtual void commit2Config(CA& ca, Type type) const = 0;
@@ -89,7 +89,7 @@
/**
* Create an object with a specific key usage set
*/
- KeyUsageExt(blocxx::UInt32 keyUsage);
+ KeyUsageExt(uint32_t keyUsage);
KeyUsageExt(const KeyUsageExt& extension);
virtual ~KeyUsageExt();
@@ -102,12 +102,12 @@
/**
* Set a new key usage
*/
- void setKeyUsage(blocxx::UInt32 keyUsage);
+ void setKeyUsage(uint32_t keyUsage);
/**
* Return the key usage
*/
- blocxx::UInt32 getKeyUsage() const;
+ uint32_t getKeyUsage() const;
/**
* Return true if the specified bit is set
@@ -144,7 +144,7 @@
virtual std::vector<blocxx::String> dump() const;
private:
- bool validKeyUsage(blocxx::UInt32 keyUsage) const;
+ bool validKeyUsage(uint32_t keyUsage) const;
};
/**
@@ -170,7 +170,7 @@
/**
* Create an object with a specific certificate type set
*/
- NsCertTypeExt(blocxx::UInt32 nsCertTypes);
+ NsCertTypeExt(uint32_t nsCertTypes);
NsCertTypeExt(const NsCertTypeExt& extension);
virtual ~NsCertTypeExt();
@@ -183,12 +183,12 @@
/**
* Set a new certificate type
*/
- void setNsCertType(blocxx::UInt32 nsCertTypes);
+ void setNsCertType(uint32_t nsCertTypes);
/**
* Return the certificate type
*/
- blocxx::UInt32 getNsCertType() const;
+ uint32_t getNsCertType() const;
/**
* Return true if the specified bit is set
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp Sat Jun 12 15:33:41 2010
@@ -88,7 +88,7 @@
#endif
- blocxx::Int32
+ int32_t
getVersion() const;
String
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLGenerationData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLGenerationData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLGenerationData.hpp Sat Jun 12 15:33:41 2010
@@ -42,7 +42,7 @@
public:
CRLGenerationData();
CRLGenerationData(CAConfig* caConfig, Type type);
- CRLGenerationData(blocxx::UInt32 hours,
+ CRLGenerationData(uint32_t hours,
const X509v3CRLGenerationExts& ext);
CRLGenerationData(const CRLGenerationData& data);
virtual ~CRLGenerationData();
@@ -55,9 +55,9 @@
#endif
void
- setCRLLifeTime(blocxx::UInt32 hours);
+ setCRLLifeTime(uint32_t hours);
- blocxx::UInt32
+ uint32_t
getCRLLifeTime() const;
void
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateData.hpp Sat Jun 12 15:33:41 2010
@@ -51,7 +51,7 @@
#endif
- blocxx::UInt32
+ uint32_t
getVersion() const;
String
@@ -69,7 +69,7 @@
DNObject
getSubjectDN() const;
- blocxx::UInt32
+ uint32_t
getKeysize() const;
KeyAlg
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp Sat Jun 12 15:33:41 2010
@@ -59,16 +59,16 @@
void
setOrganizationNotice(const String& org,
- const std::list<blocxx::Int32>& numbers);
+ const std::list<int32_t>& numbers);
String
getOrganization() const;
- std::list<blocxx::Int32>
+ std::list<int32_t>
getNoticeNumbers() const;
virtual blocxx::String
- commit2Config(CA& ca, Type type, blocxx::UInt32 num) const;
+ commit2Config(CA& ca, Type type, uint32_t num) const;
virtual bool
valid() const;
@@ -130,7 +130,7 @@
getUserNoticeList() const;
virtual blocxx::String
- commit2Config(CA& ca, Type type, blocxx::UInt32 num) const;
+ commit2Config(CA& ca, Type type, uint32_t num) const;
virtual bool
valid() const;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp Sat Jun 12 15:33:41 2010
@@ -22,12 +22,13 @@
#ifndef LIMAL_CA_MGM_COMMON_DATA_HPP
#define LIMAL_CA_MGM_COMMON_DATA_HPP
-#include <blocxx/Types.hpp>
+
#include <blocxx/String.hpp>
#include <list>
#include <vector>
#include <map>
#include <errno.h>
+#include <stdint.h>
#define REPOSITORY "/var/lib/CAM/"
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/LiteralValues.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/LiteralValues.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/LiteralValues.hpp Sat Jun 12 15:33:41 2010
@@ -118,7 +118,7 @@
* unsupported types like othername.
*/
blocxx::String
- commit2Config(CA& ca, Type type, blocxx::UInt32 num) const;
+ commit2Config(CA& ca, Type type, uint32_t num) const;
#ifndef SWIG
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestData.hpp Sat Jun 12 15:33:41 2010
@@ -51,10 +51,10 @@
#endif
- blocxx::UInt32
+ uint32_t
getVersion() const;
- blocxx::UInt32
+ uint32_t
getKeysize() const;
DNObject
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestGenerationData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestGenerationData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestGenerationData.hpp Sat Jun 12 15:33:41 2010
@@ -69,9 +69,9 @@
subjectDN();
void
- setKeysize(blocxx::UInt32 size);
+ setKeysize(uint32_t size);
- blocxx::UInt32
+ uint32_t
getKeysize() const;
void
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt Sat Jun 12 15:33:41 2010
@@ -1,14 +1,14 @@
-b4d4e48e6de644c953290eb2854a6ced-1276347200 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-bc5324c7f5c2a27492fb6795745b596b-1276347202 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1276347208 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1276347211 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1276347215 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1276347223 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c293624b6a877f401407ce8f8f1f327e-1276347225 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1276347226 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c1943ae4b9bd7320fae3e29f217483e3-1276347227 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
-d816690a832b0e52becd255d3a62e975-1276347231 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-9198f6798d9da70d7cbfb67b610633f5-1276347234 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-3e248858337c2b46dc67a0f9389376dd-1276347235 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-bf04fdd95062554800c1556085f47063-1276347236 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-9797ac11af29f94b82c1e5b0499ab5f2-1276347239 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276349522 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+bc5324c7f5c2a27492fb6795745b596b-1276349524 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276349528 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276349531 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276349534 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276349542 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c293624b6a877f401407ce8f8f1f327e-1276349543 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276349545 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c1943ae4b9bd7320fae3e29f217483e3-1276349546 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
+d816690a832b0e52becd255d3a62e975-1276349550 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+9198f6798d9da70d7cbfb67b610633f5-1276349554 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+3e248858337c2b46dc67a0f9389376dd-1276349556 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+bf04fdd95062554800c1556085f47063-1276349559 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+9797ac11af29f94b82c1e5b0499ab5f2-1276349560 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt Sat Jun 12 15:33:41 2010
@@ -1,11 +1,11 @@
-V 110612125321Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110612125322Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110612125326Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110612125329Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110612125332Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-R 110612125348Z 100612125351Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
-R 110612125351Z 100612125353Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-R 110612125354Z 100612125355Z,keyTime,20100612143715Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-R 110612125355Z 100612125356Z,CAkeyTime,20100612143716Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-R 110612125356Z 100612125358Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-V 120611125359Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+V 110612133204Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110612133204Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110612133206Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110612133209Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110612133212Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+R 110612133228Z 100612133230Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
+R 110612133230Z 100612133233Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+R 110612133234Z 100612133236Z,keyTime,20100612151556Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+R 110612133236Z 100612133238Z,CAkeyTime,20100612151558Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+R 110612133238Z 100612133239Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+V 120611133240Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
Binary files - no diff available.
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem Sat Jun 12 15:33:41 2010
@@ -1,7 +1,7 @@
-----BEGIN X509 CRL-----
MIIC+TCCAeECAQEwDQYJKoZIhvcNAQEFBQAwQzELMAkGA1UEBhMCREUxFzAVBgNV
BAMTDlN0YXRpYyBUZXN0IENBMRswGQYJKoZIhvcNAQkBFgxzdXNlQHN1c2UuZGUX
-DTEwMDYxMjEyNTQwMVoXDTEwMDYxMzEyNTQwMVowgfAwEgIBAxcNMDUwODE4MTQx
+DTEwMDYxMjEzMzI0MloXDTEwMDYxMzEzMzI0MlowgfAwEgIBAxcNMDUwODE4MTQx
MzIzWjAyAgEEFw0wNTA4MTgxNDEzMjVaMB4wCgYDVR0VBAMKAQYwEAYDVR0XBAkG
ByqGSM44AgIwOgIBBRcNMDUwODE4MTQxMzI2WjAmMAoGA1UdFQQDCgEBMBgGA1Ud
GAQRGA8yMDA1MDgxODE1NTY0NlowOgIBBhcNMDUwODE4MTQxMzI4WjAmMAoGA1Ud
@@ -9,10 +9,10 @@
ODE4WjAaMAoGA1UdFQQDCgEGMAwGA1UdFwQFBgMuFSugdzB1MHMGA1UdIwRsMGqA
FDIAwASkKojCPsrVvdhM01KIIH87oUekRTBDMQswCQYDVQQGEwJERTEXMBUGA1UE
AxMOU3RhdGljIFRlc3QgQ0ExGzAZBgkqhkiG9w0BCQEWDHN1c2VAc3VzZS5kZYIJ
-AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQBmESO4WjBX6adShcEE32BR7BvC
-UO64mjLDLNEzWe9yaV0tdAy/BE0TCPaPpSY7KiE8cjGl5PJOADhu3IMjl9aYPHgr
-gOgSa9Ae9GiLxCpmObZZ/MMu/8dBw5QXDrBYCh1xNZ5GTV3v+/p5nwZqe9qKOeyN
-bfAVuDUksUAqYKiRGQXyp2nHf8XVGQWExoKCgH433z2NXqFn/Xcs2zB6it/9HDvA
-KBkVBZDnNjWVr3jv9OZzNIy5STblKKTMJiSVHIyE1fBjaP6wEVLe7o0zl0u4F7+w
-pDqMjDiVMbhGl+4cveq/aWuRl92Qvl0wJ2qO11bqHEqoYOTAGGxKXYdHVU6F
+AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQBX/NdnQGnTnXoCUolvtVcY/Av3
+bkp8o8AXuNJ7UYndgqCF1Im5xT2c8ZVVftolb/ThgseCKbeFZJ3vMdkZOfqZuITh
+jrbgYgmkUKohCsJG5NmvGIpdTRGszreVoVbWz7Gp25qSmUgq+7VGD6Zj2NwmNKFH
+5YJfYdwRw2lsY0tfkNSlVqxO2XeBDqAqm2+4vLdPPpba2UfbiIoEF2LLKHT+43VP
+kfwzB5tgngtab8AZ+5kFPlcbghxfYb1ajHF5LnCjb5kM3Xj6NP4t8bszM5omnKVf
+ZTi4J99C7uShLnxYxN1Oh5u2QHOPvSlBLaLEfj8tbdOPzEmMheuGh/y0cgMb
-----END X509 CRL-----
--
To unsubscribe, e-mail: limal-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: limal-commit+help(a)opensuse.org
1
0
r2670 - in /limal-branches/mc-devel/limal-ca-mgm: src/ src/INIParser/ src/limal/ src/limal/ca-mgm/ testsuite/TestRepos/Test_CA1/ testsuite/TestRepos/Test_CA2/ testsuite/TestRepos/Test_CA2/crl/
by mcalmer@svn.opensuse.org 12 Jun '10
by mcalmer@svn.opensuse.org 12 Jun '10
12 Jun '10
Author: mcalmer
Date: Sat Jun 12 14:54:26 2010
New Revision: 2670
URL: http://svn.opensuse.org/viewcvs/limal?rev=2670&view=rev
Log:
remove blocxx Array includes
Modified:
limal-branches/mc-devel/limal-ca-mgm/src/ByteBuffer.cpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h
limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
Modified: limal-branches/mc-devel/limal-ca-mgm/src/ByteBuffer.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/ByteBuffer.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/ByteBuffer.cpp Sat Jun 12 14:54:26 2010
@@ -21,7 +21,6 @@
#include <blocxx/String.hpp>
#include <blocxx/Format.hpp>
-#include <blocxx/Array.hpp>
#include <blocxx/COWIntrusiveCountableBase.hpp>
#include <cstring>
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp Sat Jun 12 14:54:26 2010
@@ -18,7 +18,7 @@
Michael Andres <ma(a)suse.de>
Marius Tomaschewski <mt(a)suse.de>
Stefan Schubert <schubi(a)suse.de>
-
+
Maintainer: Stefan Schubert
/-*/
@@ -34,7 +34,7 @@
#include <limal/ca-mgm/config.h>
#include <map>
#include <list>
-#include <blocxx/Array.hpp>
+#include <vector>
#include <blocxx/String.hpp>
#include <blocxx/StringStream.hpp>
#include <blocxx/IntrusiveReference.hpp>
@@ -49,7 +49,7 @@
namespace INI // INI_NAMESPACE (incl. version?)
{
-
+
/**
* @brief INI keyword string
@@ -65,9 +65,9 @@
/**
* @brief INI comment string array
- */
+ */
typedef blocxx::String Comment;
-
+
/**
* @brief INI value entry class
@@ -88,14 +88,14 @@
void setComment(const Comment &comment);
private:
Value m_value;
- Comment m_comment;
+ Comment m_comment;
};
class Section;
typedef std::map<Key, Entry> EntryMap;
-typedef std::map<Key, Section> SectionMap;
+typedef std::map<Key, Section> SectionMap;
typedef EntryMap::size_type EntrySize;
typedef SectionMap::size_type SectionSize;
@@ -111,8 +111,8 @@
friend class INIParser;
/**
* This constructor will only be used for creating the toplevel
- * section
- */
+ * section
+ */
Section(const blocxx::IntrusiveReference<IniParser> &parser);
public:
@@ -126,7 +126,7 @@
* Use this constructor in order to add a NEW section.
* @key of the section
* @param description of the parent section
- */
+ */
Section(const Key &key, const Section &parentSection);
~Section();
@@ -135,42 +135,42 @@
//
// general functions
//
- //----------------------------------------------------------------------------------------
+ //----------------------------------------------------------------------------------------
/**
* Get number of entries
- */
+ */
EntrySize entrySize() const;
/**
* Get number of sub sections
- */
+ */
SectionSize sectionSize() const;
/**
* Check, if the section is empty (no entry/section)
* @return true or false
- */
+ */
bool empty() const;
/**
* Check, if key is available in the section
* @param key of section/entry
* @return NO (not found), VALUE, SECTION
- */
+ */
IniType contains(const Key &key) const;
/**
* Changing a section comment
* @param comment
- * @return true if succeeded
- */
+ * @return true if succeeded
+ */
bool setComment(const Comment &comment);
/**
* Getting a section comment
* @return comment
- */
+ */
Comment getComment();
@@ -184,89 +184,89 @@
* Get all entry keys of a section in the order like they
* have been written to file.
* @return std::list<blocxx::String>
- */
+ */
std::list<blocxx::String> getEntryKeys() const;
-
+
/**
* Get all entries of a section
* @return EntryMap ( key, entry )
- */
+ */
EntryMap getEntries() const;
/**
* Get all entries of a section which keys fit the given pattern
* @param pattern string, ignore cases
* @return EntryMap ( key, entry )
- */
+ */
EntryMap selectEntries(const blocxx::String &pattern,
- bool icase = false) const;
+ bool icase = false) const;
/**
* Get a value of an entry
* @param entry key, default value if the key has not been found
* @return value
- */
+ */
Value getValue(const Key &key, const Value &defaultValue="") const;
/**
* Get the complete entry (value, comments,...)
* @param entry key, default entry if the key has not been found
- * @return entry object
- */
+ * @return entry object
+ */
Entry getEntry(const Key &key, const Entry &defaultEntry = Entry()) const;
/**
* Delete an entry
* @param entry key
* @return true if succeeded
- */
+ */
bool delEntry(const Key &key);
/**
* Adding an value
* @param entry key, value
- * @return true if succeeded
- */
+ * @return true if succeeded
+ */
bool addValue(const Key &key, const Value &value);
-
+
/**
* Adding an entry
* @param entry key, entry(value and comment)
- * @return true if succeeded
- */
+ * @return true if succeeded
+ */
bool addEntry(const Key &key, const Entry &entry);
/**
* Adding an entry
* @param entry key, value, comment
- * @return true if succeeded
- */
+ * @return true if succeeded
+ */
bool addEntry(const Key &key, const Value &value,
const Comment &comment);
/**
* Changing an value
* @param entry key, value
- * @return true if succeeded
- */
+ * @return true if succeeded
+ */
bool setValue(const Key &key, const Value &value);
-
+
/**
* Changing an entry
* @param entry key, value
- * @return true if succeeded
- */
+ * @return true if succeeded
+ */
bool setEntry(const Key &key, const Entry &entry);
/**
* Changing an entry
* @param entry key, value, comment
- * @return true if succeeded
- */
+ * @return true if succeeded
+ */
bool setEntry(const Key &key, const Value &value,
const Comment &comment);
-
+
//----------------------------------------------------------------------------------------
//
@@ -278,24 +278,24 @@
* Get all section keys of a section in the order like they
* have been written to file.
* @return std::list<blocxx::String>
- */
+ */
std::list<blocxx::String> getSectionKeys() const;
-
+
/**
* Get all sub-sections of a section
* @return SectionMap (key, section)
- */
+ */
SectionMap getSections() const;
/**
* Get all sub-sections of a section which keys fit the given pattern
* @param pattern string, ignore cases
* @return SectionMap (key, section)
- */
+ */
SectionMap selectSections(const blocxx::String &pattern,
bool icase = false ) const;
-
+
/**
* Get the sub-section
@@ -308,7 +308,7 @@
* // error
* }
* @endcode
- */
+ */
Section getSection(const Key &key,
const Section *defaultSection = NULL) const;
@@ -316,7 +316,7 @@
* Delete a sub-section with all his entries
* @param key
* @return true if succeeded
- */
+ */
bool delSection(const Key &key);
@@ -344,7 +344,7 @@
* ignore case in keys and section names
* - FIRST_UPPER
* if ignore case, outputs first upper and other lower
- * If not first_upper, nor prefer_uppercase is set, keys
+ * If not first_upper, nor prefer_uppercase is set, keys
* and values are saved in lower case.
* - PREFER_UPPERCASE
* if ignore case, prefer upper case when saving
@@ -364,7 +364,7 @@
* do not kill empty lines at final comment at the end of top-level section
* - READ_ONLY
* read-only mode
-*/
+*/
enum Options { IGNOMR_CASE_REGEXPS,
IGNORE_CASE,
@@ -382,7 +382,7 @@
/**
* @brief LiMaL Common parser of INI files
- *
+ *
* This class provides a set of functionality for reading and writing INI files. The parser can be configured
* for almost each entry/value/comment format by using regular expressions.
* The main tasks of this class are:
@@ -411,18 +411,18 @@
*
* options.append (GLOBAL_VALUES); // Values at the top level(not in section) are allowed
* options.append (LINE_CAN_CONTINUE); // if there is \ at the end of line,
- * options.append (COMMENTS_LAST); // Lines are parsed for comments after they are parsed for values
+ * options.append (COMMENTS_LAST); // Lines are parsed for comments after they are parsed for values
*
* // comment description
*
- * commentsDescr.append("^[ \t]*#.*$");
+ * commentsDescr.append("^[ \t]*#.*$");
* commentsDescr.append("#.*");
* commentsDescr.append("^[ \t]*$");
*
* // Entry (key/value) description
*
* IoPatternDescr pattern = { "([a-zA-Z0-9_]+)[ \t]*=[ \t]*\"([^\"]*)\"", "%s=\"%s\""};
- * EntryDescr eDescr = {pattern, "([a-zA-Z0-9_]+)[ \t]*=[ \t]*\"([^\"]*)", "([^\"]*)\"" , true};
+ * EntryDescr eDescr = {pattern, "([a-zA-Z0-9_]+)[ \t]*=[ \t]*\"([^\"]*)", "([^\"]*)\"" , true};
* entryDescr.append (eDescr);
*
* IoPatternDescr pattern2 = {"([a-zA-Z0-9_]+)[ \t]*=[ \t]*([^\"]*[^ \t\"]|)[ \t]*$", "%s=\"%s\""};
@@ -433,7 +433,7 @@
* EntryDescr eDescr3 = {pattern3, "([a-zA-Z_][a-zA-Z0-9_]*)[ \t]*=[ \t]*'([^']*)", "([^']*)'" , true};
* entryDescr.append (eDescr3);
*
- * INIParser descParser;
+ * INIParser descParser;
*
* // which file has to be parsed ?
*
@@ -475,19 +475,19 @@
INIParser & operator=(const INIParser &iniParser);
virtual ~INIParser ();
-
+
/**
* Sets parser to single file mode and sets the file name to read.
* @param fn file name of ini file
*/
void initFiles (const blocxx::String &filename);
-
+
/**
* Sets parser to multiple file mode and sets the glob-expressions.
* @param fileList list of glob-expressions
*/
void initFiles (const std::vector<blocxx::String> &fileList );
-
+
/**
* Sets flags and regular expressions.
* @param options List of Options
@@ -497,7 +497,7 @@
* ignore case in keys and section names
* FIRST_UPPER
* if ignore case, outputs first upper and other lower
- * If not first_upper, nor prefer_uppercase is set, keys
+ * If not first_upper, nor prefer_uppercase is set, keys
* and values are saved in lower case.
* PREFER_UPPERCASE
* if ignore case, prefer upper case when saving
@@ -551,10 +551,10 @@
/**
* Parse the ini files. Parser must be initialized before this function
* is called.
- * @return true if successful
+ * @return true if successful
*/
bool parse();
-
+
/**
* Check the ini files and in case some of them changed externally,
* reload it.
@@ -580,9 +580,9 @@
{
public:
SysConfig() : INIParser() {};
-
+
bool initMachine ();
-
+
};
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h Sat Jun 12 14:54:26 2010
@@ -16,12 +16,12 @@
#include <limal/Logger.hpp>
#include <blocxx/String.hpp>
-#include <blocxx/Array.hpp>
#include <blocxx/Map.hpp>
#include <blocxx/IntrusiveReference.hpp>
#include "INIParser/INIParserDescr.hpp"
#include <list>
#include <map>
+#include <vector>
#define INIPARSER "IniParser"
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h Sat Jun 12 14:54:26 2010
@@ -18,12 +18,12 @@
#include <stdio.h>
#include <regex.h>
#include <blocxx/String.hpp>
-#include <blocxx/Array.hpp>
#include <blocxx/PosixRegEx.hpp>
#include <blocxx/IntrusiveCountableBase.hpp>
#include <iosfwd>
#include <fstream>
+#include <vector>
#include "INIParser/INIParserDescr.hpp"
#include "INIParser/IniFile.h"
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp Sat Jun 12 14:54:26 2010
@@ -28,9 +28,9 @@
#include <limal/ByteBuffer.hpp>
#include "blocxx/Exception.hpp"
#include <blocxx/String.hpp>
-#include <blocxx/Array.hpp>
-#include <blocxx/Map.hpp>
+#include <map>
+#include <vector>
// -------------------------------------------------------------------
namespace LIMAL_NAMESPACE
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp Sat Jun 12 14:54:26 2010
@@ -25,7 +25,7 @@
#include <blocxx/Types.hpp>
#include <blocxx/String.hpp>
#include <list>
-#include <blocxx/Array.hpp>
+#include <vector>
#include <map>
#include <errno.h>
@@ -35,7 +35,7 @@
typedef blocxx::String String;
typedef std::list<String> StringList;
-
+
enum Type {
E_Client_Req, //! Client Request
E_Server_Req, //! Server Request
@@ -68,7 +68,7 @@
E_MD5,
E_MDC2,
};
-
+
enum EErrorCodes
{
E_GENERIC = blocxx::Exception::UNKNOWN_ERROR_CODE, // == -1
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt Sat Jun 12 14:54:26 2010
@@ -1,14 +1,14 @@
-b4d4e48e6de644c953290eb2854a6ced-1276345591 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-bc5324c7f5c2a27492fb6795745b596b-1276345594 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1276345599 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1276345604 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1276345607 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1276345618 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c293624b6a877f401407ce8f8f1f327e-1276345619 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1276345620 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c1943ae4b9bd7320fae3e29f217483e3-1276345621 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
-d816690a832b0e52becd255d3a62e975-1276345626 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-9198f6798d9da70d7cbfb67b610633f5-1276345628 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-3e248858337c2b46dc67a0f9389376dd-1276345629 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-bf04fdd95062554800c1556085f47063-1276345630 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-9797ac11af29f94b82c1e5b0499ab5f2-1276345633 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276347200 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+bc5324c7f5c2a27492fb6795745b596b-1276347202 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276347208 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276347211 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276347215 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276347223 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c293624b6a877f401407ce8f8f1f327e-1276347225 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276347226 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c1943ae4b9bd7320fae3e29f217483e3-1276347227 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
+d816690a832b0e52becd255d3a62e975-1276347231 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+9198f6798d9da70d7cbfb67b610633f5-1276347234 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+3e248858337c2b46dc67a0f9389376dd-1276347235 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+bf04fdd95062554800c1556085f47063-1276347236 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+9797ac11af29f94b82c1e5b0499ab5f2-1276347239 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt Sat Jun 12 14:54:26 2010
@@ -1,11 +1,11 @@
-V 110612122634Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110612122634Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110612122637Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110612122641Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110612122645Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-R 110612122704Z 100612122706Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
-R 110612122706Z 100612122707Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-R 110612122708Z 100612122708Z,keyTime,20100612141028Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-R 110612122709Z 100612122709Z,CAkeyTime,20100612141029Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-R 110612122710Z 100612122712Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-V 120611122713Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+V 110612125321Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110612125322Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110612125326Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110612125329Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110612125332Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+R 110612125348Z 100612125351Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
+R 110612125351Z 100612125353Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+R 110612125354Z 100612125355Z,keyTime,20100612143715Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+R 110612125355Z 100612125356Z,CAkeyTime,20100612143716Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+R 110612125356Z 100612125358Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+V 120611125359Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
Binary files - no diff available.
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem Sat Jun 12 14:54:26 2010
@@ -1,7 +1,7 @@
-----BEGIN X509 CRL-----
MIIC+TCCAeECAQEwDQYJKoZIhvcNAQEFBQAwQzELMAkGA1UEBhMCREUxFzAVBgNV
BAMTDlN0YXRpYyBUZXN0IENBMRswGQYJKoZIhvcNAQkBFgxzdXNlQHN1c2UuZGUX
-DTEwMDYxMjEyMjcxNVoXDTEwMDYxMzEyMjcxNVowgfAwEgIBAxcNMDUwODE4MTQx
+DTEwMDYxMjEyNTQwMVoXDTEwMDYxMzEyNTQwMVowgfAwEgIBAxcNMDUwODE4MTQx
MzIzWjAyAgEEFw0wNTA4MTgxNDEzMjVaMB4wCgYDVR0VBAMKAQYwEAYDVR0XBAkG
ByqGSM44AgIwOgIBBRcNMDUwODE4MTQxMzI2WjAmMAoGA1UdFQQDCgEBMBgGA1Ud
GAQRGA8yMDA1MDgxODE1NTY0NlowOgIBBhcNMDUwODE4MTQxMzI4WjAmMAoGA1Ud
@@ -9,10 +9,10 @@
ODE4WjAaMAoGA1UdFQQDCgEGMAwGA1UdFwQFBgMuFSugdzB1MHMGA1UdIwRsMGqA
FDIAwASkKojCPsrVvdhM01KIIH87oUekRTBDMQswCQYDVQQGEwJERTEXMBUGA1UE
AxMOU3RhdGljIFRlc3QgQ0ExGzAZBgkqhkiG9w0BCQEWDHN1c2VAc3VzZS5kZYIJ
-AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQCItwddiIsTrzxzN7HFEgXbqcsI
-Dvqif7NLI+tl3/tpqL8ym9E6AzQbG9GFv8IGrcoQUqZPQgbAHqbLb49GQjuqEC6Q
-bcZJ0RFYBoOUPNUYrdPnjwOVXpHCOEQVMiOnWFQldyDo80BywyjkJkkebl40MATp
-8++ufkugFpa0ChwKstbv0nvLPkEhm4vTCfTHZF2alMLj5EBJQLj+Z23cX//D3x9B
-NWnxtx3sD/gdYGh4KfFbvB9YZjyTVLd3qME4Cbdau+m5eKFvewTSP7c3/f7UHh2k
-yX/uUO23JVADbflUb1G4bfq78sAojnVF5H/aRX9kYYK5jyxB0PsRGmSctE6Y
+AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQBmESO4WjBX6adShcEE32BR7BvC
+UO64mjLDLNEzWe9yaV0tdAy/BE0TCPaPpSY7KiE8cjGl5PJOADhu3IMjl9aYPHgr
+gOgSa9Ae9GiLxCpmObZZ/MMu/8dBw5QXDrBYCh1xNZ5GTV3v+/p5nwZqe9qKOeyN
+bfAVuDUksUAqYKiRGQXyp2nHf8XVGQWExoKCgH433z2NXqFn/Xcs2zB6it/9HDvA
+KBkVBZDnNjWVr3jv9OZzNIy5STblKKTMJiSVHIyE1fBjaP6wEVLe7o0zl0u4F7+w
+pDqMjDiVMbhGl+4cveq/aWuRl92Qvl0wJ2qO11bqHEqoYOTAGGxKXYdHVU6F
-----END X509 CRL-----
--
To unsubscribe, e-mail: limal-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: limal-commit+help(a)opensuse.org
1
0
r2669 - in /limal-branches/mc-devel/limal-ca-mgm: src/ src/INIParser/ src/limal/ src/limal/ca-mgm/ testsuite/ testsuite/TestRepos/Test_CA1/ testsuite/TestRepos/Test_CA2/ testsuite/TestRepos/Test_CA...
by mcalmer@svn.opensuse.org 12 Jun '10
by mcalmer@svn.opensuse.org 12 Jun '10
12 Jun '10
Author: mcalmer
Date: Sat Jun 12 14:33:19 2010
New Revision: 2669
URL: http://svn.opensuse.org/viewcvs/limal?rev=2669&view=rev
Log:
blocxx:Array => std::vector
Modified:
limal-branches/mc-devel/limal-ca-mgm/src/AuthorityInfoAccessExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/AuthorityKeyIdentifierExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/AuthorityKeyIdentifierGenerateExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/BasicConstraintsExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/BitExtensions.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CAConfig.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLDistributionPointsExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLGenerationData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLReason.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificateData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp
limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/ExtendedKeyUsageExt.cpp
limal-branches/mc-devel/limal-ca-mgm/src/ExtensionBase.cpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.cpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.cpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.cpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h
limal-branches/mc-devel/limal-ca-mgm/src/IssuerAlternativeNameExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/LDAPUrlImpl.cpp
limal-branches/mc-devel/limal-ca-mgm/src/LDAPUrlImpl.hpp
limal-branches/mc-devel/limal-ca-mgm/src/LiteralValues.cpp
limal-branches/mc-devel/limal-ca-mgm/src/LocalManagement.cpp
limal-branches/mc-devel/limal-ca-mgm/src/Logger.cpp
limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp
limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp
limal-branches/mc-devel/limal-ca-mgm/src/PathUtils.cpp
limal-branches/mc-devel/limal-ca-mgm/src/RequestData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/RequestGenerationData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/StringExtensions.cpp
limal-branches/mc-devel/limal-ca-mgm/src/SubjectAlternativeNameExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/SubjectKeyIdentifierExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/Url.cpp
limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp
limal-branches/mc-devel/limal-ca-mgm/src/UrlByScheme.hpp
limal-branches/mc-devel/limal-ca-mgm/src/UrlUtils.cpp
limal-branches/mc-devel/limal-ca-mgm/src/Utils.cpp
limal-branches/mc-devel/limal-ca-mgm/src/Utils.hpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions.cpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLGenerationExtensions.cpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions.cpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateIssueExtensions.cpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions.cpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/Logger.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/Url.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlBase.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityInfoAccessExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityKeyIdentifierExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityKeyIdentifierGenerateExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BasicConstraintsExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BitExtensions.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLDistributionPointsExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLGenerationData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLReason.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateIssueData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/DNObject.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/ExtendedKeyUsageExt.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/ExtensionBase.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/IssuerAlternativeNameExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/LiteralValues.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestGenerationData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/StringExtensions.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectAlternativeNameExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectKeyIdentifierExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CRLExtensions.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CRLGenerationExtensions.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CertificateExtensions.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CertificateIssueExtensions.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3RequestExtensions.hpp
limal-branches/mc-devel/limal-ca-mgm/testsuite/CA1.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CA2.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CA3.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CA4.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CA5.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CA6.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CA7.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CA8.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CA9.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CRLTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest2.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest3.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest4.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest5.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest6.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ConvertTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ExportTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/IPv6CheckTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ImportCommonCertificateTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ImportRequestTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ListCATreeTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ListTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCATest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCRLTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCertificateTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCertificateTest2.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseRequestTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveCertificateTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveRequestTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RequestTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest2.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest3.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest4.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest5.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/SubCATest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
limal-branches/mc-devel/limal-ca-mgm/testsuite/UpdateDBTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/VerifyTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/iniParser.cc
Modified: limal-branches/mc-devel/limal-ca-mgm/src/AuthorityInfoAccessExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/AuthorityInfoAccessExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/AuthorityInfoAccessExtension.cpp Sat Jun 12 14:33:19 2010
@@ -177,29 +177,29 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
AuthorityInformation::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(!initAccessOIDCheck().isValid(m_impl->accessOID))
{
- result.append(Format("invalid value(%1) for accessOID", m_impl->accessOID).toString());
+ result.push_back(Format("invalid value(%1) for accessOID", m_impl->accessOID).toString());
}
- result.appendArray(m_impl->location.verify());
+ appendArray(result, m_impl->location.verify());
LOGIT_DEBUG_STRINGARRAY("AuthorityInformation::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
AuthorityInformation::dump() const
{
- StringArray result;
- result.append("AuthorityInformation::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("AuthorityInformation::dump()");
- result.append("accessOID = " + getAccessOID());
- result.appendArray(getLocation().dump());
+ result.push_back("accessOID = " + getAccessOID());
+ appendArray(result, getLocation().dump());
return result;
}
@@ -260,15 +260,17 @@
bool p = caConfig->exists(type2Section(type, true), "authorityInfoAccess");
if(p)
{
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "authorityInfoAccess"));
+ std::vector<blocxx::String> sp = convStringArray(
+ PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "authorityInfoAccess"))
+ );
if(sp[0].equalsIgnoreCase("critical")) setCritical(true);
- StringArray::const_iterator it = sp.begin();
+ std::vector<blocxx::String>::const_iterator it = sp.begin();
for(; it != sp.end(); ++it)
{
- StringArray al = PerlRegEx(";").split(*it);
+ std::vector<blocxx::String> al = convStringArray(PerlRegEx(";").split(*it));
try
{
@@ -391,40 +393,40 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
AuthorityInfoAccessExt::verify() const
{
- blocxx::StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(m_impl->info.empty())
{
- result.append(String("No access informations available"));
+ result.push_back(String("No access informations available"));
}
std::list<AuthorityInformation>::const_iterator it = m_impl->info.begin();
for(;it != m_impl->info.end(); it++)
{
- result.appendArray((*it).verify());
+ appendArray(result, (*it).verify());
}
LOGIT_DEBUG_STRINGARRAY("AuthorityInfoAccessExt::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
AuthorityInfoAccessExt::dump() const
{
- StringArray result;
- result.append("AuthorityInfoAccessExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("AuthorityInfoAccessExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
std::list< AuthorityInformation >::const_iterator it = m_impl->info.begin();
for(; it != m_impl->info.end(); ++it)
{
- result.appendArray((*it).dump());
+ appendArray(result, (*it).dump());
}
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/AuthorityKeyIdentifierExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/AuthorityKeyIdentifierExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/AuthorityKeyIdentifierExtension.cpp Sat Jun 12 14:33:19 2010
@@ -125,24 +125,24 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
AuthorityKeyIdentifierExt::verify() const
{
- return blocxx::StringArray();
+ return std::vector<blocxx::String>();
}
-blocxx::StringArray
+std::vector<blocxx::String>
AuthorityKeyIdentifierExt::dump() const
{
- StringArray result;
- result.append("AuthorityKeyIdentifierExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("AuthorityKeyIdentifierExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("KeyID = " + getKeyID());
- result.append("DirName = " + getDirName());
- result.append("serial = " + getSerial());
+ result.push_back("KeyID = " + getKeyID());
+ result.push_back("DirName = " + getDirName());
+ result.push_back("serial = " + getSerial());
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/AuthorityKeyIdentifierGenerateExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/AuthorityKeyIdentifierGenerateExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/AuthorityKeyIdentifierGenerateExtension.cpp Sat Jun 12 14:33:19 2010
@@ -87,15 +87,15 @@
bool p = caConfig->exists(type2Section(type, true), "authorityKeyIdentifier");
if(p)
{
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "authorityKeyIdentifier"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "authorityKeyIdentifier")));
if(sp[0].equalsIgnoreCase("critical"))
{
setCritical(true);
- sp.remove(0);
+ sp.erase(sp.begin());
}
- StringArray::const_iterator it = sp.begin();
+ std::vector<blocxx::String>::const_iterator it = sp.begin();
for(; it != sp.end(); ++it)
{
if((*it).equalsIgnoreCase("keyid")) m_impl->keyid = KeyID_normal;
@@ -247,32 +247,32 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
AuthorityKeyIdentifierGenerateExt::verify() const
{
- blocxx::StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(getKeyID() == KeyID_none && getIssuer() == Issuer_none)
{
- result.append(String("Invalid value for keyid and issuer. ") +
+ result.push_back(String("Invalid value for keyid and issuer. ") +
String("At least one of both must be set"));
}
LOGIT_DEBUG_STRINGARRAY("AuthorityKeyIdentifierGenerateExt::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
AuthorityKeyIdentifierGenerateExt::dump() const
{
- StringArray result;
- result.append("AuthorityKeyIdentifierGenerateExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("AuthorityKeyIdentifierGenerateExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("KeyID = " + String(getKeyID()));
- result.append("Issuer = " + String(getIssuer()));
+ result.push_back("KeyID = " + String(getKeyID()));
+ result.push_back("Issuer = " + String(getIssuer()));
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/BasicConstraintsExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/BasicConstraintsExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/BasicConstraintsExtension.cpp Sat Jun 12 14:33:19 2010
@@ -88,18 +88,18 @@
bool isCA = false;
blocxx::Int32 pl = -1;
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "basicConstraints"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "basicConstraints")));
if(sp[0].equalsIgnoreCase("critical")) setCritical(true);
- StringArray::const_iterator it = sp.begin();
+ std::vector<blocxx::String>::const_iterator it = sp.begin();
for(; it != sp.end(); ++it)
{
if((*it).equalsIgnoreCase("ca:true")) isCA = true;
else if((*it).equalsIgnoreCase("ca:false")) isCA = false;
else if((*it).startsWith("pathlen:", String::E_CASE_INSENSITIVE))
{
- StringArray plA = PerlRegEx(":").split(*it);
+ std::vector<blocxx::String> plA = convStringArray(PerlRegEx(":").split(*it));
pl = plA[1].toInt32();
}
}
@@ -234,38 +234,38 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
BasicConstraintsExt::verify() const
{
- blocxx::StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(isCA() && getPathLength() < -1)
{
- result.append(Format("invalid value for pathLength(%1). Has to be >= -1",
+ result.push_back(Format("invalid value for pathLength(%1). Has to be >= -1",
getPathLength()).toString());
}
if(!isCA() && getPathLength() != -1)
{
- result.append(Format("invalid value for pathLength(%1). Has to be -1",
+ result.push_back(Format("invalid value for pathLength(%1). Has to be -1",
getPathLength()).toString());
}
LOGIT_DEBUG_STRINGARRAY("BasicConstraintsExt::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
BasicConstraintsExt::dump() const
{
- StringArray result;
- result.append("BasicConstraintsExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("BasicConstraintsExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("CA = " + Bool(isCA()).toString());
- result.append("pathlen = " + String(getPathLength()));
+ result.push_back("CA = " + Bool(isCA()).toString());
+ result.push_back("pathlen = " + String(getPathLength()));
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/BitExtensions.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/BitExtensions.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/BitExtensions.cpp Sat Jun 12 14:33:19 2010
@@ -138,11 +138,11 @@
blocxx::UInt32 keyUsage = 0;
String ku = caConfig->getValue(type2Section(type, true), "keyUsage");
- StringArray sp = PerlRegEx("\\s*,\\s*").split(ku);
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*").split(ku));
if(sp[0].equalsIgnoreCase("critical")) setCritical(true);
- StringArray::const_iterator it = sp.begin();
+ std::vector<blocxx::String>::const_iterator it = sp.begin();
for(; it != sp.end(); ++it)
{
if((*it).equalsIgnoreCase("digitalSignature")) keyUsage |= digitalSignature;
@@ -307,34 +307,34 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
KeyUsageExt::verify() const
{
- blocxx::StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(!validKeyUsage(getValue()))
{
- result.append(Format("invalid value '%1' for keyUsage", getValue()).toString());
+ result.push_back(Format("invalid value '%1' for keyUsage", getValue()).toString());
}
LOGIT_DEBUG_STRINGARRAY("KeyUsageExt::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
KeyUsageExt::dump() const
{
- StringArray result;
- result.append("KeyUsageExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("KeyUsageExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
String ku;
ku.format("%04x", getValue());
- result.append("KeyUsage = 0x" + ku);
+ result.push_back("KeyUsage = 0x" + ku);
return result;
}
@@ -378,11 +378,11 @@
blocxx::UInt32 bits = 0;
String ct = caConfig->getValue(type2Section(type, true), "nsCertType");
- StringArray sp = PerlRegEx("\\s*,\\s*").split(ct);
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*").split(ct));
if(sp[0].equalsIgnoreCase("critical")) setCritical(true);
- StringArray::const_iterator it = sp.begin();
+ std::vector<blocxx::String>::const_iterator it = sp.begin();
for(; it != sp.end(); ++it)
{
if((*it).equalsIgnoreCase("client")) bits |= client;
@@ -538,33 +538,33 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsCertTypeExt::verify() const
{
- blocxx::StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(getValue() > 0xFF || getValue() == 0)
{
- result.append(Format("invalid value '%1' for nsCertType", getValue()).toString());
+ result.push_back(Format("invalid value '%1' for nsCertType", getValue()).toString());
}
LOGIT_DEBUG_STRINGARRAY("NsCertTypeExt::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsCertTypeExt::dump() const
{
- StringArray result;
- result.append("NsCertTypeExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("NsCertTypeExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
String nsct;
nsct.format("%02x", getValue());
- result.append("NsCertType = 0x" + nsct);
+ result.push_back("NsCertType = 0x" + nsct);
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp Sat Jun 12 14:33:19 2010
@@ -120,8 +120,8 @@
class CATreeCompare
{
public:
- int operator()(const blocxx::Array<blocxx::String> &l,
- const blocxx::Array<blocxx::String> r) const
+ int operator()(const std::vector<blocxx::String> &l,
+ const std::vector<blocxx::String> r) const
{
if(l.back() == "" && r.back() != "")
{
@@ -661,22 +661,22 @@
commitConfig2Template();
}
-blocxx::Array<std::map<blocxx::String, blocxx::String> >
+std::vector<std::map<blocxx::String, blocxx::String> >
CA::getCertificateList()
{
updateDB();
- Array< std::map<String, String> > ret;
+ std::vector< std::map<blocxx::String, blocxx::String> > ret;
ret = OpenSSLUtils::listCertificates(m_impl->caName, m_impl->repositoryDir);
return ret;
}
-blocxx::Array<std::map<blocxx::String, blocxx::String> >
+std::vector<std::map<blocxx::String, blocxx::String> >
CA::getRequestList()
{
- Array< std::map<String, String> > ret;
+ std::vector< std::map<String, String> > ret;
ret = OpenSSLUtils::listRequests(m_impl->caName, m_impl->repositoryDir);
@@ -1349,10 +1349,10 @@
}
-blocxx::Array<blocxx::String>
+std::vector<blocxx::String>
CA::getCAList(const String& repos)
{
- Array<String> caList;
+ std::vector<String> caList;
caList = OpenSSLUtils::listCA(repos);
@@ -1360,42 +1360,42 @@
}
-std::list<blocxx::Array<blocxx::String> >
+std::list<std::vector<blocxx::String> >
CA::getCATree(const String& repos)
{
- std::list<Array<String> > ret;
+ std::list<std::vector<String> > ret;
- Array<String> caList = CA::getCAList(repos);
+ std::vector<String> caList = CA::getCAList(repos);
if(caList.empty())
{
return ret;
}
- std::map<String, Array<String> > caHash;
+ std::map<String, std::vector<String> > caHash;
- Array<String>::const_iterator it = caList.begin();
+ std::vector<String>::const_iterator it = caList.begin();
for(; it != caList.end(); ++it)
{
CertificateData caData =
LocalManagement::getCertificate(repos + "/" + (*it) + "/cacert.pem",
E_PEM);
- Array<String> d;
+ std::vector<String> d;
d.push_back(caData.getSubjectDN().getOpenSSLString());
d.push_back(caData.getIssuerDN().getOpenSSLString());
caHash[*it] = d;
}
- std::map<String, Array<String> >::const_iterator chit = caHash.begin();
+ std::map<String, std::vector<String> >::const_iterator chit = caHash.begin();
for(; chit != caHash.end(); ++chit)
{
// subject == issuer
if( ((*chit).second)[0] == ((*chit).second)[1] )
{
// root CA
- Array<String> d;
+ std::vector<String> d;
d.push_back((*chit).first);
d.push_back("");
@@ -1406,13 +1406,13 @@
bool issuerFound = false;
// sub CA; find caName of the issuer
- std::map<String, Array<String> >::const_iterator chitnew = caHash.begin();
+ std::map<String, std::vector<String> >::const_iterator chitnew = caHash.begin();
for(; chitnew != caHash.end(); ++chitnew)
{
// issuer == subject
if( ((*chit).second)[1] == ((*chitnew).second)[0] )
{
- Array<String> d;
+ std::vector<String> d;
d.push_back((*chit).first);
d.push_back((*chitnew).first);
@@ -1425,7 +1425,7 @@
if(!issuerFound)
{
// the issuer is not in our repository
- Array<String> d;
+ std::vector<String> d;
d.push_back((*chit).first);
d.push_back("");
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CAConfig.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CAConfig.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CAConfig.cpp Sat Jun 12 14:33:19 2010
@@ -76,35 +76,35 @@
CAConfig::CAConfig(const String &file)
: m_impl(new CAConfigImpl(file))
{
- blocxx::Array<Options> options;
- blocxx::StringArray commentsDescr;
- blocxx::Array<SectionDescr> sectionDescr;
- blocxx::Array<EntryDescr> entryDescr;
- blocxx::Array<IoPatternDescr> rewrites;
-
- options.append (NO_NESTED_SECTIONS);
- options.append (LINE_CAN_CONTINUE);
-
- commentsDescr.append ("^[ \t]*#.*$");
- commentsDescr.append ("#.*");
- commentsDescr.append ("^[ \t]*$");
- commentsDescr.append ("^[ \t]*;[^;]+.*$");
+ std::vector<Options> options;
+ std::vector<blocxx::String> commentsDescr;
+ std::vector<SectionDescr> sectionDescr;
+ std::vector<EntryDescr> entryDescr;
+ std::vector<IoPatternDescr> rewrites;
+
+ options.push_back (NO_NESTED_SECTIONS);
+ options.push_back (LINE_CAN_CONTINUE);
+
+ commentsDescr.push_back ("^[ \t]*#.*$");
+ commentsDescr.push_back ("#.*");
+ commentsDescr.push_back ("^[ \t]*$");
+ commentsDescr.push_back ("^[ \t]*;[^;]+.*$");
IoPatternDescr pattern1 = { "^[ \t]*([^=;]*[^ \t;=])[ \t]*=[ \t]*(.*[^ \t]|)[ \t]*$" , " %s = %s"};
EntryDescr eDescr1 = {pattern1, "", "" , false};
- entryDescr.append (eDescr1);
+ entryDescr.push_back (eDescr1);
IoPatternDescr pattern2 = {"^[ \t]*;;[ \t]*([^=]*[^ \t=])[ \t]*=[ \t]*(.*[^ \t]|)[ \t]*$" , ";; %s = %s"};
EntryDescr eDescr2 = {pattern2, "", "" , false};
- entryDescr.append (eDescr2);
+ entryDescr.push_back (eDescr2);
IoPatternDescr patternBegin1 = {"^[ \t]*\\[[ \t]*(.*[^ \t])[ \t]*\\][ \t]*", "[%s]"};
IoPatternDescr patternBegin2 = {"^[ \t]*;;[ \t]*\\[[ \t]*(.*[^ \t])[ \t]*\\][ \t]*", ";; [%s]"};
IoPatternDescr patternEnd;
SectionDescr sDescr1 = {patternBegin1, patternEnd , false };
- sectionDescr.append (sDescr1);
+ sectionDescr.push_back (sDescr1);
SectionDescr sDescr2 = {patternBegin2, patternEnd , false };
- sectionDescr.append (sDescr2);
+ sectionDescr.push_back (sDescr2);
m_impl->parser.initMachine (options, commentsDescr, sectionDescr, entryDescr, rewrites);
m_impl->parser.initFiles (file);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp Sat Jun 12 14:33:19 2010
@@ -88,31 +88,31 @@
return m_impl->revocationReason.valid();
}
-blocxx::StringArray
+std::vector<blocxx::String>
RevocationEntry::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(!initHexCheck().isValid(m_impl->serial))
{
- result.append(Format("invalid serial: %1", m_impl->serial).toString());
+ result.push_back(Format("invalid serial: %1", m_impl->serial).toString());
}
- result.appendArray(m_impl->revocationReason.verify());
+ appendArray(result, m_impl->revocationReason.verify());
LOGIT_DEBUG_STRINGARRAY("RevocationEntry::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
RevocationEntry::dump() const
{
- StringArray result;
- result.append("RevocationEntry::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("RevocationEntry::dump()");
- result.append("Serial = " + m_impl->serial);
- result.append("revocation Date = " + String(m_impl->revocationDate));
- result.appendArray(m_impl->revocationReason.dump());
+ result.push_back("Serial = " + m_impl->serial);
+ result.push_back("revocation Date = " + String(m_impl->revocationDate));
+ appendArray(result, m_impl->revocationReason.dump());
return result;
}
@@ -275,7 +275,7 @@
if(!m_impl->extensions.valid()) return false;
- StringArray r = checkRevocationData(m_impl->revocationData);
+ std::vector<blocxx::String> r = checkRevocationData(m_impl->revocationData);
if(!r.empty())
{
LOGIT_DEBUG(r[0]);
@@ -284,45 +284,45 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CRLData::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(m_impl->version < 1 || m_impl->version > 2)
{
- result.append(Format("invalid version: %1", m_impl->version).toString());
+ result.push_back(Format("invalid version: %1", m_impl->version).toString());
}
if(m_impl->lastUpdate == 0)
{
- result.append(Format("invalid lastUpdate: %1", m_impl->lastUpdate).toString());
+ result.push_back(Format("invalid lastUpdate: %1", m_impl->lastUpdate).toString());
}
if(m_impl->nextUpdate <= m_impl->lastUpdate)
{
- result.append(Format("invalid nextUpdate: %1", m_impl->nextUpdate).toString());
+ result.push_back(Format("invalid nextUpdate: %1", m_impl->nextUpdate).toString());
}
- result.appendArray(m_impl->issuer.verify());
+ appendArray(result, m_impl->issuer.verify());
- result.appendArray(m_impl->extensions.verify());
- result.appendArray(checkRevocationData(m_impl->revocationData));
+ appendArray(result, m_impl->extensions.verify());
+ appendArray(result, checkRevocationData(m_impl->revocationData));
LOGIT_DEBUG_STRINGARRAY("CRLData::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CRLData::dump() const
{
- StringArray result;
- result.append("CRLData::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("CRLData::dump()");
- result.append("Version = " + String(m_impl->version));
- result.append("Fingerprint = " + m_impl->fingerprint);
- result.append("last Update = " + String(m_impl->lastUpdate));
- result.append("next Update = " + String(m_impl->nextUpdate));
- result.appendArray(m_impl->issuer.dump());
- result.append("signatureAlgorithm = "+ String(m_impl->signatureAlgorithm));
+ result.push_back("Version = " + String(m_impl->version));
+ result.push_back("Fingerprint = " + m_impl->fingerprint);
+ result.push_back("last Update = " + String(m_impl->lastUpdate));
+ result.push_back("next Update = " + String(m_impl->nextUpdate));
+ appendArray(result, m_impl->issuer.dump());
+ result.push_back("signatureAlgorithm = "+ String(m_impl->signatureAlgorithm));
String s;
for(uint i = 0; i < m_impl->signature.size(); ++i)
@@ -331,15 +331,15 @@
d.format("%02x:", static_cast<UInt8>(m_impl->signature[i]));
s += d;
}
- result.append("Signature = " + s);
+ result.push_back("Signature = " + s);
- result.appendArray(m_impl->extensions.dump());
+ appendArray(result, m_impl->extensions.dump());
std::map< String, RevocationEntry >::const_iterator it = m_impl->revocationData.begin();
for(; it != m_impl->revocationData.end(); ++it)
{
- result.append((*it).first);
- result.appendArray(((*it).second).dump());
+ result.push_back((*it).first);
+ appendArray(result, ((*it).second).dump());
}
return result;
@@ -350,14 +350,14 @@
: m_impl(new CRLDataImpl())
{}
-StringArray
+std::vector<blocxx::String>
CRLData::checkRevocationData(const std::map<String, RevocationEntry>& rd) const
{
- StringArray result;
+ std::vector<blocxx::String> result;
std::map<String, RevocationEntry>::const_iterator it = rd.begin();
for(; it != rd.end(); ++it)
{
- result.appendArray(((*it).second).verify());
+ appendArray(result, ((*it).second).verify());
}
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp Sat Jun 12 14:33:19 2010
@@ -80,7 +80,7 @@
LOGIT_DEBUG("Revocation Date: " << sbuf);
PerlRegEx r("^(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)Z$");
- StringArray sa = r.capture(sbuf);
+ std::vector<blocxx::String> sa = convStringArray(r.capture(sbuf));
if(sa.size() != 7)
{
@@ -121,7 +121,7 @@
BLOCXX_THROW(ca_mgm::ValueException,
Format(__("Invalid serial %1."), serial).c_str());
}
- StringArray r = reason.verify();
+ std::vector<blocxx::String> r = reason.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -233,7 +233,7 @@
void
CRLData_Priv::setIssuerDN(const DNObject& issuer)
{
- StringArray r = issuer.verify();
+ std::vector<blocxx::String> r = issuer.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -257,7 +257,7 @@
void
CRLData_Priv::setExtensions(const X509v3CRLExts& ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -269,7 +269,7 @@
void
CRLData_Priv::setRevocationData(const std::map<String, RevocationEntry>& data)
{
- StringArray r = checkRevocationData(data);
+ std::vector<blocxx::String> r = checkRevocationData(data);
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -330,7 +330,7 @@
delete [] cbuf;
PerlRegEx r("^(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)Z$");
- StringArray sa = r.capture(sbuf);
+ std::vector<blocxx::String> sa = convStringArray(r.capture(sbuf));
if(sa.size() != 7)
{
@@ -364,7 +364,7 @@
sbuf = String(cbuf);
delete [] cbuf;
- sa = r.capture(sbuf);
+ sa = convStringArray(r.capture(sbuf));
if(sa.size() != 7)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLDistributionPointsExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLDistributionPointsExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLDistributionPointsExtension.cpp Sat Jun 12 14:33:19 2010
@@ -77,11 +77,11 @@
bool p = caConfig->exists(type2Section(type, true), "crlDistributionPoints");
if(p)
{
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "crlDistributionPoints"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "crlDistributionPoints")));
if(sp[0].equalsIgnoreCase("critical")) setCritical(true);
- StringArray::const_iterator it = sp.begin();
+ std::vector<blocxx::String>::const_iterator it = sp.begin();
for(; it != sp.end(); ++it)
{
if((*it).indexOf(":") != String::npos)
@@ -123,7 +123,7 @@
void
CRLDistributionPointsExt::setCRLDistributionPoints(std::list<LiteralValue> dp)
{
- StringArray r = checkLiteralValueList(dp);
+ std::vector<blocxx::String> r = checkLiteralValueList(dp);
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -201,7 +201,7 @@
if(m_impl->altNameList.empty()) return false;
- StringArray r = checkLiteralValueList(m_impl->altNameList);
+ std::vector<blocxx::String> r = checkLiteralValueList(m_impl->altNameList);
if(!r.empty())
{
LOGIT_DEBUG(r[0]);
@@ -210,36 +210,36 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CRLDistributionPointsExt::verify() const
{
- blocxx::StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(m_impl->altNameList.empty())
{
- result.append(String("No value for CRLDistributionPointsExt."));
+ result.push_back(String("No value for CRLDistributionPointsExt."));
}
- result.appendArray(checkLiteralValueList(m_impl->altNameList));
+ appendArray(result, checkLiteralValueList(m_impl->altNameList));
LOGIT_DEBUG_STRINGARRAY("CRLDistributionPointsExt::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CRLDistributionPointsExt::dump() const
{
- StringArray result;
- result.append("CRLDistributionPointsExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("CRLDistributionPointsExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
std::list< LiteralValue >::const_iterator it = m_impl->altNameList.begin();
for(; it != m_impl->altNameList.end(); ++it)
{
- result.appendArray((*it).dump());
+ appendArray(result, (*it).dump());
}
return result;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLGenerationData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLGenerationData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLGenerationData.cpp Sat Jun 12 14:33:19 2010
@@ -83,7 +83,7 @@
const X509v3CRLGenerationExts& ext)
: m_impl(new CRLGenerationDataImpl(hours, ext))
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -123,7 +123,7 @@
void
CRLGenerationData::setExtensions(const X509v3CRLGenerationExts& ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -179,30 +179,30 @@
return m_impl->extensions.valid();
}
-blocxx::StringArray
+std::vector<blocxx::String>
CRLGenerationData::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(m_impl->crlHours == 0)
{
- result.append(Format("invalid crlhours: %1", m_impl->crlHours).toString());
+ result.push_back(Format("invalid crlhours: %1", m_impl->crlHours).toString());
}
- result.appendArray(m_impl->extensions.verify());
+ appendArray(result, m_impl->extensions.verify());
LOGIT_DEBUG_STRINGARRAY("CRLGenerationData::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CRLGenerationData::dump() const
{
- StringArray result;
- result.append("CRLGenerationData::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("CRLGenerationData::dump()");
- result.append("CRL Hours = " + String(m_impl->crlHours));
- result.appendArray(m_impl->extensions.dump());
+ result.push_back("CRL Hours = " + String(m_impl->crlHours));
+ appendArray(result, m_impl->extensions.dump());
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLReason.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLReason.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLReason.cpp Sat Jun 12 14:33:19 2010
@@ -286,22 +286,22 @@
// ----------------------------------------------------------------------------
-blocxx::StringArray
+std::vector<blocxx::String>
CRLReason::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(m_impl->reason.equalsIgnoreCase("certificateHold"))
{
String err = checkHoldInstruction(m_impl->holdInstruction);
if(!err.empty())
{
- result.append(err);
+ result.push_back(err);
}
}
else if(!checkReason(m_impl->reason))
{
- result.append(Format("Invalid revoke reason", m_impl->reason));
+ result.push_back(Format("Invalid revoke reason", m_impl->reason));
}
// compromiseDate == 0 is now a valid date
@@ -312,22 +312,22 @@
// ----------------------------------------------------------------------------
-blocxx::StringArray
+std::vector<blocxx::String>
CRLReason::dump() const
{
- StringArray result;
- result.append("CRLReason::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("CRLReason::dump()");
- result.append(Format("Revoke Reason = %1", m_impl->reason));
+ result.push_back(Format("Revoke Reason = %1", m_impl->reason));
if(m_impl->reason.equalsIgnoreCase("certificateHold"))
{
- result.append("hold Instruction =" + m_impl->holdInstruction);
+ result.push_back("hold Instruction =" + m_impl->holdInstruction);
}
else if(m_impl->reason.equalsIgnoreCase("keyCompromise") ||
m_impl->reason.equalsIgnoreCase("CACompromise"))
{
- result.append("compromise Date = " + String(m_impl->compromiseDate));
+ result.push_back("compromise Date = " + String(m_impl->compromiseDate));
}
return result;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificateData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificateData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificateData.cpp Sat Jun 12 14:33:19 2010
@@ -243,61 +243,61 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CertificateData::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(m_impl->version < 1 || m_impl->version > 3)
{
- result.append(Format("invalid version: %1", m_impl->version).toString());
+ result.push_back(Format("invalid version: %1", m_impl->version).toString());
}
if(!initHexCheck().isValid(m_impl->serial))
{
- result.append(Format("invalid serial: %1", m_impl->serial).toString());
+ result.push_back(Format("invalid serial: %1", m_impl->serial).toString());
}
if(m_impl->notBefore == 0)
{
- result.append(Format("invalid notBefore: %1", m_impl->notBefore).toString());
+ result.push_back(Format("invalid notBefore: %1", m_impl->notBefore).toString());
}
if(m_impl->notAfter <= m_impl->notBefore)
{
- result.append(Format("invalid notAfter: %1", m_impl->notAfter).toString());
+ result.push_back(Format("invalid notAfter: %1", m_impl->notAfter).toString());
}
- result.appendArray(m_impl->issuer.verify());
- result.appendArray(m_impl->subject.verify());
+ appendArray(result, m_impl->issuer.verify());
+ appendArray(result, m_impl->subject.verify());
// keysize ?
if(m_impl->publicKey.empty())
{
- result.append("invalid publicKey");
+ result.push_back("invalid publicKey");
}
- result.appendArray(m_impl->extensions.verify());
+ appendArray(result, m_impl->extensions.verify());
LOGIT_DEBUG_STRINGARRAY("CertificateData::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CertificateData::dump() const
{
- StringArray result;
- result.append("CertificateData::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("CertificateData::dump()");
- result.append("Version = " + String(m_impl->version));
- result.append("Serial = " + m_impl->serial);
- result.append("notBefore = " + String(m_impl->notBefore));
- result.append("notAfter = " + String(m_impl->notAfter));
- result.append("Fingerprint = " + m_impl->fingerprint);
- result.appendArray(m_impl->issuer.dump());
- result.appendArray(m_impl->subject.dump());
- result.append("Keysize = " + String(m_impl->keysize));
- result.append("public key algorithm = " + String(m_impl->pubkeyAlgorithm));
+ result.push_back("Version = " + String(m_impl->version));
+ result.push_back("Serial = " + m_impl->serial);
+ result.push_back("notBefore = " + String(m_impl->notBefore));
+ result.push_back("notAfter = " + String(m_impl->notAfter));
+ result.push_back("Fingerprint = " + m_impl->fingerprint);
+ appendArray(result, m_impl->issuer.dump());
+ appendArray(result, m_impl->subject.dump());
+ result.push_back("Keysize = " + String(m_impl->keysize));
+ result.push_back("public key algorithm = " + String(m_impl->pubkeyAlgorithm));
String pk;
for(size_t i = 0; i < m_impl->publicKey.size(); ++i)
@@ -306,8 +306,8 @@
s.format("%02x", (UInt8)m_impl->publicKey[i]);
pk += s + ":";
}
- result.append("public Key = " + pk);
- result.append("signatureAlgorithm = "+ String(m_impl->signatureAlgorithm));
+ result.push_back("public Key = " + pk);
+ result.push_back("signatureAlgorithm = "+ String(m_impl->signatureAlgorithm));
String s;
for(uint i = 0; i < m_impl->signature.size(); ++i)
@@ -317,8 +317,8 @@
s += d;
}
- result.append("Signature = " + s);
- result.appendArray(m_impl->extensions.dump());
+ result.push_back("Signature = " + s);
+ appendArray(result, m_impl->extensions.dump());
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificateData_Priv.cpp Sat Jun 12 14:33:19 2010
@@ -104,7 +104,7 @@
void
CertificateData_Priv::setIssuerDN(const DNObject& issuer)
{
- StringArray r = issuer.verify();
+ std::vector<blocxx::String> r = issuer.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -116,7 +116,7 @@
void
CertificateData_Priv::setSubjectDN(const DNObject& subject)
{
- StringArray r = subject.verify();
+ std::vector<blocxx::String> r = subject.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -158,7 +158,7 @@
void
CertificateData_Priv::setExtensions(const X509v3CertificateExts& ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -276,7 +276,7 @@
n = BIO_get_mem_data(bioS, &ustringval);
setSerial( String(reinterpret_cast<const char*>(ustringval), n).toUpperCase());
BIO_free(bioS);
-
+
// get notBefore
ASN1_TIME *t = X509_get_notBefore(x509);
char *cbuf = new char[t->length + 1];
@@ -288,7 +288,7 @@
delete [] cbuf;
PerlRegEx r("^(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)Z$");
- StringArray sa = r.capture(sbuf);
+ std::vector<blocxx::String> sa = convStringArray(r.capture(sbuf));
if(sa.size() != 7)
{
@@ -323,7 +323,7 @@
sbuf = String(cbuf);
delete [] cbuf;
- sa = r.capture(sbuf);
+ sa = convStringArray(r.capture(sbuf));
if(sa.size() != 7)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificateIssueData.cpp Sat Jun 12 14:33:19 2010
@@ -178,7 +178,7 @@
void
CertificateIssueData::setExtensions(const X509v3CertificateIssueExts& ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -258,41 +258,41 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CertificateIssueData::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(getStartDate() == 0)
{
- result.append(Format("invalid notBefore: %1", getStartDate()).toString());
+ result.push_back(Format("invalid notBefore: %1", getStartDate()).toString());
}
if(getEndDate() <= getStartDate())
{
- result.append(Format("invalid notAfter %1 <= notBefore %2",
+ result.push_back(Format("invalid notAfter %1 <= notBefore %2",
getEndDate(), getStartDate())
.toString());
}
- result.appendArray(m_impl->extensions.verify());
+ appendArray(result, m_impl->extensions.verify());
LOGIT_DEBUG_STRINGARRAY("CertificateIssueData::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CertificateIssueData::dump() const
{
- StringArray result;
- result.append("CertificateIssueData::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("CertificateIssueData::dump()");
- result.append("!CHANGING DATA! notBefore = " + String(getStartDate()));
- result.append("!CHANGING DATA! notAfter = " + String(getEndDate()));
- result.append("notAfter - notBefore (in days)= " +
+ result.push_back("!CHANGING DATA! notBefore = " + String(getStartDate()));
+ result.push_back("!CHANGING DATA! notAfter = " + String(getEndDate()));
+ result.push_back("notAfter - notBefore (in days)= " +
String((getEndDate() - getStartDate())/86400));
- result.append("MessageDigest = " + String(getMessageDigest()));
- result.appendArray(getExtensions().dump());
+ result.push_back("MessageDigest = " + String(getMessageDigest()));
+ appendArray(result, getExtensions().dump());
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp Sat Jun 12 14:33:19 2010
@@ -190,9 +190,9 @@
p = caConfig->exists(sectionName, "noticeNumbers");
if(p)
{
- StringArray a = PerlRegEx(",").
- split(caConfig->getValue(sectionName, "noticeNumbers"));
- StringArray::const_iterator it = a.begin();
+ std::vector<blocxx::String> a = convStringArray(PerlRegEx(",").
+ split(caConfig->getValue(sectionName, "noticeNumbers")));
+ std::vector<blocxx::String>::const_iterator it = a.begin();
for(; it != a.end(); ++it)
{
m_impl->noticeNumbers.push_back((*it).toInt32());
@@ -304,33 +304,33 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
UserNotice::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(m_impl->explicitText.length() > 200)
{
- result.append("explicitText to long");
+ result.push_back("explicitText to long");
}
if((m_impl->organization.empty() && !m_impl->noticeNumbers.empty()) ||
(!m_impl->organization.empty() && m_impl->noticeNumbers.empty()))
{
- result.append("organization and noticeNumbers must both present or absent");
+ result.push_back("organization and noticeNumbers must both present or absent");
}
LOGIT_DEBUG_STRINGARRAY("UserNotice::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
UserNotice::dump() const
{
- StringArray result;
- result.append("UserNotice::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("UserNotice::dump()");
- result.append("explicitText = "+ m_impl->explicitText);
- result.append("organization = " + m_impl->organization);
+ result.push_back("explicitText = "+ m_impl->explicitText);
+ result.push_back("organization = " + m_impl->organization);
String n;
std::list< blocxx::Int32 >::const_iterator it = m_impl->noticeNumbers.begin();
@@ -338,7 +338,7 @@
{
n += String(*it) + " ";
}
- result.append("noticeNumbers = " + n);
+ result.push_back("noticeNumbers = " + n);
return result;
}
@@ -469,7 +469,7 @@
void
CertificatePolicy::setCpsURI(const StringList& cpsURI)
{
- StringArray r = checkCpsURIs(cpsURI);
+ std::vector<blocxx::String> r = checkCpsURIs(cpsURI);
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -487,7 +487,7 @@
void
CertificatePolicy::setUserNoticeList(const std::list<UserNotice>& list)
{
- StringArray r = checkNoticeList(list);
+ std::vector<blocxx::String> r = checkNoticeList(list);
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -556,7 +556,7 @@
return false;
}
- StringArray r = checkCpsURIs(m_impl->cpsURI);
+ std::vector<blocxx::String> r = checkCpsURIs(m_impl->cpsURI);
if(!r.empty())
{
LOGIT_DEBUG(r[0]);
@@ -572,46 +572,46 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CertificatePolicy::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
ValueCheck oidCheck = initOIDCheck();
if(m_impl->policyIdentifier.empty() ||
!oidCheck.isValid(m_impl->policyIdentifier))
{
- result.append(Format("invalid value for policyIdentifier: %1",
+ result.push_back(Format("invalid value for policyIdentifier: %1",
m_impl->policyIdentifier).toString());
}
- result.appendArray(checkCpsURIs(m_impl->cpsURI));
+ appendArray(result, checkCpsURIs(m_impl->cpsURI));
- result.appendArray(checkNoticeList(m_impl->noticeList));
+ appendArray(result, checkNoticeList(m_impl->noticeList));
LOGIT_DEBUG_STRINGARRAY("CertificatePolicy::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CertificatePolicy::dump() const
{
- StringArray result;
- result.append("CertificatePolicy::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("CertificatePolicy::dump()");
- result.append("policy Identifier = " + m_impl->policyIdentifier);
+ result.push_back("policy Identifier = " + m_impl->policyIdentifier);
StringList::const_iterator it1 = m_impl->cpsURI.begin();
for(; it1 != m_impl->cpsURI.end(); ++it1)
{
- result.append("CPS = " + (*it1));
+ result.push_back("CPS = " + (*it1));
}
std::list< UserNotice >::const_iterator it2 = m_impl->noticeList.begin();
for(; it2 != m_impl->noticeList.end(); ++it2)
{
- result.appendArray((*it2).dump());
+ appendArray(result, (*it2).dump());
}
return result;
}
@@ -648,10 +648,10 @@
}
}
-blocxx::StringArray
+std::vector<blocxx::String>
CertificatePolicy::checkCpsURIs(const StringList& cpsURIs) const
{
- StringArray result;
+ std::vector<blocxx::String> result;
ValueCheck uriCheck = initURICheck();
StringList::const_iterator it = cpsURIs.begin();
@@ -659,20 +659,20 @@
{
if(!uriCheck.isValid(*it))
{
- result.append(Format("invalid URI: %1", *it).toString());
+ result.push_back(Format("invalid URI: %1", *it).toString());
}
}
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CertificatePolicy::checkNoticeList(const std::list<UserNotice>& list) const
{
- StringArray result;
+ std::vector<blocxx::String> result;
std::list<UserNotice>::const_iterator it = list.begin();
for(;it != list.end(); it++)
{
- result.appendArray((*it).verify());
+ appendArray(result, (*it).verify());
}
return result;
}
@@ -689,7 +689,7 @@
: ExtensionBase()
, m_impl(new CertificatePoliciesExtImpl(policies))
{
- StringArray r = checkPolicies(policies);
+ std::vector<blocxx::String> r = checkPolicies(policies);
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -715,16 +715,16 @@
if(p)
{
ValueCheck check = initOIDCheck();
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "certificatePolicies"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "certificatePolicies")));
if(sp[0].equalsIgnoreCase("critical"))
{
setCritical(true);
- sp.remove(0);
+ sp.erase(sp.begin());
}
- StringArray::const_iterator it = sp.begin();
+ std::vector<blocxx::String>::const_iterator it = sp.begin();
for(; it != sp.end(); ++it)
{
if((*it).equalsIgnoreCase("ia5org"))
@@ -786,7 +786,7 @@
void
CertificatePoliciesExt::setPolicies(const std::list<CertificatePolicy>& policies)
{
- StringArray r = checkPolicies(policies);
+ std::vector<blocxx::String> r = checkPolicies(policies);
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -861,7 +861,7 @@
LOGIT_DEBUG("No policy set");
return false;
}
- StringArray r = checkPolicies(m_impl->policies);
+ std::vector<blocxx::String> r = checkPolicies(m_impl->policies);
if(!r.empty())
{
LOGIT_DEBUG(r[0]);
@@ -870,52 +870,52 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CertificatePoliciesExt::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(m_impl->policies.empty())
{
- result.append("No policy set");
+ result.push_back("No policy set");
}
- result.appendArray(checkPolicies(m_impl->policies));
+ appendArray(result, checkPolicies(m_impl->policies));
LOGIT_DEBUG_STRINGARRAY("CertificatePoliciesExt::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CertificatePoliciesExt::dump() const
{
- StringArray result;
- result.append("CertificatePoliciesExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("CertificatePoliciesExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("ia5org = " + blocxx::Bool(m_impl->ia5org).toString());
+ result.push_back("ia5org = " + blocxx::Bool(m_impl->ia5org).toString());
std::list< CertificatePolicy >::const_iterator it = m_impl->policies.begin();
for(; it != m_impl->policies.end(); ++it)
{
- result.appendArray((*it).dump());
+ appendArray(result, (*it).dump());
}
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
CertificatePoliciesExt::checkPolicies(const std::list<CertificatePolicy>& pl) const
{
- StringArray result;
+ std::vector<blocxx::String> result;
std::list<CertificatePolicy>::const_iterator it = pl.begin();
for(;it != pl.end(); it++)
{
- result.appendArray((*it).verify());
+ appendArray(result, (*it).verify());
}
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp Sat Jun 12 14:33:19 2010
@@ -145,26 +145,26 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
RDNObject::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(m_impl->type.empty())
{
- result.append("type is empty");
+ result.push_back("type is empty");
}
if(m_impl->min != 0 && m_impl->value.UTF8Length() < m_impl->min)
{
- result.append("Value(" + m_impl->value +
+ result.push_back("Value(" + m_impl->value +
") is too small. Value has to be a minimal length of " +
String(m_impl->min));
}
if(m_impl->max != 0 && m_impl->value.UTF8Length() > m_impl->max)
{
- result.append("Value(" + m_impl->value +
+ result.push_back("Value(" + m_impl->value +
") is too long. Value has to be a maximal length of " +
String(m_impl->max));
}
@@ -174,16 +174,16 @@
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
RDNObject::dump() const
{
- StringArray result;
- result.append("RDNObject::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("RDNObject::dump()");
- result.append(m_impl->type + "=" + m_impl->value);
- result.append("Prompt:" + m_impl->prompt);
- result.append("Min:" + String(m_impl->min));
- result.append("Max:" + String(m_impl->max));
+ result.push_back(m_impl->type + "=" + m_impl->value);
+ result.push_back("Prompt:" + m_impl->prompt);
+ result.push_back("Min:" + String(m_impl->min));
+ result.push_back("Max:" + String(m_impl->max));
return result;
}
@@ -361,7 +361,7 @@
: m_impl(new DNObjectImpl())
{
m_impl->dn = dn;
- StringArray r = this->verify();
+ std::vector<blocxx::String> r = this->verify();
if(!r.empty())
{
BLOCXX_THROW(ca_mgm::ValueException, r[0].c_str());
@@ -388,7 +388,7 @@
void
DNObject::setDN(const std::list<RDNObject> &dn)
{
- StringArray r = checkRDNList(dn);
+ std::vector<blocxx::String> r = checkRDNList(dn);
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -428,7 +428,7 @@
LOGIT_DEBUG("empty DN");
return false;
}
- StringArray r = checkRDNList(m_impl->dn);
+ std::vector<blocxx::String> r = checkRDNList(m_impl->dn);
if(!r.empty())
{
LOGIT_DEBUG(r[0]);
@@ -437,45 +437,45 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
DNObject::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(m_impl->dn.empty())
{
- result.append("empty DN");
+ result.push_back("empty DN");
}
- result.appendArray(checkRDNList(m_impl->dn));
+ appendArray(result, checkRDNList(m_impl->dn));
LOGIT_DEBUG_STRINGARRAY("DNObject::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
DNObject::checkRDNList(const std::list<RDNObject>& list) const
{
- StringArray result;
+ std::vector<blocxx::String> result;
std::list<RDNObject>::const_iterator it = list.begin();
for(; it != list.end(); ++it)
{
- result.appendArray((*it).verify());
+ appendArray(result, (*it).verify());
}
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
DNObject::dump() const
{
- StringArray result;
- result.append("DNObject::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("DNObject::dump()");
std::list< RDNObject >::const_iterator it = m_impl->dn.begin();
for(; it != m_impl->dn.end(); ++it)
{
- result.appendArray((*it).dump());
+ appendArray(result, (*it).dump());
}
return result;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp Sat Jun 12 14:33:19 2010
@@ -104,7 +104,7 @@
*
for(uint j = 0 ; j < lines.size(); ++j) {
- StringArray vals = re.capture(lines[j]);
+ std::vector<blocxx::String> vals = re.capture(lines[j]);
if(vals.size() != 3) {
@@ -207,7 +207,7 @@
Format(__("Cannot parse section %1."), dnSect).c_str());
}
StringList::const_iterator it = dnKeys.begin();
- Array<Array<blocxx::String> > newDNSect;
+ std::vector<std::vector<blocxx::String> > newDNSect;
String lastFieldName;
String defaultValue;
@@ -242,7 +242,7 @@
}
if(defaultValue != "")
{
- Array<blocxx::String> line(2, "");
+ std::vector<blocxx::String> line(2, "");
line[0] = lastFieldName + "_default";
line[1] = defaultValue;
newDNSect.push_back(line);
@@ -253,14 +253,14 @@
defaultValue = "";
}
- Array<blocxx::String> line(2, "");
+ std::vector<blocxx::String> line(2, "");
line[0] = *it;
line[1] = ca.getConfig()->getValue(dnSect, *it);
newDNSect.push_back(line);
ca.getConfig()->deleteValue(dnSect, *it);
}
- Array<Array<blocxx::String> >::const_iterator newIT;
+ std::vector<std::vector<blocxx::String> >::const_iterator newIT;
for(newIT = newDNSect.begin(); newIT != newDNSect.end(); ++newIT)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/ExtendedKeyUsageExt.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/ExtendedKeyUsageExt.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/ExtendedKeyUsageExt.cpp Sat Jun 12 14:33:19 2010
@@ -80,9 +80,9 @@
{
String ct = caConfig->getValue(type2Section(type, true),
"extendedKeyUsage");
- StringArray sp = PerlRegEx("\\s*,\\s*").split(ct);
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*").split(ct));
- StringArray::const_iterator it = sp.begin();
+ std::vector<blocxx::String>::const_iterator it = sp.begin();
if(sp[0].equalsIgnoreCase("critical"))
{
setCritical(true);
@@ -270,16 +270,16 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
ExtendedKeyUsageExt::verify() const
{
- blocxx::StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(m_impl->usage.empty())
{
- result.append(String("invalid ExtendedKeyUsageExt."));
+ result.push_back(String("invalid ExtendedKeyUsageExt."));
}
StringList::const_iterator it = m_impl->usage.begin();
@@ -287,26 +287,26 @@
{
if(!checkValue(*it))
{
- result.append(Format("invalid additionalOID(%1)", *it).toString());
+ result.push_back(Format("invalid additionalOID(%1)", *it).toString());
}
}
LOGIT_DEBUG_STRINGARRAY("ExtendedKeyUsageExt::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
ExtendedKeyUsageExt::dump() const
{
- StringArray result;
- result.append("ExtendedKeyUsageExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("ExtendedKeyUsageExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
StringList::const_iterator it = m_impl->usage.begin();
for(; it != m_impl->usage.end(); ++it)
{
- result.append("Extended KeyUsage = " + (*it));
+ result.push_back("Extended KeyUsage = " + (*it));
}
return result;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/ExtensionBase.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/ExtensionBase.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/ExtensionBase.cpp Sat Jun 12 14:33:19 2010
@@ -116,16 +116,16 @@
return m_impl->isPresent();
}
-blocxx::StringArray
+std::vector<blocxx::String>
ExtensionBase::dump() const
{
- StringArray result;
- result.append("ExtensionBase::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("ExtensionBase::dump()");
- result.append("is Present = " + Bool(isPresent()).toString());
+ result.push_back("is Present = " + Bool(isPresent()).toString());
if(!isPresent()) return result;
- result.append("is Critical = " + Bool(isCritical()).toString());
+ result.push_back("is Critical = " + Bool(isCritical()).toString());
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.cpp Sat Jun 12 14:33:19 2010
@@ -26,6 +26,8 @@
#include "INIParser/INIParser.hpp"
#include <blocxx/PosixRegEx.hpp>
+#include "Utils.hpp"
+
using namespace blocxx;
// ===================================================================
@@ -36,7 +38,7 @@
// ===================================================================
Entry::Entry()
- : m_value(), m_comment()
+ : m_value(), m_comment()
{
}
@@ -136,18 +138,18 @@
: m_path(parentSection.m_path),
m_parser(parentSection.m_parser)
{
- m_path.append(key);
+ m_path.push_back(key);
- StringArray path;
+ std::vector<blocxx::String> path;
StringList valueList;
-
+
valueList.clear();
valueList.push_back(""); // Currently no comment will be
// generated for this section
path.clear();
- path.append("section");
- path.appendArray (parentSection.m_path);
- path.append(key);
+ path.push_back("section");
+ appendArray (path, parentSection.m_path);
+ path.push_back(key);
if (m_parser)
{
m_parser->inifile.Write (path,
@@ -167,11 +169,11 @@
EntrySize Section::entrySize() const
{
StringList stringList;
- StringArray path;
+ std::vector<blocxx::String> path;
path.clear();
stringList.clear();
- path.append("value");
- path.appendArray (m_path);
+ path.push_back("value");
+ appendArray (path, m_path);
if (m_parser)
{
m_parser->inifile.Dir (path, stringList);
@@ -183,16 +185,16 @@
EntrySize Section::sectionSize() const
{
StringList stringList;
- StringArray path;
+ std::vector<blocxx::String> path;
path.clear();
stringList.clear();
- path.append("section");
- path.appendArray (m_path);
+ path.push_back("section");
+ appendArray (path, m_path);
if (m_parser)
{
m_parser->inifile.Dir (path, stringList);
}
- return stringList.size();
+ return stringList.size();
}
@@ -213,13 +215,13 @@
// -------------------------------------------------------------------
IniType Section::contains(const Key &key) const
{
- IniType ret = NO;
+ IniType ret = NO;
StringList stringList;
- StringArray path;
+ std::vector<blocxx::String> path;
path.clear();
stringList.clear();
- path.append("value");
- path.appendArray (m_path);
+ path.push_back("value");
+ appendArray (path, m_path);
if (m_parser)
{
m_parser->inifile.Dir (path, stringList);
@@ -231,8 +233,8 @@
}
path.clear();
stringList.clear();
- path.append("section");
- path.appendArray (m_path);
+ path.push_back("section");
+ appendArray (path, m_path);
m_parser->inifile.Dir (path, stringList);
for(it = stringList.begin(); it != stringList.end(); ++it)
{
@@ -247,9 +249,9 @@
ret = SECTION;
}
}
- }
+ }
}
-
+
return ret;
}
@@ -258,12 +260,12 @@
{
StringList entryKeys;
StringList stringList;
- StringArray path;
-
+ std::vector<blocxx::String> path;
+
path.clear();
stringList.clear();
- path.append("value");
- path.appendArray (m_path);
+ path.push_back("value");
+ appendArray (path, m_path);
if (m_parser)
{
// Evaluate all keys
@@ -284,12 +286,12 @@
{
EntryMap entrymap;
StringList stringList;
- StringArray path;
-
+ std::vector<blocxx::String> path;
+
path.clear();
stringList.clear();
- path.append("value");
- path.appendArray (m_path);
+ path.push_back("value");
+ appendArray (path, m_path);
if (m_parser)
{
// Evaluate all keys
@@ -297,15 +299,15 @@
for (StringList::iterator it = stringList.begin();
it != stringList.end(); it++)
{
- //evaluate
- StringArray valuePath;
+ //evaluate
+ std::vector<blocxx::String> valuePath;
StringList valueList;
Value value("");
Comment comment("");
-
+
valuePath = path;
valueList.clear();
- valuePath.append(*it);
+ valuePath.push_back(*it);
if (!m_parser->inifile.Read (valuePath,
valueList,
m_parser->HaveRewrites ())&&
@@ -316,9 +318,9 @@
}
valuePath.clear();
valueList.clear();
- valuePath.append("value_comment");
- valuePath.appendArray (m_path);
- valuePath.append(*it);
+ valuePath.push_back("value_comment");
+ appendArray (valuePath, m_path);
+ valuePath.push_back(*it);
if (!m_parser->inifile.Read (valuePath,
valueList,
m_parser->HaveRewrites ()) &&
@@ -342,12 +344,12 @@
EntryMap entryMap = getEntries();
blocxx::PosixRegEx reg(pattern, REG_EXTENDED | (icase ? REG_ICASE : 0));
EntryMap ret;
-
+
for (EntryMap::iterator it = entryMap.begin(); it !=entryMap.end(); it++ )
{
if( reg.match(it->first) )
{
- ret.insert (EntryMap::value_type(it->first,it->second));
+ ret.insert (EntryMap::value_type(it->first,it->second));
}
}
@@ -397,11 +399,11 @@
return false;
}
- StringArray path;
+ std::vector<blocxx::String> path;
path.clear();
- path.append("value");
- path.appendArray (m_path);
- path.append(key);
+ path.push_back("value");
+ appendArray (path, m_path);
+ path.push_back(key);
return m_parser->inifile.Delete (path)==0 ? true:false ;
}
@@ -409,15 +411,15 @@
// -------------------------------------------------------------------
bool Section::addValue(const Key &key, const Value &value)
{
- StringArray valuePath;
+ std::vector<blocxx::String> valuePath;
StringList valueList;
-
+
valueList.clear();
valueList.push_back(value);
valuePath.clear();
- valuePath.append("value");
- valuePath.appendArray (m_path);
- valuePath.append(key);
+ valuePath.push_back("value");
+ appendArray (valuePath, m_path);
+ valuePath.push_back(key);
if (m_parser)
{
return m_parser->inifile.Write (valuePath,
@@ -436,15 +438,15 @@
// adding value
ok = addValue (key, entry.getValue());
- StringArray valuePath;
+ std::vector<blocxx::String> valuePath;
StringList valueList;
-
+
valueList.clear();
valueList.push_back(entry.getComment());
valuePath.clear();
- valuePath.append("value_comment");
- valuePath.appendArray (m_path);
- valuePath.append(key);
+ valuePath.push_back("value_comment");
+ appendArray (valuePath, m_path);
+ valuePath.push_back(key);
if (ok && m_parser)
{
return m_parser->inifile.Write (valuePath,
@@ -492,12 +494,12 @@
{
StringList sectionList;
StringList stringList;
- StringArray path;
-
+ std::vector<blocxx::String> path;
+
path.clear();
stringList.clear();
- path.append("section");
- path.appendArray (m_path);
+ path.push_back("section");
+ appendArray (path, m_path);
if (m_parser)
{
// Evaluate all keys
@@ -518,12 +520,12 @@
{
SectionMap sectionMap;
StringList stringList;
- StringArray path;
-
+ std::vector<blocxx::String> path;
+
path.clear();
stringList.clear();
- path.append("section");
- path.appendArray (m_path);
+ path.push_back("section");
+ appendArray (path, m_path);
if (m_parser)
{
// Evaluate all keys
@@ -534,7 +536,7 @@
//generate all sections
Section section(m_parser);
section.m_path = m_path;
- section.m_path.append (*it);
+ section.m_path.push_back (*it);
sectionMap.insert (SectionMap::value_type(*it,section));
}
}
@@ -550,12 +552,12 @@
SectionMap sectionMap = getSections();
blocxx::PosixRegEx reg(pattern, REG_EXTENDED | (icase ? REG_ICASE : 0));
SectionMap ret;
-
+
for (SectionMap::iterator it = sectionMap.begin(); it !=sectionMap.end(); it++ )
{
if( reg.match(it->first) )
{
- ret.insert (SectionMap::value_type(it->first,it->second));
+ ret.insert (SectionMap::value_type(it->first,it->second));
}
}
@@ -571,7 +573,7 @@
{
Section section (m_parser);
section.m_path = m_path;
- section.m_path.append (key);
+ section.m_path.push_back (key);
return section;
}
if (defaultSection != NULL)
@@ -593,11 +595,11 @@
return false;
}
- StringArray path;
+ std::vector<blocxx::String> path;
path.clear();
- path.append("section");
- path.appendArray (m_path);
- path.append(key);
+ path.push_back("section");
+ appendArray (path, m_path);
+ path.push_back(key);
return m_parser->inifile.Delete (path) == 0 ? true:false;
}
@@ -606,14 +608,14 @@
// -------------------------------------------------------------------
bool Section::setComment( const Comment &comment)
{
- StringArray valuePath;
+ std::vector<blocxx::String> valuePath;
StringList valueList;
-
+
valueList.clear();
valueList.push_back(comment);
valuePath.clear();
- valuePath.append("section_comment");
- valuePath.appendArray (m_path);
+ valuePath.push_back("section_comment");
+ appendArray (valuePath, m_path);
if (m_parser)
{
return m_parser->inifile.Write (valuePath,
@@ -628,7 +630,7 @@
// -------------------------------------------------------------------
Comment Section::getComment()
{
- StringArray valuePath;
+ std::vector<blocxx::String> valuePath;
StringList valueList;
Comment comment;
@@ -637,11 +639,11 @@
// there is no comment on top level section available
return comment;
}
-
+
valuePath.clear();
valueList.clear();
- valuePath.append("section_comment");
- valuePath.appendArray (m_path);
+ valuePath.push_back("section_comment");
+ appendArray (valuePath, m_path);
if (m_parser && !m_parser->inifile.Read (valuePath,
valueList,
m_parser->HaveRewrites ()) &&
@@ -684,75 +686,75 @@
INIParser::~INIParser ()
{
if (parser->isStarted())
- parser->write();
+ parser->write();
}
// -------------------------------------------------------------------
void INIParser::initFiles (const String &filename)
{
- parser->initFiles (filename.c_str());
+ parser->initFiles (filename.c_str());
}
-
+
// -------------------------------------------------------------------
-void INIParser::initFiles (const blocxx::StringArray &fileList )
+void INIParser::initFiles (const std::vector<blocxx::String> &fileList )
{
- parser->initFiles(fileList);
+ parser->initFiles(fileList);
}
// -------------------------------------------------------------------
-bool INIParser::initMachine (const blocxx::Array<Options> &options,
- const blocxx::StringArray &commentsDescr,
- const blocxx::Array<SectionDescr> §ionDescr,
- const blocxx::Array<EntryDescr> &entryDescr,
- const blocxx::Array<IoPatternDescr> &rewrites,
+bool INIParser::initMachine (const std::vector<Options> &options,
+ const std::vector<blocxx::String> &commentsDescr,
+ const std::vector<SectionDescr> §ionDescr,
+ const std::vector<EntryDescr> &entryDescr,
+ const std::vector<IoPatternDescr> &rewrites,
const blocxx::String &subident)
{
// Resetting flags; set to "is init"
parser->reset();
// options
- StringArray opt;
+ std::vector<blocxx::String> opt;
opt.clear();
for (unsigned int i = 0;i<options.size();i++)
{
switch (options[i])
{
case IGNOMR_CASE_REGEXPS:
- opt.append ("ignore_case_regexps");
+ opt.push_back ("ignore_case_regexps");
break;
case IGNORE_CASE:
- opt.append ("ignore_case");
+ opt.push_back ("ignore_case");
break;
case FIRST_UPPER:
- opt.append ("first_upper");
+ opt.push_back ("first_upper");
break;
case PREFER_UPPERCASE:
- opt.append ("prefer_uppercase");
+ opt.push_back ("prefer_uppercase");
break;
case LINE_CAN_CONTINUE:
- opt.append ("line_can_continue");
+ opt.push_back ("line_can_continue");
break;
case NO_NESTED_SECTIONS:
- opt.append ("no_nested_sections");
+ opt.push_back ("no_nested_sections");
break;
case GLOBAL_VALUES:
- opt.append ("global_values");
+ opt.push_back ("global_values");
break;
case REPEAT_NAMES:
- opt.append ("repeat_names");
+ opt.push_back ("repeat_names");
break;
case COMMENTS_LAST:
- opt.append ("comments_last");
+ opt.push_back ("comments_last");
break;
case JOIN_MULTILINE:
- opt.append ("join_multiline");
+ opt.push_back ("join_multiline");
break;
case NO_FINALCOMMENT_KILL:
- opt.append ("no_finalcomment_kill");
+ opt.push_back ("no_finalcomment_kill");
break;
case READ_ONLY:
- opt.append ("read_only");
+ opt.push_back ("read_only");
break;
}
}
@@ -761,15 +763,15 @@
// comments
parser->initComments( commentsDescr );
- // sections
+ // sections
parser->initSection (sectionDescr);
-
- parser->initSubident (subident);
+
+ parser->initSubident (subident);
// entries
parser->initParam (entryDescr);
-
- // rewrite settings
+
+ // rewrite settings
parser->initRewrite (rewrites);
// commit initialization
@@ -789,11 +791,11 @@
{
return parser->parse () == 0;
}
-
+
// -------------------------------------------------------------------
void INIParser::UpdateIfModif ()
{
- parser->UpdateIfModif ();
+ parser->UpdateIfModif ();
}
// -------------------------------------------------------------------
@@ -807,32 +809,32 @@
bool SysConfig::initMachine ()
{
- blocxx::Array<Options> options;
- blocxx::StringArray commentsDescr;
- blocxx::Array<SectionDescr> sectionDescr;
- blocxx::Array<EntryDescr> entryDescr;
- blocxx::Array<IoPatternDescr> rewrites;
-
- options.append (GLOBAL_VALUES);
- options.append (LINE_CAN_CONTINUE);
- options.append (COMMENTS_LAST);
- options.append (JOIN_MULTILINE);
-
- commentsDescr.append("^[ \t]*#.*$");
- commentsDescr.append("#.*");
- commentsDescr.append("^[ \t]*$");
+ std::vector<Options> options;
+ std::vector<blocxx::String> commentsDescr;
+ std::vector<SectionDescr> sectionDescr;
+ std::vector<EntryDescr> entryDescr;
+ std::vector<IoPatternDescr> rewrites;
+
+ options.push_back (GLOBAL_VALUES);
+ options.push_back (LINE_CAN_CONTINUE);
+ options.push_back (COMMENTS_LAST);
+ options.push_back (JOIN_MULTILINE);
+
+ commentsDescr.push_back("^[ \t]*#.*$");
+ commentsDescr.push_back("#.*");
+ commentsDescr.push_back("^[ \t]*$");
IoPatternDescr pattern = { "([a-zA-Z0-9_]+)[ \t]*=[ \t]*\"([^\"]*)\"", "%s=\"%s\""};
- EntryDescr eDescr = {pattern, "([a-zA-Z0-9_]+)[ \t]*=[ \t]*\"([^\"]*)", "([^\"]*)\"" , true};
- entryDescr.append (eDescr);
+ EntryDescr eDescr = {pattern, "([a-zA-Z0-9_]+)[ \t]*=[ \t]*\"([^\"]*)", "([^\"]*)\"" , true};
+ entryDescr.push_back (eDescr);
IoPatternDescr pattern2 = {"([a-zA-Z0-9_]+)[ \t]*=[ \t]*([^\"]*[^ \t\"]|)[ \t]*$", "%s=\"%s\""};
EntryDescr eDescr2 = {pattern2, "", "" , false};
- entryDescr.append (eDescr2);
+ entryDescr.push_back (eDescr2);
IoPatternDescr pattern3 = {"^[ \t]*([a-zA-Z_][a-zA-Z0-9_]*)[ \t]*=[ \t]*'([^']*)'", "%s='%s'" };
EntryDescr eDescr3 = {pattern3, "([a-zA-Z_][a-zA-Z0-9_]*)[ \t]*=[ \t]*'([^']*)", "([^']*)'" , true};
- entryDescr.append (eDescr3);
+ entryDescr.push_back (eDescr3);
if (!INIParser::initMachine (options, commentsDescr, sectionDescr,
entryDescr, rewrites))
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp Sat Jun 12 14:33:19 2010
@@ -321,7 +321,7 @@
private:
- blocxx::StringArray m_path;
+ std::vector<blocxx::String> m_path;
blocxx::IntrusiveReference<IniParser> m_parser;
};
@@ -403,11 +403,11 @@
* using namespace ca_mgm;
* using namespace ca_mgm::INI;
*
- * blocxx::Array<Options> options; // Options like NO_NESTED_SECTIONS, LINE_CAN_CONTINUE, ...
- * blocxx::StringArray commentsDescr; // Regular expression of the comments description
- * blocxx::Array<SectionDescr> sectionDescr; // Regular expression of a section description
- * blocxx::Array<EntryDescr> entryDescr; // Regular expressions for entries (keys/values).
- * blocxx::Array<IoPatternDescr> rewrites; // rules for writing key/value
+ * std::vector<Options> options; // Options like NO_NESTED_SECTIONS, LINE_CAN_CONTINUE, ...
+ * std::vector<blocxx::String> commentsDescr; // Regular expression of the comments description
+ * std::vector<SectionDescr> sectionDescr; // Regular expression of a section description
+ * std::vector<EntryDescr> entryDescr; // Regular expressions for entries (keys/values).
+ * std::vector<IoPatternDescr> rewrites; // rules for writing key/value
*
* options.append (GLOBAL_VALUES); // Values at the top level(not in section) are allowed
* options.append (LINE_CAN_CONTINUE); // if there is \ at the end of line,
@@ -486,7 +486,7 @@
* Sets parser to multiple file mode and sets the glob-expressions.
* @param fileList list of glob-expressions
*/
- void initFiles (const blocxx::StringArray &fileList );
+ void initFiles (const std::vector<blocxx::String> &fileList );
/**
* Sets flags and regular expressions.
@@ -535,11 +535,11 @@
* have indented subsections, use this. Example: " " "\t"
* @return true if successful
*/
- virtual bool initMachine (const blocxx::Array<Options> &options,
- const blocxx::StringArray &commentsDescr,
- const blocxx::Array<SectionDescr> §ionDescr,
- const blocxx::Array<EntryDescr> &entryDescr,
- const blocxx::Array<IoPatternDescr> &rewrites,
+ virtual bool initMachine (const std::vector<Options> &options,
+ const std::vector<blocxx::String> &commentsDescr,
+ const std::vector<SectionDescr> §ionDescr,
+ const std::vector<EntryDescr> &entryDescr,
+ const std::vector<IoPatternDescr> &rewrites,
const blocxx::String &subident = "");
/**
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.cpp Sat Jun 12 14:33:19 2010
@@ -28,7 +28,7 @@
using std::pair;
using namespace blocxx;
-String pathToString(const StringArray&p)
+String pathToString(const std::vector<blocxx::String>&p)
{
if (p.empty()) return String(".");
String v;
@@ -74,7 +74,7 @@
void IniSection::initSection (const String&name,const String&comment,int rb, int wb)
{
String k = ip->changeCase (name);
-
+
IniSection s (ip);
IniSectionIdxIterator sxi;
if (!ip->repeatNames () && (sxi = isections.find (k)) != isections.end ())
@@ -109,7 +109,7 @@
isections.insert (IniSectionIndex::value_type (k, --container.end ()));
}
-IniSection& IniSection::findSection(const StringArray&path, int from)
+IniSection& IniSection::findSection(const std::vector<blocxx::String>&path, int from)
{
String k = ip->changeCase (path[from]);
IniSectionIdxIterator v = isections.find(k);
@@ -122,7 +122,7 @@
return from+1 >= (int)path.size() ? s : s.findSection (path, from+1);
}
-int IniSection::findEndFromUp (const StringArray&path, int wanted, int found, int from)
+int IniSection::findEndFromUp (const std::vector<blocxx::String>&path, int wanted, int found, int from)
{
@@ -183,7 +183,7 @@
for (; sxi != sxe; ++sxi)
{
- printf ("{%s @%p}\n", sxi->first.c_str (), &*sxi->second);
+ printf ("{%s @%p}\n", sxi->first.c_str (), &*sxi->second);
}
printf ("{Values}\n");
@@ -193,7 +193,7 @@
for (; exi != exe; ++exi)
{
- printf ("{%s @%p}\n", exi->first.c_str (), &*exi->second);
+ printf ("{%s @%p}\n", exi->first.c_str (), &*exi->second);
}
printf("</%s>\n", name.c_str());
@@ -221,10 +221,10 @@
String k = ip->changeCase (ci->s ().getName ());
isections.insert (IniSectionIndex::value_type (k, ci));
}
- }
+ }
}
-int IniSection::getMyValue (const StringArray &p, StringList &out, int what, int depth)
+int IniSection::getMyValue (const std::vector<blocxx::String> &p, StringList &out, int what, int depth)
{
String k = ip->changeCase (p[depth]);
// Find all values and return them according to repeat_names
@@ -244,10 +244,10 @@
results.push_back (String (e.getValue ()));
break;
case 1: out.push_back (String (e.getComment()));
- results.push_back (String (e.getComment()));
+ results.push_back (String (e.getComment()));
break;
default: out.push_back (String (e.getReadBy ()));
- results.push_back (String (e.getReadBy ()));
+ results.push_back (String (e.getReadBy ()));
break;
}
}
@@ -268,7 +268,7 @@
return -1;
}
-int IniSection::getValue (const StringArray&p, StringList&out,int what, int depth)
+int IniSection::getValue (const std::vector<blocxx::String>&p, StringList&out,int what, int depth)
{
String k = ip->changeCase (p[depth]);
if ( depth + 1 < int(p.size()))
@@ -292,7 +292,7 @@
}
// Read calls us with the path length >= 2
-int IniSection::getSectionProp (const StringArray&p, StringList&out, int what, int depth)
+int IniSection::getSectionProp (const std::vector<blocxx::String>&p, StringList&out, int what, int depth)
{
String k = ip->changeCase (p[depth]);
// Find the matching sections.
@@ -332,7 +332,7 @@
else if (what == 1)
{
out.push_back (String (s.rewrite_by));
- results.push_back (String (s.rewrite_by));
+ results.push_back (String (s.rewrite_by));
}
else
{
@@ -359,7 +359,7 @@
return -1;
}
-int IniSection::getAll (const StringArray&p, SectionAll&out, int depth)
+int IniSection::getAll (const std::vector<blocxx::String>&p, SectionAll&out, int depth)
{
if (depth < int(p.size ()))
{
@@ -415,7 +415,7 @@
return m;
}
-int IniSection::Delete (const StringArray&p)
+int IniSection::Delete (const std::vector<blocxx::String>&p)
{
if (ip->isFlat ())
return delValueFlat (p);
@@ -432,7 +432,7 @@
return -1;
}
-int IniSection::Write (const StringArray&p, const StringList&v, bool rewrite)
+int IniSection::Write (const std::vector<blocxx::String>&p, const StringList&v, bool rewrite)
{
if (ip->isFlat ())
return setValueFlat (p, v);
@@ -456,7 +456,7 @@
return -1;
}
-int IniSection::setSectionProp (const StringArray&p,const StringList&in, int what, int depth)
+int IniSection::setSectionProp (const std::vector<blocxx::String>&p,const StringList&in, int what, int depth)
{
String k = ip->changeCase (p[depth]);
// Find the matching sections.
@@ -563,7 +563,7 @@
isections.erase (sxi);
}
-int IniSection::delSection(const StringArray&p, int depth)
+int IniSection::delSection(const std::vector<blocxx::String>&p, int depth)
{
String k = ip->changeCase (p[depth]);
@@ -603,9 +603,9 @@
return 0;
}
-int IniSection::WriteAll (const StringArray&p, const SectionAll& in, int depth)
+int IniSection::WriteAll (const std::vector<blocxx::String>&p, const SectionAll& in, int depth)
{
- LIMAL_SLOG_INFO (logger, "This function has not been tested cause it is not needed at the moment.");
+ LIMAL_SLOG_INFO (logger, "This function has not been tested cause it is not needed at the moment.");
if (depth < int(p.size ()))
{
// recurse to find the starting section
@@ -649,7 +649,7 @@
container.clear (); // bye, old data
for (SectionList::iterator i = l.begin(); i != l.end(); ++i)
{
-
+
SectionAll mitem = *i;
kind = mitem.kind;
@@ -686,7 +686,7 @@
return ret;
}
-int IniSection::setMyValue (const StringArray &p, const StringList&in, int what, int depth)
+int IniSection::setMyValue (const std::vector<blocxx::String> &p, const StringList&in, int what, int depth)
{
// assert (depth == p.size ()); //not, it can have a .comment suffix
String k = ip->changeCase (p[depth]);
@@ -764,7 +764,7 @@
return 0;
}
-int IniSection::setValue (const StringArray&p,const StringList&in,int what, int depth)
+int IniSection::setValue (const std::vector<blocxx::String>&p,const StringList&in,int what, int depth)
{
String k = ip->changeCase (p[depth]);
// Find the matching sections.
@@ -829,7 +829,7 @@
}
}
-int IniSection::delValue (const StringArray&p, int depth)
+int IniSection::delValue (const std::vector<blocxx::String>&p, int depth)
{
String k = ip->changeCase (p[depth]);
// Find the matching sections.
@@ -877,7 +877,7 @@
return 0;
}
-int IniSection::dirValueFlat (const StringArray&p, StringList&l)
+int IniSection::dirValueFlat (const std::vector<blocxx::String>&p, StringList&l)
{
// This function used to discard p and always return Dir (.)
// #21574
@@ -892,7 +892,7 @@
return myDir (l, VALUE);
}
-int IniSection::getValueFlat (const StringArray&p, StringList&out)
+int IniSection::getValueFlat (const std::vector<blocxx::String>&p, StringList&out)
{
if (!p.size ())
return -1;
@@ -902,7 +902,7 @@
return getMyValue (p, out, want_comment, 0);
}
-int IniSection::delValueFlat (const StringArray&p)
+int IniSection::delValueFlat (const std::vector<blocxx::String>&p)
{
if (!p.size ())
return -1;
@@ -912,7 +912,7 @@
return 0;
}
-int IniSection::setValueFlat (const StringArray&p, const StringList &in)
+int IniSection::setValueFlat (const std::vector<blocxx::String>&p, const StringList &in)
{
if (!p.size ())
return -1;
@@ -922,7 +922,7 @@
return setMyValue (p, in, want_comment, 0);
}
-int IniSection::Read (const StringArray&p, StringList&out, bool rewrite)
+int IniSection::Read (const std::vector<blocxx::String>&p, StringList&out, bool rewrite)
{
if (ip->isFlat ())
return getValueFlat (p, out);
@@ -948,9 +948,9 @@
return -1;
}
-int IniSection::ReadAll (const StringArray&p, SectionAll&out)
+int IniSection::ReadAll (const std::vector<blocxx::String>&p, SectionAll&out)
{
- LIMAL_SLOG_INFO (logger, "This function has not been tested cause it is not needed at the moment.");
+ LIMAL_SLOG_INFO (logger, "This function has not been tested cause it is not needed at the moment.");
if (p.size() >= 1 && p[0] == "all")
{
return getAll (p, out, 1);
@@ -961,7 +961,7 @@
}
}
-int IniSection::Dir (const StringArray&p, StringList&l)
+int IniSection::Dir (const std::vector<blocxx::String>&p, StringList&l)
{
if (ip->isFlat ())
return dirValueFlat (p, l);
@@ -980,7 +980,7 @@
LIMAL_SLOG_ERROR (logger, "I do not know what to dir from "<< pathToString(p).c_str());
return -1;
}
-int IniSection::dirHelper (const StringArray&p, StringList&out,int get_sect,int depth)
+int IniSection::dirHelper (const std::vector<blocxx::String>&p, StringList&out,int get_sect,int depth)
{
if (depth >= int(p.size()))
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h Sat Jun 12 14:33:19 2010
@@ -24,7 +24,7 @@
#include <map>
#define INIPARSER "IniParser"
-
+
namespace LIMAL_NAMESPACE
{
namespace INI
@@ -41,8 +41,8 @@
{
blocxx::String kind; //section,value
blocxx::String name;
- blocxx::String type; // section_type
- blocxx::String file; // "rewrite", section_file
+ blocxx::String type; // section_type
+ blocxx::String file; // "rewrite", section_file
blocxx::String comment;
blocxx::String value; // if kind == value
SectionList sectionList;
@@ -226,7 +226,7 @@
class IniSection : public IniBase
{
private:
-
+
// huh??? allow_values, allow_sections and allow_subsub
// were never actuially used
@@ -277,7 +277,7 @@
* @param depth path index
* @return 0 in case of success
*/
- int getMyValue (const blocxx::StringArray &p,
+ int getMyValue (const std::vector<blocxx::String> &p,
StringList &out, int what, int depth);
/**
* Get a value on a path
@@ -289,7 +289,7 @@
* path[depth] in current "scope"
* @return 0 in case of success
*/
- int getValue (const blocxx::StringArray&p,
+ int getValue (const std::vector<blocxx::String>&p,
StringList&out,int what, int depth = 0);
/**
* Get section property -- comment or read-by
@@ -301,7 +301,7 @@
* path[depth] in current "scope"
* @return 0 in case of success
*/
- int getSectionProp (const blocxx::StringArray&p,
+ int getSectionProp (const std::vector<blocxx::String>&p,
StringList&out,int what, int depth = 0);
/**
* Get a complete subtree
@@ -312,7 +312,7 @@
* path[depth] in current "scope"
* @return 0 in case of success
*/
- int getAll (const blocxx::StringArray&p,
+ int getAll (const std::vector<blocxx::String>&p,
SectionAll&out, int depth);
/**
* Gets data for this section and all its values and subsections
@@ -336,19 +336,19 @@
* @param depth see getSectionProp
* @return 0 in case of success
*/
- int dirHelper (const blocxx::StringArray&p,
+ int dirHelper (const std::vector<blocxx::String>&p,
StringList&out,int sections,int depth = 0);
/**
* Set a value (or list of them if repeat_names) in this section
* It would be enough to pass only k instead of p and depth,
* but then the error messages would not know the whole path
* @param p path
- * @param in value to set
+ * @param in value to set
* @param what 0 -- value, 1 -- comment, other -- read-by.
* @param depth path index
* @return 0
*/
- int setMyValue (const blocxx::StringArray &p,
+ int setMyValue (const std::vector<blocxx::String> &p,
const StringList&in, int what, int depth);
/**
* Set value on path. Creates recursively all non-existing subsections.
@@ -358,7 +358,7 @@
* @param depth see getSectionProp
* @return 0
*/
- int setValue (const blocxx::StringArray&p,
+ int setValue (const std::vector<blocxx::String>&p,
const StringList&in,int what, int depth = 0);
/**
* Set section comment or read-by. Creates recursively all non-existing subsections.
@@ -368,7 +368,7 @@
* @param depth see getSectionProp
* @return 0
*/
- int setSectionProp (const blocxx::StringArray&p,
+ int setSectionProp (const std::vector<blocxx::String>&p,
const StringList&in, int what, int depth);
/**
@@ -383,7 +383,7 @@
* @param depth see getSectionProp
* @return 0 in case of success
*/
- int delValue (const blocxx::StringArray&p,
+ int delValue (const std::vector<blocxx::String>&p,
int depth);
/**
* Delete section on path. Deletes also all its subsections.
@@ -391,7 +391,7 @@
* @param depth see getSectionProp
* @return 0 in case of success
*/
- int delSection (const blocxx::StringArray&p,
+ int delSection (const std::vector<blocxx::String>&p,
int depth);
/**
@@ -414,7 +414,7 @@
* @param out output
* @return 0 in case of success
*/
- int getValueFlat (const blocxx::StringArray&p,
+ int getValueFlat (const std::vector<blocxx::String>&p,
StringList&out);
/**
* Set value in flat mode.
@@ -422,16 +422,16 @@
* @param out input
* @return 0 in case of success
*/
- int setValueFlat (const blocxx::StringArray&p,
+ int setValueFlat (const std::vector<blocxx::String>&p,
const StringList& in);
/**
* Delete value in flat mode
*/
- int delValueFlat (const blocxx::StringArray&p);
+ int delValueFlat (const std::vector<blocxx::String>&p);
/**
* Get list of values in flat mode.
*/
- int dirValueFlat (const blocxx::StringArray&p, StringList&l);
+ int dirValueFlat (const std::vector<blocxx::String>&p, StringList&l);
// IniSection ();
public:
/** explicit uninitialized constructor */
@@ -463,7 +463,7 @@
if (&s == this)
{
return;
- }
+ }
IniBase::operator = (s);
ip = s.ip;
end_comment = s.end_comment; rewrite_by = s.rewrite_by;
@@ -474,8 +474,8 @@
virtual ~IniSection () {}
- /**
- * this is a constructor for newly added sections --> sets dirty
+ /**
+ * this is a constructor for newly added sections --> sets dirty
* @param ip parser to take options from
* @param n name of section
*/
@@ -521,7 +521,7 @@
*/
int getSubSectionRewriteBy (const char*name);
- /**
+ /**
* If there is no comment at the beginning and no values and no
* sections, it is better to set is as comment at the beginning.
* Sets also dirty flag.
@@ -542,7 +542,7 @@
* @param from recursion depth
* @return Found ini section iterator
*/
- IniSection& findSection(const blocxx::StringArray&path, int from = 0);
+ IniSection& findSection(const std::vector<blocxx::String>&path, int from = 0);
/**
* If currently parsed end-section-tag hasn't matched currently
* processed section by name, we need to find the best possible match
@@ -556,7 +556,7 @@
* @param from let unset, current path index
* @return index to path
*/
- int findEndFromUp(const blocxx::StringArray&path,
+ int findEndFromUp(const std::vector<blocxx::String>&path,
int wanted, int found = -1, int from = 0);
/**
@@ -568,20 +568,20 @@
* Generic interface to SCR::Read
* @param rewrite a #19066 hack - if rewriting is active, .st accesses rewrite_by
*/
- int Read (const blocxx::StringArray&p, StringList&out, bool rewrite);
+ int Read (const std::vector<blocxx::String>&p, StringList&out, bool rewrite);
/**
* Get all properties and values of a section.
*/
- int ReadAll (const blocxx::StringArray&p, SectionAll&out);
+ int ReadAll (const std::vector<blocxx::String>&p, SectionAll&out);
/**
* Generic interface to SCR::Dir
*/
- int Dir (const blocxx::StringArray&p, StringList&out);
+ int Dir (const std::vector<blocxx::String>&p, StringList&out);
/**
* Generic interface to SCR::Write
* @param rewrite a #19066 hack - if rewriting is active, .st accesses rewrite_by
*/
- int Write (const blocxx::StringArray&p, const StringList&v, bool rewrite);
+ int Write (const std::vector<blocxx::String>&p, const StringList&v, bool rewrite);
/**
* Set all properties and values for a section.
* No recursive creation of the specified path.
@@ -590,14 +590,14 @@
* @param depth see getSectionProp
* @return 0 in case of success
*/
- int WriteAll (const blocxx::StringArray&p,
- const SectionAll& in, int depth);
+ int WriteAll (const std::vector<blocxx::String>&p,
+ const SectionAll& in, int depth);
/**
* Generic delete for values, sections.
* @param p path to delete
* @return 0: success
*/
- int Delete (const blocxx::StringArray&p);
+ int Delete (const std::vector<blocxx::String>&p);
// used by IniParser::write
IniIterator getContainerBegin ();
@@ -620,7 +620,7 @@
};
/**
- * A single container
+ * A single container
*/
class IniContainerElement
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.cpp Sat Jun 12 14:33:19 2010
@@ -70,7 +70,7 @@
/**
* Debugging.
*/
-void printPath(const StringArray&p, const char*c = "")
+void printPath(const std::vector<blocxx::String>&p, const char*c = "")
{
int i = 0;
int len = p.size();
@@ -93,7 +93,7 @@
-void IniParser::initFiles (const StringArray&f)
+void IniParser::initFiles (const std::vector<blocxx::String>&f)
{
multiple_files = true;
files.clear ();
@@ -107,13 +107,13 @@
file = fn;
multiple_files = false;
}
-void IniParser::initOptions (const StringArray&options)
+void IniParser::initOptions (const std::vector<blocxx::String>&options)
{
int len = options.size();
for (int i = 0;i<len;i++)
{
String sv = options[i];
-#define COMPARE_OPTION(X) if (sv == #X) X = true; else
+#define COMPARE_OPTION(X) if (sv == #X) X = true; else
COMPARE_OPTION (ignore_case_regexps)
COMPARE_OPTION (ignore_case)
COMPARE_OPTION (prefer_uppercase)
@@ -138,12 +138,12 @@
}
}
-void IniParser::initRewrite (const Array<IoPatternDescr>&rewriteArray)
+void IniParser::initRewrite (const std::vector<IoPatternDescr>&rewriteArray)
{
int len = rewrites.size();
rewrites.clear ();
rewrites.reserve (len);
-
+
for (int i = 0; i<len;i++)
{
IoPatternDescr val = rewriteArray[i];
@@ -162,7 +162,7 @@
subindent = String(ident);
}
-void IniParser::initComments (const StringArray&comm)
+void IniParser::initComments (const std::vector<blocxx::String>&comm)
{
int len = comm.size();
linecomments.clear ();
@@ -172,7 +172,7 @@
for (int i = 0; i < len; i++)
{
String s = comm[i];
- Array <PosixRegEx> & regexes = ('^' == s[0]) ?
+ std::vector<PosixRegEx> & regexes = ('^' == s[0]) ?
linecomments : comments;
PosixRegEx r;
if (r.compile (s, REG_EXTENDED | (ignore_case ? REG_ICASE : 0)))
@@ -182,7 +182,7 @@
}
}
-void IniParser::initSection (const Array<SectionDescr>& sect)
+void IniParser::initSection (const std::vector<SectionDescr>& sect)
{
int len = sect.size();
// compile them to regex_t
@@ -214,7 +214,7 @@
}
-void IniParser::initParam (const Array<EntryDescr>& entries)
+void IniParser::initParam (const std::vector<EntryDescr>& entries)
{
int len = entries.size();
// compile them to regex_t
@@ -235,7 +235,7 @@
{
LIMAL_SLOG_ERROR (logger,"Bad regexp(multiline): "<<
entry.multiEnd.c_str());
- pa.multiline_valid = false;
+ pa.multiline_valid = false;
}
}
else
@@ -244,7 +244,7 @@
entry.multiBegin.c_str());
}
}
-
+
if (!pa.line.rx.compile ( String (entry.line.regExpr),
REG_EXTENDED | (ignore_case ? REG_ICASE : 0)))
{
@@ -439,7 +439,7 @@
size_t i;
// stack of section names
- StringArray path;
+ std::vector<blocxx::String> path;
//
// read line
@@ -486,7 +486,7 @@
{
RegexMatch m (params[matched_by].end, line);
if (m)
- {
+ {
// it is the end of broken line
state = 0;
val = val + (join_multiline ? "" : "\n") + m[1];
@@ -650,7 +650,7 @@
val = m[2];
line = m.rest;
break;
- }
+ }
}
if (i != params.size ())
{
@@ -760,7 +760,7 @@
{
if (timestamp != getTimeStamp())
{
- LIMAL_SLOG_ERROR (logger, "Data file '" << file.c_str() << "' was changed externaly!");
+ LIMAL_SLOG_ERROR (logger, "Data file '" << file.c_str() << "' was changed externaly!");
parse ();
}
}
@@ -815,7 +815,7 @@
if (ci->t () == SECTION)
{
IniSection&s = ci->s ();
- int wb = s.getRewriteBy (); // bug #19066
+ int wb = s.getRewriteBy (); // bug #19066
String filename = getFileName (s.getName (), wb);
if (!s.isDirty ()) {
@@ -882,7 +882,7 @@
snprintf (out_buffer, 2048, sections[readby].begin.out.c_str (), ini.getName());
of << indent << out_buffer << "\n";
}
-
+
IniIterator
ci = ini.getContainerBegin (),
ce = ini.getContainerEnd ();
@@ -947,7 +947,7 @@
}
else
{
- tmp.toLowerCase();
+ tmp.toLowerCase();
if (first_upper
&& tmp.length() > 0)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.h Sat Jun 12 14:33:19 2010
@@ -40,7 +40,7 @@
{
public:
/** Matched subexpressions (0 - the whole regex) */
- blocxx::StringArray matches;
+ std::vector<blocxx::String> matches;
/** The unmatched part of the String */
blocxx::String rest;
@@ -73,7 +73,7 @@
rm_matches[i].rm_eo - rm_matches[i].rm_so));
}
}
-
+
};
/**
@@ -187,23 +187,23 @@
/**
* Regular expression for comments over whole line.
*/
- blocxx::Array<blocxx::PosixRegEx> linecomments;
+ std::vector<blocxx::PosixRegEx> linecomments;
/**
* Regular expressions for comments over part of the line.
*/
- blocxx::Array<blocxx::PosixRegEx> comments;
+ std::vector<blocxx::PosixRegEx> comments;
/**
* Regular expressions for sections.
*/
- blocxx::Array<section> sections;
+ std::vector<section> sections;
/**
* Regular expressions for parameters (keys/values).
*/
- blocxx::Array<param> params;
+ std::vector<param> params;
/**
* Regular expressions for rewrite rules.
*/
- blocxx::Array<IoPattern> rewrites;
+ std::vector<IoPattern> rewrites;
/**
* opened file for scanner
@@ -231,7 +231,7 @@
/**
* Array of globe-expressions.
*/
- blocxx::StringArray files;
+ std::vector<blocxx::String> files;
/**
* Open ini file.
@@ -287,32 +287,32 @@
* Sets parser to multiple file mode and sets the glob-expressions.
* @param f list of glob-expressions
*/
- void initFiles (const blocxx::StringArray&f);
+ void initFiles (const std::vector<blocxx::String>&f);
/**
* Sets flags and regular expressions.
*/
- void initOptions (const blocxx::StringArray&options);
+ void initOptions (const std::vector<blocxx::String>&options);
/**
* Sets flags and regular expressions.
- */
- void initRewrite (const blocxx::Array<IoPatternDescr>&rewriteArray);
+ */
+ void initRewrite (const std::vector<IoPatternDescr>&rewriteArray);
/**
* Sets flags and regular expressions.
- */
+ */
void initSubident (const blocxx::String ident);
/**
* Sets flags and regular expressions.
- */
- void initComments (const blocxx::StringArray&comm);
+ */
+ void initComments (const std::vector<blocxx::String>&comm);
/**
* Sets flags and regular expressions.
- */
- void initSection (const blocxx::Array<SectionDescr>& sect);
+ */
+ void initSection (const std::vector<SectionDescr>& sect);
/**
* Sets flags and regular expressions.
- */
- void initParam (const blocxx::Array<EntryDescr>& entries);
-
+ */
+ void initParam (const std::vector<EntryDescr>& entries);
+
bool isStarted() { return started; }
void reset() {
ignore_case_regexps = ignore_case = prefer_uppercase = first_upper
Modified: limal-branches/mc-devel/limal-ca-mgm/src/IssuerAlternativeNameExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/IssuerAlternativeNameExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/IssuerAlternativeNameExtension.cpp Sat Jun 12 14:33:19 2010
@@ -75,7 +75,7 @@
: ExtensionBase()
, m_impl(new IssuerAlternativeNameExtImpl(copyIssuer, alternativeNameList))
{
- StringArray r = checkLiteralValueList(alternativeNameList);
+ std::vector<blocxx::String> r = checkLiteralValueList(alternativeNameList);
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -99,11 +99,11 @@
bool p = caConfig->exists(type2Section(type, true), "issuerAltName");
if(p)
{
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "issuerAltName"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "issuerAltName")));
if(sp[0].equalsIgnoreCase("critical")) setCritical(true);
- StringArray::const_iterator it = sp.begin();
+ std::vector<blocxx::String>::const_iterator it = sp.begin();
for(; it != sp.end(); ++it)
{
if((*it).indexOf(":") != String::npos)
@@ -169,7 +169,7 @@
void
IssuerAlternativeNameExt::setAlternativeNameList(const std::list<LiteralValue> &alternativeNameList)
{
- StringArray r = checkLiteralValueList(alternativeNameList);
+ std::vector<blocxx::String> r = checkLiteralValueList(alternativeNameList);
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -264,7 +264,7 @@
LOGIT_DEBUG("return IssuerAlternativeNameExt::valid() is false");
return false;
}
- StringArray r = checkLiteralValueList(m_impl->altNameList);
+ std::vector<blocxx::String> r = checkLiteralValueList(m_impl->altNameList);
if(!r.empty())
{
LOGIT_DEBUG(r[0]);
@@ -274,39 +274,39 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
IssuerAlternativeNameExt::verify() const
{
- blocxx::StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(!m_impl->issuerCopy && m_impl->altNameList.empty())
{
- result.append(String("invalid value for IssuerAlternativeNameExt"));
+ result.push_back(String("invalid value for IssuerAlternativeNameExt"));
}
- result.appendArray(checkLiteralValueList(m_impl->altNameList));
+ appendArray(result, checkLiteralValueList(m_impl->altNameList));
LOGIT_DEBUG_STRINGARRAY("IssuerAlternativeNameExt::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
IssuerAlternativeNameExt::dump() const
{
- StringArray result;
- result.append("IssuerAlternativeNameExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("IssuerAlternativeNameExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("Issuer:copy = " + Bool(m_impl->issuerCopy).toString());
+ result.push_back("Issuer:copy = " + Bool(m_impl->issuerCopy).toString());
std::list< LiteralValue >::const_iterator it = m_impl->altNameList.begin();
for(; it != m_impl->altNameList.end(); ++it)
{
- result.appendArray((*it).dump());
+ appendArray(result, (*it).dump());
}
return result;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/LDAPUrlImpl.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/LDAPUrlImpl.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/LDAPUrlImpl.cpp Sat Jun 12 14:33:19 2010
@@ -53,10 +53,10 @@
}
// -------------------------------------------------------------------
-StringArray
+std::vector<blocxx::String>
LDAPUrlImpl::getKnownSchemes() const
{
- StringArray schemes(2);
+ std::vector<blocxx::String> schemes(2);
schemes[0] = "ldap";
schemes[1] = "ldaps";
return schemes;
@@ -90,7 +90,7 @@
"attrs", "scope", "filter", "exts", NULL
};
ca_mgm::url::ParamMap pmap;
- StringArray parr( getQueryStringArray());
+ std::vector<blocxx::String> parr( getQueryStringArray());
if( parr.size() <= 4)
{
for(size_t i=0; i<parr.size(); i++)
@@ -129,7 +129,7 @@
join_safe.concat(safe[i]);
}
- blocxx::StringArray parr(4);
+ std::vector<blocxx::String> parr(4);
ca_mgm::url::ParamMap::const_iterator p;
for(p=pmap.begin(); p!=pmap.end(); ++p)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/LDAPUrlImpl.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/LDAPUrlImpl.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/LDAPUrlImpl.hpp Sat Jun 12 14:33:19 2010
@@ -40,7 +40,7 @@
virtual UrlBase *
clone() const;
- virtual StringArray
+ virtual std::vector<blocxx::String>
getKnownSchemes() const;
virtual void
Modified: limal-branches/mc-devel/limal-ca-mgm/src/LiteralValues.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/LiteralValues.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/LiteralValues.cpp Sat Jun 12 14:33:19 2010
@@ -73,7 +73,7 @@
LiteralValue::LiteralValue(const String &type, const String &value)
: m_impl(new LiteralValueImpl(type, value))
{
- StringArray r = this->verify();
+ std::vector<blocxx::String> r = this->verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -84,7 +84,7 @@
LiteralValue::LiteralValue(const String& value)
: m_impl(new LiteralValueImpl())
{
- StringArray sp = PerlRegEx("^([\\w\\d.]+):(.*)$").capture(value);
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("^([\\w\\d.]+):(.*)$").capture(value));
if(sp[1].equalsIgnoreCase("email"))
{
@@ -157,7 +157,7 @@
m_impl->literalType = type;
m_impl->literalValue = value;
- StringArray r = this->verify();
+ std::vector<blocxx::String> r = this->verify();
if(!r.empty())
{
m_impl->literalType = dType;
@@ -175,7 +175,7 @@
m_impl->literalValue = value;
- StringArray r = this->verify();
+ std::vector<blocxx::String> r = this->verify();
if(!r.empty())
{
m_impl->literalValue = dValue;
@@ -250,7 +250,7 @@
String instance;
String realm = "";
- StringArray sa = getValue().tokenize("@/");
+ std::vector<blocxx::String> sa = convStringArray(getValue().tokenize("@/"));
String sectname1 = getValue()+String(num);
if(sa.size() == 2) // primary@REALM
@@ -375,10 +375,10 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
LiteralValue::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(m_impl->literalType == "email")
{
@@ -386,7 +386,7 @@
if(!check.isValid(m_impl->literalValue))
{
LOGIT_DEBUG("Wrong LiteralValue for type 'email': " << m_impl->literalValue);
- result.append(Format("Wrong LiteralValue for type 'email': %1",
+ result.push_back(Format("Wrong LiteralValue for type 'email': %1",
m_impl->literalValue).toString());
}
}
@@ -396,7 +396,7 @@
if(!check.isValid(m_impl->literalValue))
{
LOGIT_DEBUG("Wrong LiteralValue for type 'URI': " << m_impl->literalValue);
- result.append(Format("Wrong LiteralValue for type 'URI': %1",
+ result.push_back(Format("Wrong LiteralValue for type 'URI': %1",
m_impl->literalValue).toString());
}
}
@@ -406,7 +406,7 @@
if(!check.isValid(m_impl->literalValue))
{
LOGIT_DEBUG("Wrong LiteralValue for type 'DNS': " << m_impl->literalValue);
- result.append(Format("Wrong LiteralValue for type 'DNS': %1",
+ result.push_back(Format("Wrong LiteralValue for type 'DNS': %1",
m_impl->literalValue).toString());
}
}
@@ -416,7 +416,7 @@
if(!check.isValid(m_impl->literalValue))
{
LOGIT_DEBUG("Wrong LiteralValue for type 'RID': " << m_impl->literalValue);
- result.append(Format("Wrong LiteralValue for type 'RID': %1",
+ result.push_back(Format("Wrong LiteralValue for type 'RID': %1",
m_impl->literalValue).toString());
}
}
@@ -430,7 +430,7 @@
if(!check.isValid(m_impl->literalValue))
{
LOGIT_DEBUG("Wrong LiteralValue for type 'IP': " << m_impl->literalValue);
- result.append(Format("Wrong LiteralValue for type 'IP': %1",
+ result.push_back(Format("Wrong LiteralValue for type 'IP': %1",
m_impl->literalValue).toString());
}
}
@@ -441,7 +441,7 @@
if(!check.isValid(m_impl->literalValue))
{
LOGIT_DEBUG("Wrong LiteralValue for type '1.3.6.1.4.1.311.20.2.3': " << m_impl->literalValue);
- result.append(Format("Wrong LiteralValue for type '1.3.6.1.4.1.311.20.2.3': %1",
+ result.push_back(Format("Wrong LiteralValue for type '1.3.6.1.4.1.311.20.2.3': %1",
m_impl->literalValue).toString());
}
}
@@ -451,7 +451,7 @@
if(!check.isValid(m_impl->literalValue))
{
LOGIT_DEBUG("Wrong LiteralValue for type '1.3.6.1.5.2.2': " << m_impl->literalValue);
- result.append(Format("Wrong LiteralValue for type '1.3.6.1.5.2.2': %1",
+ result.push_back(Format("Wrong LiteralValue for type '1.3.6.1.5.2.2': %1",
m_impl->literalValue).toString());
}
}
@@ -464,7 +464,7 @@
else
{
LOGIT_DEBUG("Unknown Type in LiteralValue: " << m_impl->literalType);
- result.append(Format("Unknown Type in LiteralValue: %1",
+ result.push_back(Format("Unknown Type in LiteralValue: %1",
m_impl->literalType).toString());
}
return result;
@@ -476,13 +476,13 @@
return (m_impl->literalType + ":" + m_impl->literalValue);
}
-blocxx::StringArray
+std::vector<blocxx::String>
LiteralValue::dump() const
{
- StringArray result;
- result.append("LiteralValue::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("LiteralValue::dump()");
- result.append(m_impl->literalType + ":" + m_impl->literalValue);
+ result.push_back(m_impl->literalType + ":" + m_impl->literalValue);
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/LocalManagement.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/LocalManagement.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/LocalManagement.cpp Sat Jun 12 14:33:19 2010
@@ -76,7 +76,7 @@
String data(out.data(), out.size());
- Array< std::map<String, String> > list;
+ std::vector< std::map<String, String> > list;
String info;
String cert;
@@ -84,7 +84,7 @@
String issuer;
String keyID;
- StringArray dataList = PerlRegEx("\n").split(data);
+ std::vector<blocxx::String> dataList = convStringArray(PerlRegEx("\n").split(data));
if(dataList.size() <= 1) {
@@ -100,7 +100,7 @@
PerlRegEx subjectRegex("^subject=(.*)\\s*$");
PerlRegEx issuerRegex("^issuer=(.*)\\s*$");
- StringArray::const_iterator lineIT = dataList.begin() + 1;
+ std::vector<blocxx::String>::const_iterator lineIT = dataList.begin() + 1;
for(; lineIT != dataList.end(); ++lineIT) {
@@ -110,7 +110,7 @@
if(endRegex.match(*lineIT)) {
- StringArray ia = endRegex.capture(*lineIT);
+ std::vector<blocxx::String> ia = convStringArray(endRegex.capture(*lineIT));
if(ia.size() == 2 && ia[1] == info) {
std::map<String, String> v;
@@ -140,7 +140,7 @@
if(beginRegex.match(*lineIT)) {
- StringArray ia = beginRegex.capture(*lineIT);
+ std::vector<blocxx::String> ia = convStringArray(beginRegex.capture(*lineIT));
if(ia.size() == 2 ) {
info = ia[1];
@@ -154,7 +154,7 @@
if(keyIDRegex.match(*lineIT)) {
- StringArray ia = keyIDRegex.capture(*lineIT);
+ std::vector<blocxx::String> ia = convStringArray(keyIDRegex.capture(*lineIT));
if(ia.size() == 2 ) {
keyID = ia[1];
@@ -165,7 +165,7 @@
}
} else if(subjectRegex.match(*lineIT)) {
- StringArray ia = subjectRegex.capture(*lineIT);
+ std::vector<blocxx::String> ia = convStringArray(subjectRegex.capture(*lineIT));
if(ia.size() == 2 ) {
subject = ia[1];
@@ -176,7 +176,7 @@
}
} else if(issuerRegex.match(*lineIT)) {
- StringArray ia = issuerRegex.capture(*lineIT);
+ std::vector<blocxx::String> ia = convStringArray(issuerRegex.capture(*lineIT));
if(ia.size() == 2 ) {
issuer = ia[1];
@@ -199,11 +199,11 @@
String serverCert;
String serverKey;
String srvIssuerCert;
- Array<String> restCA;
+ std::vector<String> restCA;
// search for the server certificate
- Array< std::map<String, String> >::iterator certMap = list.begin();
+ std::vector< std::map<String, String> >::iterator certMap = list.begin();
for(; certMap != list.end(); ++certMap) {
Modified: limal-branches/mc-devel/limal-ca-mgm/src/Logger.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/Logger.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/Logger.cpp Sat Jun 12 14:33:19 2010
@@ -213,7 +213,7 @@
CerrAppender::STR_DEFAULT_MESSAGE_PATTERN);
LogAppenderRef appRef(new CerrAppender(
- components, categories, mformat
+ components,categories, mformat
));
#if BLOCXX_LIBRARY_VERSION >= 5
@@ -246,7 +246,9 @@
identity);
LogAppenderRef appRef(new SyslogAppender(
- components, categories, mformat, log_tag, facility
+ components,
+ categories,
+ mformat, log_tag, facility
));
#if BLOCXX_LIBRARY_VERSION >= 5
@@ -275,7 +277,9 @@
NullAppender::STR_DEFAULT_MESSAGE_PATTERN);
LogAppenderRef appRef(new NullAppender(
- components, categories, mformat
+ components,
+ categories,
+ mformat
));
#if BLOCXX_LIBRARY_VERSION >= 5
@@ -328,7 +332,9 @@
}
LogAppenderRef appRef(new FileAppender(
- components, categories, filename.c_str(),
+ components,
+ categories,
+ filename.c_str(),
mformat, maxLogFileSize, maxBackupIndex
));
Modified: limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp Sat Jun 12 14:33:19 2010
@@ -104,7 +104,7 @@
debugCmd += String(bits);
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -135,7 +135,7 @@
LOGIT_ERROR("openssl stderr:" << errOutput);
LOGIT_DEBUG("openssl stdout:" << stdOutput);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
BLOCXX_THROW(ca_mgm::RuntimeException,
Format(__("openssl command failed: %1"), msg).c_str());
@@ -197,7 +197,7 @@
debugCmd += "-passin env:pass ";
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -243,7 +243,7 @@
LOGIT_ERROR("openssl stderr:" << errOutput);
LOGIT_DEBUG("openssl stdout:" << stdOutput);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
BLOCXX_THROW(ca_mgm::RuntimeException,
Format(__("openssl command failed: %1"), msg).c_str());
@@ -310,7 +310,7 @@
debugCmd += "-key " + keyFile + " ";
debugCmd += "-out " + outFile + " ";
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -341,7 +341,7 @@
LOGIT_ERROR("openssl stderr:" << errOutput);
LOGIT_DEBUG("openssl stdout:" << stdOutput);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
BLOCXX_THROW(ca_mgm::RuntimeException,
Format(__("openssl command failed: %1"), msg).c_str());
@@ -433,7 +433,7 @@
debugCmd += "-outdir " + outDir + " ";
}
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
//LOGIT_DEBUG("PASSWORD: " << caPassword);
@@ -465,7 +465,7 @@
LOGIT_ERROR("openssl stderr:" << errOutput);
LOGIT_DEBUG("openssl stdout:" << stdOutput);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
BLOCXX_THROW(ca_mgm::RuntimeException,
Format(__("openssl command failed: %1"), msg).c_str());
@@ -572,7 +572,7 @@
}
}
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -603,7 +603,7 @@
LOGIT_ERROR("openssl stderr:" << errOutput);
LOGIT_DEBUG("openssl stdout:" << stdOutput);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
BLOCXX_THROW(ca_mgm::RuntimeException,
Format(__("openssl command failed: %1"), msg).c_str());
@@ -672,7 +672,7 @@
debugCmd += "-nouniqueDN ";
}
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -703,7 +703,7 @@
LOGIT_ERROR("openssl stderr:" << errOutput);
LOGIT_DEBUG("openssl stdout:" << stdOutput);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
BLOCXX_THROW(ca_mgm::RuntimeException,
Format(__("openssl command failed: %1"), msg).c_str());
@@ -754,7 +754,7 @@
debugCmd += "-passin env:pass ";
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -788,7 +788,7 @@
LOGIT_ERROR("openssl stderr:" << errOutput);
LOGIT_DEBUG("openssl stdout:" << stdOutput);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
BLOCXX_THROW(ca_mgm::RuntimeException,
Format(__("openssl command failed: %1"), msg).c_str());
@@ -845,7 +845,7 @@
debugCmd += certFile;
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -869,8 +869,8 @@
__("Executing openssl command failed."), e);
}
- StringArray lines = PerlRegEx("\n").split(stdOutput);
- StringArray::const_iterator line;
+ std::vector<blocxx::String> lines = convStringArray(PerlRegEx("\n").split(stdOutput));
+ std::vector<blocxx::String>::const_iterator line;
String result;
String errMsg;
@@ -880,7 +880,7 @@
for(line = lines.begin(); line != lines.end(); ++line)
{
- StringArray sa = ok.capture(*line);
+ std::vector<blocxx::String> sa = convStringArray(ok.capture(*line));
if(sa.size() == 2 && sa[1] == "OK")
{
@@ -888,7 +888,7 @@
break;
}
- sa = error.capture(*line);
+ sa = convStringArray(error.capture(*line));
if(sa.size() == 3)
{
@@ -926,7 +926,7 @@
debugCmd += "-status " + serial;
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -950,8 +950,8 @@
__("Executing openssl command failed."), e);
}
- StringArray lines = PerlRegEx("\n").split(errOutput);
- StringArray::const_iterator line;
+ std::vector<blocxx::String> lines = convStringArray(PerlRegEx("\n").split(errOutput));
+ std::vector<blocxx::String>::const_iterator line;
String errMsg;
@@ -959,7 +959,7 @@
for(line = lines.begin(); line != lines.end(); ++line)
{
- StringArray sa = serialMatch.capture(*line);
+ std::vector<blocxx::String> sa = convStringArray(serialMatch.capture(*line));
if(sa.size() == 2)
{
@@ -996,7 +996,7 @@
else
{
PerlRegEx r("^[[:xdigit:]]+:([[:xdigit:]]+[\\d-]*)$");
- StringArray sa = r.capture(certificateName);
+ std::vector<blocxx::String> sa = convStringArray(r.capture(certificateName));
if(sa.size() != 2)
{
@@ -1023,7 +1023,7 @@
debugCmd += keyFile + " ";
debugCmd += "-passin env:PASSWORD ";
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -1110,10 +1110,10 @@
break;
}
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
-
+
blocxx::String randfile(::tempnam("/tmp/", ".rand-"));
blocxx::EnvVars env;
env.addVar("PATH", "/usr/bin/");
@@ -1157,7 +1157,7 @@
path::removeFile(outFileName);
path::removeFile(randfile);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
BLOCXX_THROW(ca_mgm::RuntimeException,
Format(__("openssl command failed: %1"), msg).c_str());
@@ -1237,7 +1237,7 @@
isOutPassSet = true;
}
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -1303,7 +1303,7 @@
path::removeFile(outFileName);
path::removeFile(randfile);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
if(PerlRegEx("unable to load Private Key", PCRE_CASELESS).match(msg))
{
@@ -1371,7 +1371,7 @@
break;
}
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -1418,7 +1418,7 @@
path::removeFile(outFileName);
path::removeFile(randfile);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
BLOCXX_THROW(ca_mgm::RuntimeException,
Format(__("openssl command failed: %1"), msg).c_str());
@@ -1478,7 +1478,7 @@
break;
}
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -1525,7 +1525,7 @@
path::removeFile(outFileName);
path::removeFile(randfile);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
BLOCXX_THROW(ca_mgm::RuntimeException,
Format(__("openssl command failed: %1"), msg).c_str());
@@ -1618,7 +1618,7 @@
debugCmd += inFileName3 + " ";
}
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -1686,7 +1686,7 @@
path::removeFile(outFileName);
path::removeFile(randfile);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
if(PerlRegEx("unable to load Private Key", PCRE_CASELESS).match(msg))
{
@@ -1765,7 +1765,7 @@
debugCmd += "-nodes ";
}
- StringArray cmd = PerlRegEx("\\s").split(debugCmd);
+ std::vector<blocxx::String> cmd = convStringArray(PerlRegEx("\\s").split(debugCmd));
LOGIT_DEBUG("Command: " << debugCmd);
@@ -1831,7 +1831,7 @@
path::removeFile(outFileName);
path::removeFile(randfile);
- StringArray sa = errOutput.tokenize("\n\r");
+ std::vector<blocxx::String> sa = convStringArray(errOutput.tokenize("\n\r"));
String msg = (sa.empty()? "" : sa[0]);
if(PerlRegEx("invalid password", PCRE_CASELESS).match(msg))
{
@@ -1854,11 +1854,11 @@
return out;
}
-blocxx::Array<blocxx::String>
+std::vector<blocxx::String>
OpenSSLUtils::listCA(const String &repository)
{
std::list<String> tmpList;
- Array<String> retList;
+ std::vector<String> retList;
int r = path::readDir(tmpList, repository, false);
@@ -1907,7 +1907,7 @@
String s(b.data(), b.size());
PerlRegEx r("^([[:xdigit:]]+)$");
- StringArray sa = r.capture(s);
+ std::vector<blocxx::String> sa = convStringArray(r.capture(s));
if(sa.size() == 2)
{
@@ -1928,8 +1928,8 @@
const String &dnString,
const String &repository)
{
- Array<Array<String> > db = OpenSSLUtils::parseCAMDB(caName, repository);
- Array<Array<String> >::const_iterator it;
+ std::vector<std::vector<String> > db = OpenSSLUtils::parseCAMDB(caName, repository);
+ std::vector<std::vector<String> >::const_iterator it;
for(it = db.begin(); it != db.end(); ++it)
{
@@ -1960,9 +1960,9 @@
String cam(b.data(), b.size());
- StringArray lines = PerlRegEx("\n").split(cam);
+ std::vector<blocxx::String> lines = convStringArray(PerlRegEx("\n").split(cam));
- StringArray::const_iterator line;
+ std::vector<blocxx::String>::const_iterator line;
String camNew;
for(line = lines.begin(); line != lines.end(); ++line)
@@ -1979,25 +1979,25 @@
}
-blocxx::Array<blocxx::Array<blocxx::String> >
+std::vector<std::vector<blocxx::String> >
OpenSSLUtils::parseCAMDB(const String &caName,
const String &repository)
{
- Array<Array<String> > ret;
+ std::vector<std::vector<String> > ret;
ByteBuffer b = LocalManagement::readFile(repository + "/" + caName + "/cam.txt");
String cam(b.data(), b.size());
- StringArray lines = PerlRegEx("\n").split(cam);
+ std::vector<blocxx::String> lines = convStringArray(PerlRegEx("\n").split(cam));
- StringArray::const_iterator line;
+ std::vector<blocxx::String>::const_iterator line;
for(line = lines.begin(); line != lines.end(); ++line)
{
PerlRegEx r("^([[:xdigit:]]+[\\d-]*)\\s(.*)$");
- StringArray col = r.capture(*line);
+ std::vector<blocxx::String> col = convStringArray(r.capture(*line));
if(col.size() != 3)
{
@@ -2005,7 +2005,7 @@
continue;
}
- Array<String> a;
+ std::vector<String> a;
a.push_back(col[1]);
a.push_back(col[2]);
ret.push_back(a);
@@ -2013,25 +2013,25 @@
return ret;
}
-blocxx::Array<blocxx::Array<blocxx::String> >
+std::vector<std::vector<blocxx::String> >
OpenSSLUtils::parseIndexTXT(const String &caName,
const String &repository)
{
- Array<Array<String> > ret;
+ std::vector<std::vector<String> > ret;
ByteBuffer b = LocalManagement::readFile(repository + "/" + caName + "/index.txt");
String cam(b.data(), b.size());
- StringArray lines = PerlRegEx("\n").split(cam);
+ std::vector<blocxx::String> lines = convStringArray(PerlRegEx("\n").split(cam));
- StringArray::const_iterator line;
+ std::vector<blocxx::String>::const_iterator line;
for(line = lines.begin(); line != lines.end(); ++line)
{
PerlRegEx r("^(\\w)\\s([\\d\\w]+)\\s([\\w\\d,.]*)\\s([[:xdigit:]]+)\\s(\\w+)\\s(.*)$");
- StringArray col = r.capture(*line);
+ std::vector<blocxx::String> col = convStringArray(r.capture(*line));
if(col.size() != 7)
{
@@ -2039,7 +2039,7 @@
continue;
}
- Array<String> a;
+ std::vector<String> a;
a.push_back(col[1]);
a.push_back(col[2]);
a.push_back(col[3]);
@@ -2051,11 +2051,11 @@
return ret;
}
-blocxx::Array<std::map<blocxx::String, blocxx::String> >
+std::vector<std::map<blocxx::String, blocxx::String> >
OpenSSLUtils::listRequests(const String &caName,
const String &repository)
{
- Array<std::map<String, String> > ret;
+ std::vector<std::map<String, String> > ret;
std::list<String> tmpList;
String reqDir = repository + "/" + caName + "/req/";
@@ -2073,7 +2073,7 @@
tmpList.sort();
- Array<Array<String> > camdb = OpenSSLUtils::parseCAMDB(caName, repository);
+ std::vector<std::vector<String> > camdb = OpenSSLUtils::parseCAMDB(caName, repository);
std::list<String>::const_iterator cont;
path::PathInfo pi(reqDir);
@@ -2089,7 +2089,7 @@
PerlRegEx requestR("^([[:xdigit:]]+)-?(\\d*)\\.req$");
- StringArray sa = requestR.capture(*cont);
+ std::vector<blocxx::String> sa = convStringArray(requestR.capture(*cont));
if(sa.size() <= 1)
{
@@ -2114,7 +2114,7 @@
reqLine["request"] = md5;
reqLine["date"] = date;
- Array<Array<String> >::const_iterator dbIT;
+ std::vector<std::vector<String> >::const_iterator dbIT;
for(dbIT = camdb.begin(); dbIT != camdb.end(); ++dbIT)
{
if( (*dbIT)[0] == md5 )
@@ -2134,7 +2134,7 @@
sa.clear();
while(1)
{
- StringArray saTmp = PerlRegEx("(.*?[^\\\\])(\\/|$)").capture(subject);
+ std::vector<blocxx::String> saTmp = convStringArray(PerlRegEx("(.*?[^\\\\])(\\/|$)").capture(subject));
uint pos = 0;
if(saTmp.size() >=2)
@@ -2159,7 +2159,7 @@
PerlRegEx quoteR("\\\\/");
- StringArray::const_iterator it;
+ std::vector<blocxx::String>::const_iterator it;
for(it = sa.begin(); it != sa.end(); ++it)
{
String toMatch = quoteR.replace(*it, "/", true);
@@ -2203,11 +2203,11 @@
return ret;
}
-blocxx::Array<std::map<blocxx::String, blocxx::String> >
+std::vector<std::map<blocxx::String, blocxx::String> >
OpenSSLUtils::listCertificates(const String &caName,
const String &repository)
{
- Array<std::map<String, String> > ret;
+ std::vector<std::map<String, String> > ret;
std::list<String> tmpList;
String certDir = repository + "/" + caName + "/newcerts/";
@@ -2225,7 +2225,7 @@
tmpList.sort();
- Array<Array<String> > indexTXT = OpenSSLUtils::parseIndexTXT(caName, repository);
+ std::vector<std::vector<String> > indexTXT = OpenSSLUtils::parseIndexTXT(caName, repository);
std::list<String>::const_iterator cont;
path::PathInfo pi(certDir);
@@ -2241,7 +2241,7 @@
PerlRegEx certR("^([[:xdigit:]]+):([[:xdigit:]]+-?\\d*)\\.pem$");
- StringArray sa = certR.capture(*cont);
+ std::vector<blocxx::String> sa = convStringArray(certR.capture(*cont));
if(sa.size() != 3)
{
@@ -2258,7 +2258,7 @@
certLine["serial"] = serial;
certLine["certificate"] = serial + ":" + md5;
- Array<Array<String> >::const_iterator dbIT;
+ std::vector<std::vector<String> >::const_iterator dbIT;
for(dbIT = indexTXT.begin(); dbIT != indexTXT.end(); ++dbIT)
{
if( (*dbIT)[3] == serial )
@@ -2295,7 +2295,7 @@
sa.clear();
while(1)
{
- StringArray saTmp = PerlRegEx("(.*?[^\\\\])(\\/|$)").capture(subject);
+ std::vector<blocxx::String> saTmp = convStringArray(PerlRegEx("(.*?[^\\\\])(\\/|$)").capture(subject));
uint pos = 0;
if(saTmp.size() >=2)
@@ -2320,7 +2320,7 @@
PerlRegEx quoteR("\\\\/");
- StringArray::const_iterator it;
+ std::vector<blocxx::String>::const_iterator it;
String lastPart;
for(it = sa.begin(); it != sa.end(); ++it)
{
@@ -2427,11 +2427,11 @@
{
tmpl = LocalManagement::readFile(repository + "/openssl.cnf.tmpl");
- StringArray tmplArray = PerlRegEx("\n").split(String(tmpl.data(), tmpl.size()), true);
+ std::vector<blocxx::String> tmplArray = convStringArray(PerlRegEx("\n").split(String(tmpl.data(), tmpl.size()), true));
PerlRegEx dirR("^\\s*dir\\s*=");
String newConf;
- StringArray::const_iterator line;
+ std::vector<blocxx::String>::const_iterator line;
for(line = tmplArray.begin(); line != tmplArray.end(); ++line)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp Sat Jun 12 14:33:19 2010
@@ -158,7 +158,7 @@
const String &outPassword,
const String &algorithm = "des3");
- static blocxx::Array<blocxx::String>
+ static std::vector<blocxx::String>
listCA(const String &repository = REPOSITORY);
static blocxx::String
@@ -175,19 +175,19 @@
const String &md5,
const String &repository = REPOSITORY);
- static blocxx::Array<blocxx::Array<blocxx::String> >
+ static std::vector<std::vector<blocxx::String> >
parseCAMDB(const String &caName,
const String &repository = REPOSITORY);
- static blocxx::Array<blocxx::Array<blocxx::String> >
+ static std::vector<std::vector<blocxx::String> >
parseIndexTXT(const String &caName,
const String &repository = REPOSITORY);
- static blocxx::Array<std::map<blocxx::String, blocxx::String> >
+ static std::vector<std::map<blocxx::String, blocxx::String> >
listRequests(const String &caName,
const String &repository = REPOSITORY);
- static blocxx::Array<std::map<blocxx::String, blocxx::String> >
+ static std::vector<std::map<blocxx::String, blocxx::String> >
listCertificates(const String &caName,
const String &repository = REPOSITORY);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/PathUtils.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/PathUtils.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/PathUtils.cpp Sat Jun 12 14:33:19 2010
@@ -80,17 +80,17 @@
size_t pos, lastpos = 0;
String spath = path.toString()+"/";
int ret = 0;
-
+
if(path.empty())
return ENOENT;
-
+
// skip ./
if(path.relative())
lastpos=2;
// skip /
else
lastpos=1;
-
+
while((pos = spath.indexOf('/',lastpos)) != String::npos ) {
String dir = spath.substring(0,pos);
ret = ::mkdir(dir.c_str(), mode);
@@ -142,11 +142,12 @@
if ( !p.exists() ) {
return 0;
}
-
+
if ( !p.isDir() ) {
return ENOTDIR ;
}
-
+
+ //std::vector<blocxx::String> cmd;
StringArray cmd;
cmd.push_back(RM_COMMAND);
cmd.push_back("-rf");
@@ -207,28 +208,28 @@
int copyDir( const PathName & srcpath, const PathName & destpath )
{
LOGIT_DEBUG("copyDir " << srcpath << " -> " << destpath );
-
+
PathInfo sp( srcpath );
if ( !sp.isDir() ) {
return ENOTDIR;
}
-
+
PathInfo dp( destpath );
if ( !dp.isDir() ) {
return ENOTDIR;
}
-
+
PathInfo tp( destpath + srcpath.baseName() );
if ( tp.exists() ) {
return EEXIST ;
}
-
+
StringArray cmd;
cmd.push_back(CP_COMMAND);
cmd.push_back("-a");
cmd.push_back(srcpath.toString());
cmd.push_back(destpath.toString());
-
+
String stdOutput;
String errOutput;
int status = -1;
@@ -282,7 +283,7 @@
const PathName & path, bool dots )
{
retlist.clear();
-
+
LOGIT_DEBUG("readDir " << path << ' ');
DIR * dir = ::opendir( path.toString().c_str() );
@@ -290,10 +291,10 @@
LOGIT_ERROR("readDir ::opendir returned " << errno2String(errno));
return errno;
}
-
+
struct dirent *entry;
while ( (entry = ::readdir( dir )) != 0 ) {
-
+
if ( entry->d_name[0] == '.' ) {
if ( !dots )
continue;
@@ -304,9 +305,9 @@
}
retlist.push_back( entry->d_name );
}
-
+
::closedir( dir );
-
+
return 0;
}
@@ -325,7 +326,7 @@
if ( ::unlink( path.toString().c_str() ) == -1 ) {
if(errno == ENOENT)
{
- // remove a file which does not exist: the result is ok
+ // remove a file which does not exist: the result is ok
// The file does not exist after this call. So return 0.
return 0;
}
@@ -371,10 +372,10 @@
<< "returned: " << errno2String(EINVAL));
return EINVAL;
}
-
+
PathInfo dp( dest );
if ( dp.isDir() ) {
- LOGIT_ERROR("copyFile " << file << " -> " << dest << ' '
+ LOGIT_ERROR("copyFile " << file << " -> " << dest << ' '
<< "returned: " << errno2String(EISDIR));
return EISDIR;
}
@@ -383,7 +384,7 @@
cmd.push_back(CP_COMMAND);
cmd.push_back(file.toString());
cmd.push_back(dest.toString());
-
+
String stdOutput;
String errOutput;
int status = -1;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/RequestData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/RequestData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/RequestData.cpp Sat Jun 12 14:33:19 2010
@@ -169,42 +169,42 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
RequestData::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(m_impl->version < 1 || m_impl->version > 1)
{
- result.append(Format("invalid version: %1", m_impl->version).toString());
+ result.push_back(Format("invalid version: %1", m_impl->version).toString());
}
- result.appendArray(m_impl->subject.verify());
+ appendArray(result, m_impl->subject.verify());
// keysize ?
if(m_impl->publicKey.empty())
{
- result.append("invalid publicKey");
+ result.push_back("invalid publicKey");
}
- result.appendArray(m_impl->extensions.verify());
+ appendArray(result, m_impl->extensions.verify());
LOGIT_DEBUG_STRINGARRAY("CertificateData::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
RequestData::dump() const
{
- StringArray result;
- result.append("RequestData::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("RequestData::dump()");
- result.append("Version = " + String(m_impl->version));
- result.appendArray(m_impl->subject.dump());
- result.append("Keysize = " + String(m_impl->keysize));
- result.append("pubkeyAlgorithm = " + String(m_impl->pubkeyAlgorithm));
+ result.push_back("Version = " + String(m_impl->version));
+ appendArray(result, m_impl->subject.dump());
+ result.push_back("Keysize = " + String(m_impl->keysize));
+ result.push_back("pubkeyAlgorithm = " + String(m_impl->pubkeyAlgorithm));
String pk;
for(size_t i = 0; i < m_impl->publicKey.size(); ++i)
@@ -213,9 +213,9 @@
s.format("%02x", static_cast<UInt8>(m_impl->publicKey[i]));
pk += s + ":";
}
- result.append("public Key = " + pk);
+ result.push_back("public Key = " + pk);
- result.append("signatureAlgorithm = "+ String(m_impl->signatureAlgorithm));
+ result.push_back("signatureAlgorithm = "+ String(m_impl->signatureAlgorithm));
String s;
for(uint i = 0; i < m_impl->signature.size(); ++i)
@@ -225,11 +225,11 @@
s += d;
}
- result.append("Signature = " + s);
+ result.push_back("Signature = " + s);
- result.appendArray(m_impl->extensions.dump());
- result.append("Challenge Password = " + m_impl->challengePassword);
- result.append("Unstructured Name = " + m_impl->unstructuredName);
+ appendArray(result, m_impl->extensions.dump());
+ result.push_back("Challenge Password = " + m_impl->challengePassword);
+ result.push_back("Unstructured Name = " + m_impl->unstructuredName);
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/RequestData_Priv.cpp Sat Jun 12 14:33:19 2010
@@ -91,7 +91,7 @@
void
RequestData_Priv::setSubjectDN(const DNObject dn)
{
- StringArray r = dn.verify();
+ std::vector<blocxx::String> r = dn.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -127,7 +127,7 @@
void
RequestData_Priv::setExtensions(const X509v3RequestExts &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/RequestGenerationData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/RequestGenerationData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/RequestGenerationData.cpp Sat Jun 12 14:33:19 2010
@@ -133,7 +133,7 @@
void
RequestGenerationData::setSubjectDN(const DNObject dn)
{
- StringArray r = dn.verify();
+ std::vector<blocxx::String> r = dn.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -205,7 +205,7 @@
void
RequestGenerationData::setExtensions(const X509v3RequestExts &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -276,34 +276,34 @@
return m_impl->extensions.valid();
}
-blocxx::StringArray
+std::vector<blocxx::String>
RequestGenerationData::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
- result.appendArray(m_impl->subject.verify());
+ appendArray(result, m_impl->subject.verify());
// keysize??
- result.appendArray(m_impl->extensions.verify());
+ appendArray(result, m_impl->extensions.verify());
LOGIT_DEBUG_STRINGARRAY("RequestGenerationData::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
RequestGenerationData::dump() const
{
- StringArray result;
- result.append("RequestGenerationData::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("RequestGenerationData::dump()");
- result.appendArray(m_impl->subject.dump());
- result.append("Keysize = " + String(m_impl->keysize));
- result.append("MessageDigest = " + String(m_impl->messageDigest));
- result.append("Challenge Password = " + m_impl->challengePassword);
- result.append("Unstructured Name = " + m_impl->unstructuredName);
- result.appendArray(m_impl->extensions.dump());
+ appendArray(result, m_impl->subject.dump());
+ result.push_back("Keysize = " + String(m_impl->keysize));
+ result.push_back("MessageDigest = " + String(m_impl->messageDigest));
+ result.push_back("Challenge Password = " + m_impl->challengePassword);
+ result.push_back("Unstructured Name = " + m_impl->unstructuredName);
+ appendArray(result, m_impl->extensions.dump());
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/StringExtensions.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/StringExtensions.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/StringExtensions.cpp Sat Jun 12 14:33:19 2010
@@ -123,8 +123,8 @@
bool p = caConfig->exists(type2Section(type, true), "nsBaseUrl");
if(p)
{
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "nsBaseUrl"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "nsBaseUrl")));
if(sp[0].equalsIgnoreCase("critical"))
{
setCritical(true);
@@ -225,31 +225,31 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsBaseUrlExt::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(!initURICheck().isValid(m_impl->value)) {
LOGIT_DEBUG("Wrong value for NsBaseUrlExt:" << m_impl->value);
- result.append(Format("Wrong value for NsBaseUrlExt: %1", m_impl->value).toString());
+ result.push_back(Format("Wrong value for NsBaseUrlExt: %1", m_impl->value).toString());
}
LOGIT_DEBUG_STRINGARRAY("NsBaseUrlExt::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsBaseUrlExt::dump() const
{
- StringArray result;
- result.append("NsBaseUrlExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("NsBaseUrlExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("URL = " + m_impl->value);
+ result.push_back("URL = " + m_impl->value);
return result;
}
@@ -287,8 +287,8 @@
bool p = caConfig->exists(type2Section(type, true), "nsRevocationUrl");
if(p) {
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "nsRevocationUrl"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "nsRevocationUrl")));
if(sp[0].equalsIgnoreCase("critical")) {
setCritical(true);
m_impl->value = sp[1];
@@ -367,16 +367,16 @@
}
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsRevocationUrlExt::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(!initURICheck().isValid(m_impl->value)) {
LOGIT_DEBUG("Wrong value for NsRevocationUrlExt:" << m_impl->value);
- result.append(Format("Wrong value for NsRevocationUrlExt: %1", m_impl->value).toString());
+ result.push_back(Format("Wrong value for NsRevocationUrlExt: %1", m_impl->value).toString());
}
LOGIT_DEBUG_STRINGARRAY("NsRevocationUrlExt::verify()", result);
return result;
@@ -394,16 +394,16 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsRevocationUrlExt::dump() const
{
- StringArray result;
- result.append("NsRevocationUrlExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("NsRevocationUrlExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("URL = " + m_impl->value);
+ result.push_back("URL = " + m_impl->value);
return result;
}
@@ -441,8 +441,8 @@
bool p = caConfig->exists(type2Section(type, true), "nsCaRevocationUrl");
if(p) {
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "nsCaRevocationUrl"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "nsCaRevocationUrl")));
if(sp[0].equalsIgnoreCase("critical")) {
setCritical(true);
m_impl->value = sp[1];
@@ -521,16 +521,16 @@
}
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsCaRevocationUrlExt::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(!initURICheck().isValid(m_impl->value)) {
LOGIT_DEBUG("Wrong value for NsCaRevocationUrlExt:" << m_impl->value);
- result.append(Format("Wrong value for NsCaRevocationUrlExt: %1", m_impl->value).toString());
+ result.push_back(Format("Wrong value for NsCaRevocationUrlExt: %1", m_impl->value).toString());
}
LOGIT_DEBUG_STRINGARRAY("NsCaRevocationUrlExt::verify()", result);
return result;
@@ -548,16 +548,16 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsCaRevocationUrlExt::dump() const
{
- StringArray result;
- result.append("NsCaRevocationUrlExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("NsCaRevocationUrlExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("URL = " + m_impl->value);
+ result.push_back("URL = " + m_impl->value);
return result;
}
@@ -594,8 +594,8 @@
bool p = caConfig->exists(type2Section(type, true), "nsRenewalUrl");
if(p) {
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "nsRenewalUrl"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "nsRenewalUrl")));
if(sp[0].equalsIgnoreCase("critical")) {
setCritical(true);
m_impl->value = sp[1];
@@ -674,16 +674,16 @@
}
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsRenewalUrlExt::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(!initURICheck().isValid(m_impl->value)) {
LOGIT_DEBUG("Wrong value for NsRenewalUrlExt:" << m_impl->value);
- result.append(Format("Wrong value for NsRenewalUrlExt: %1", m_impl->value).toString());
+ result.push_back(Format("Wrong value for NsRenewalUrlExt: %1", m_impl->value).toString());
}
LOGIT_DEBUG_STRINGARRAY("NsRenewalUrlExt::verify()", result);
return result;
@@ -701,16 +701,16 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsRenewalUrlExt::dump() const
{
- StringArray result;
- result.append("NsRenewalUrlExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("NsRenewalUrlExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("URL = " + m_impl->value);
+ result.push_back("URL = " + m_impl->value);
return result;
}
@@ -746,8 +746,8 @@
bool p = caConfig->exists(type2Section(type, true), "nsCaPolicyUrl");
if(p) {
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "nsCaPolicyUrl"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "nsCaPolicyUrl")));
if(sp[0].equalsIgnoreCase("critical")) {
setCritical(true);
m_impl->value = sp[1];
@@ -826,16 +826,16 @@
}
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsCaPolicyUrlExt::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(!initURICheck().isValid(m_impl->value)) {
LOGIT_DEBUG("Wrong value for NsCaPolicyUrlExt:" << m_impl->value);
- result.append(Format("Wrong value for NsCaPolicyUrlExt: %1", m_impl->value).toString());
+ result.push_back(Format("Wrong value for NsCaPolicyUrlExt: %1", m_impl->value).toString());
}
LOGIT_DEBUG_STRINGARRAY("NsCaPolicyUrlExt::verify()", result);
return result;
@@ -853,16 +853,16 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsCaPolicyUrlExt::dump() const
{
- StringArray result;
- result.append("NsCaPolicyUrlExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("NsCaPolicyUrlExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("URL = " + m_impl->value);
+ result.push_back("URL = " + m_impl->value);
return result;
}
@@ -894,8 +894,8 @@
bool p = caConfig->exists(type2Section(type, true), "nsSslServerName");
if(p) {
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "nsSslServerName"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "nsSslServerName")));
if(sp[0].equalsIgnoreCase("critical")) {
setCritical(true);
m_impl->value = sp[1];
@@ -968,10 +968,10 @@
}
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsSslServerNameExt::verify() const
{
- return blocxx::StringArray();
+ return std::vector<blocxx::String>();
}
bool
@@ -980,16 +980,16 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsSslServerNameExt::dump() const
{
- StringArray result;
- result.append("NsSslServerNameExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("NsSslServerNameExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("SSL server name = " + m_impl->value);
+ result.push_back("SSL server name = " + m_impl->value);
return result;
}
@@ -1020,8 +1020,8 @@
bool p = caConfig->exists(type2Section(type, true), "nsComment");
if(p) {
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "nsComment"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "nsComment")));
if(sp[0].equalsIgnoreCase("critical")) {
setCritical(true);
m_impl->value = sp[1];
@@ -1094,10 +1094,10 @@
}
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsCommentExt::verify() const
{
- return blocxx::StringArray();
+ return std::vector<blocxx::String>();
}
bool
@@ -1106,16 +1106,16 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
NsCommentExt::dump() const
{
- StringArray result;
- result.append("NsCommentExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("NsCommentExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("NS Comment = " + m_impl->value);
+ result.push_back("NS Comment = " + m_impl->value);
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/SubjectAlternativeNameExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/SubjectAlternativeNameExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/SubjectAlternativeNameExtension.cpp Sat Jun 12 14:33:19 2010
@@ -86,12 +86,12 @@
bool p = caConfig->exists(type2Section(type, true), "subjectAltName");
if(p)
{
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "subjectAltName"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "subjectAltName")));
if(sp[0].equalsIgnoreCase("critical")) setCritical(true);
- StringArray::const_iterator it = sp.begin();
+ std::vector<blocxx::String>::const_iterator it = sp.begin();
for(; it != sp.end(); ++it)
{
if((*it).indexOf(":") != String::npos)
@@ -121,7 +121,7 @@
: ExtensionBase()
, m_impl(new SubjectAlternativeNameExtImpl(copyEmail, alternativeNameList))
{
- StringArray r = checkLiteralValueList(alternativeNameList);
+ std::vector<blocxx::String> r = checkLiteralValueList(alternativeNameList);
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -162,7 +162,7 @@
void
SubjectAlternativeNameExt::setAlternativeNameList(const std::list<LiteralValue> &alternativeNameList)
{
- StringArray r = checkLiteralValueList(alternativeNameList);
+ std::vector<blocxx::String> r = checkLiteralValueList(alternativeNameList);
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -250,7 +250,7 @@
LOGIT_DEBUG("return SubjectAlternativeNameExt::::valid() is false");
return false;
}
- StringArray r = checkLiteralValueList(m_impl->altNameList);
+ std::vector<blocxx::String> r = checkLiteralValueList(m_impl->altNameList);
if(!r.empty())
{
LOGIT_DEBUG(r[0]);
@@ -259,39 +259,39 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
SubjectAlternativeNameExt::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(!m_impl->emailCopy && m_impl->altNameList.empty())
{
- result.append(String("invalid value for SubjectAlternativeNameExt"));
+ result.push_back(String("invalid value for SubjectAlternativeNameExt"));
}
- result.appendArray(checkLiteralValueList(m_impl->altNameList));
+ appendArray(result, checkLiteralValueList(m_impl->altNameList));
LOGIT_DEBUG_STRINGARRAY("SubjectAlternativeNameExt::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
SubjectAlternativeNameExt::dump() const
{
- StringArray result;
- result.append("SubjectAlternativeNameExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("SubjectAlternativeNameExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("email:copy = " + Bool(m_impl->emailCopy).toString());
+ result.push_back("email:copy = " + Bool(m_impl->emailCopy).toString());
std::list< LiteralValue >::const_iterator it = m_impl->altNameList.begin();
for(; it != m_impl->altNameList.end(); ++it)
{
- result.appendArray((*it).dump());
+ appendArray(result, (*it).dump());
}
return result;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/SubjectKeyIdentifierExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/SubjectKeyIdentifierExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/SubjectKeyIdentifierExtension.cpp Sat Jun 12 14:33:19 2010
@@ -88,8 +88,8 @@
{
String str;
- StringArray sp = PerlRegEx("\\s*,\\s*")
- .split(caConfig->getValue(type2Section(type, true), "subjectKeyIdentifier"));
+ std::vector<blocxx::String> sp = convStringArray(PerlRegEx("\\s*,\\s*")
+ .split(caConfig->getValue(type2Section(type, true), "subjectKeyIdentifier")));
if(sp[0].equalsIgnoreCase("critical"))
{
@@ -256,16 +256,16 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
SubjectKeyIdentifierExt::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
if(!isPresent()) return result;
if(!m_impl->autodetect && m_impl->keyid.empty())
{
- result.append(String("Wrong value for SubjectKeyIdentifierExt: ") +
+ result.push_back(String("Wrong value for SubjectKeyIdentifierExt: ") +
Format("autodetect(%1), keyId(%2)",
m_impl->autodetect?"true":"false",
m_impl->keyid.c_str()).toString());
@@ -273,7 +273,7 @@
if(m_impl->autodetect && !m_impl->keyid.empty())
{
- result.append(String("Wrong value for SubjectKeyIdentifierExt: ") +
+ result.push_back(String("Wrong value for SubjectKeyIdentifierExt: ") +
Format("autodetect(%1), keyId(%2)",
m_impl->autodetect?"true":"false",
m_impl->keyid.c_str()).toString());
@@ -283,7 +283,7 @@
ValueCheck check = initHexCheck();
if(!check.isValid(m_impl->keyid))
{
- result.append(Format("Wrong keyID in SubjectKeyIdentifierExt: %1",
+ result.push_back(Format("Wrong keyID in SubjectKeyIdentifierExt: %1",
m_impl->keyid.c_str()).toString());
}
}
@@ -291,17 +291,17 @@
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
SubjectKeyIdentifierExt::dump() const
{
- StringArray result;
- result.append("SubjectKeyIdentifierExt::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("SubjectKeyIdentifierExt::dump()");
- result.appendArray(ExtensionBase::dump());
+ appendArray(result, ExtensionBase::dump());
if(!isPresent()) return result;
- result.append("Autodetect = " + Bool(m_impl->autodetect).toString());
- result.append("KeyID = " + m_impl->keyid);
+ result.push_back("Autodetect = " + Bool(m_impl->autodetect).toString());
+ result.push_back("KeyID = " + m_impl->keyid);
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/Url.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/Url.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/Url.cpp Sat Jun 12 14:33:19 2010
@@ -135,7 +135,7 @@
// -----------------------------------------------------------------
-blocxx::StringArray
+std::vector<blocxx::String>
Url::getKnownSchemes() const
{
return m_impl->getKnownSchemes();
@@ -282,7 +282,7 @@
// -----------------------------------------------------------------
-blocxx::StringArray
+std::vector<blocxx::String>
Url::getPathParamsArray() const
{
return m_impl->getPathParamsArray();
@@ -306,7 +306,7 @@
// -----------------------------------------------------------------
-blocxx::StringArray
+std::vector<blocxx::String>
Url::getQueryStringArray() const
{
return m_impl->getQueryStringArray();
@@ -438,7 +438,7 @@
// -----------------------------------------------------------------
void
-Url::setPathParamsArray(const blocxx::StringArray &parray)
+Url::setPathParamsArray(const std::vector<blocxx::String> &parray)
{
m_impl->setPathParamsArray(parray);
}
@@ -462,7 +462,7 @@
// -----------------------------------------------------------------
void
-Url::setQueryStringArray(const blocxx::StringArray &qarray)
+Url::setQueryStringArray(const std::vector<blocxx::String> &qarray)
{
m_impl->setQueryStringArray(qarray);
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp Sat Jun 12 14:33:19 2010
@@ -396,10 +396,10 @@
// -------------------------------------------------------------------
-blocxx::StringArray
+std::vector<blocxx::String>
UrlBase::getKnownSchemes() const
{
- return blocxx::StringArray();
+ return std::vector<blocxx::String>();
}
@@ -408,8 +408,8 @@
UrlBase::isKnownScheme(const blocxx::String &scheme) const
{
String lscheme( String(scheme).toLowerCase());
- StringArray schemes( getKnownSchemes());
- StringArray::const_iterator s;
+ std::vector<blocxx::String> schemes( getKnownSchemes());
+ std::vector<blocxx::String>::const_iterator s;
for(s=schemes.begin(); s!=schemes.end(); ++s)
{
@@ -436,12 +436,12 @@
if(valid)
{
String lscheme( String(scheme).toLowerCase());
- StringArray schemes( getKnownSchemes());
+ std::vector<blocxx::String> schemes( getKnownSchemes());
if( schemes.empty())
return true;
- StringArray::const_iterator s;
+ std::vector<blocxx::String>::const_iterator s;
for(s=schemes.begin(); s!=schemes.end(); ++s)
{
if( lscheme == String(*s).toLowerCase())
@@ -752,12 +752,12 @@
// -------------------------------------------------------------------
-blocxx::StringArray
+std::vector<blocxx::String>
UrlBase::getPathParamsArray() const
{
if( config("psep_pathparam").empty())
{
- return blocxx::StringArray(1, getPathParams());
+ return std::vector<blocxx::String>(1, getPathParams());
}
else
{
@@ -801,12 +801,12 @@
// -------------------------------------------------------------------
-blocxx::StringArray
+std::vector<blocxx::String>
UrlBase::getQueryStringArray() const
{
if( config("psep_querystr").empty())
{
- return blocxx::StringArray(1, getQueryString());
+ return std::vector<blocxx::String>(1, getQueryString());
}
else
{
@@ -1171,7 +1171,7 @@
// -------------------------------------------------------------------
void
-UrlBase::setPathParamsArray(const blocxx::StringArray &parray)
+UrlBase::setPathParamsArray(const std::vector<blocxx::String> &parray)
{
setPathParams(
ca_mgm::url::join(
@@ -1216,7 +1216,7 @@
// -------------------------------------------------------------------
void
-UrlBase::setQueryStringArray(const blocxx::StringArray &qarray)
+UrlBase::setQueryStringArray(const std::vector<blocxx::String> &qarray)
{
setQueryString(
ca_mgm::url::join(
Modified: limal-branches/mc-devel/limal-ca-mgm/src/UrlByScheme.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/UrlByScheme.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/UrlByScheme.hpp Sat Jun 12 14:33:19 2010
@@ -42,7 +42,7 @@
// -------------------------------------------------------------------
#if 0
-blocxx::StringArray
+std::vector<blocxx::String>
getUrlBySchemeNames();
#endif
Modified: limal-branches/mc-devel/limal-ca-mgm/src/UrlUtils.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/UrlUtils.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/UrlUtils.cpp Sat Jun 12 14:33:19 2010
@@ -250,7 +250,7 @@
// -------------------------------------------------------------------
-blocxx::StringArray
+std::vector<blocxx::String>
split(const blocxx::String &pstr,
const blocxx::String &psep)
{
@@ -261,7 +261,7 @@
);
}
- StringArray params;
+ std::vector<blocxx::String> params;
size_t beg, pos, len;
len = pstr.length();
@@ -299,8 +299,8 @@
);
}
- StringArray params( split(str, psep));
- StringArray::const_iterator piter;
+ std::vector<blocxx::String> params( split(str, psep));
+ std::vector<blocxx::String>::const_iterator piter;
blocxx::String key, val;
size_t pos;
ParamMap pmap;
@@ -341,11 +341,11 @@
// -------------------------------------------------------------------
blocxx::String
-join(const blocxx::StringArray ¶ms,
+join(const std::vector<blocxx::String> ¶ms,
const blocxx::String &psep)
{
blocxx::String str;
- blocxx::StringArray::const_iterator p( params.begin());
+ std::vector<blocxx::String>::const_iterator p( params.begin());
if( p != params.end())
{
@@ -407,11 +407,11 @@
UrlComponents
parse_url_string(const blocxx::String &url)
{
- StringArray cap;
+ std::vector<blocxx::String> cap;
try
{
blocxx::PosixRegEx reg(RX_SPLIT_URL);
- cap = reg.capture(url);
+ cap = convStringArray(reg.capture(url));
}
catch(...)
{}
@@ -455,11 +455,11 @@
UrlAuthority
parse_url_authority(const blocxx::String &authority)
{
- StringArray cap;
+ std::vector<blocxx::String> cap;
try
{
blocxx::PosixRegEx reg(RX_SPLIT_URL_AUTHORITY);
- cap = reg.capture(authority);
+ cap = convStringArray(reg.capture(authority));
}
catch(...)
{}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/Utils.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/Utils.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/Utils.cpp Sat Jun 12 14:33:19 2010
@@ -68,7 +68,7 @@
// -------------------------------------------------------------------
int wrapExecuteProcessAndGatherOutput(
- const blocxx::Array<blocxx::String> &cmd,
+ const std::vector<blocxx::String> &cmd,
blocxx::String &out,
blocxx::String &err,
const blocxx::EnvVars &env,
@@ -83,7 +83,8 @@
blocxx::Process::Status status;
status = blocxx::Exec::executeProcessAndGatherOutput(
- cmd, out, err, env,
+ blocxx::StringArray(cmd.begin(), cmd.end()),
+ out, err, env,
( tmax < 0 ? blocxx::Timeout::infinite :
blocxx::Timeout::relative(float(tmax))
),
@@ -147,6 +148,19 @@
return exitStatus;
}
+std::vector<blocxx::String>
+convStringArray(const blocxx::StringArray &in)
+{
+ std::vector<blocxx::String> out(in.begin(), in.end());
+ return out;
+}
+
+void
+appendArray(std::vector<blocxx::String> &in, const std::vector<blocxx::String> &arr)
+{
+ in.insert(in.end(), arr.begin(), arr.end());
+}
+
// -------------------------------------------------------------------
} // End of CA_MGM_NAMESPACE
// vim: set ts=8 sts=8 sw=8 ai noet:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/Utils.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/Utils.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/Utils.hpp Sat Jun 12 14:33:19 2010
@@ -157,14 +157,14 @@
.Or(new ValuePosixRECheck("^([0-9a-fA-F]{1,4}:){1,6}:$"))
.Or(
ValueCheck(
- ValueCheck( new ValuePosixRECheck( "^(([0-9a-fA-F]{1,4}):){1,6}(:([0-9a-fA-F]{1,4})){1,6}$"))
+ ValueCheck( new ValuePosixRECheck( "^(([0-9a-fA-F]{1,4}):){1,6}(:([0-9a-fA-F]{1,4})){1,6}$"))
).And(
ValueCheck( new ValuePosixRECheck("^([^:]*:){8,}")).Not()
).And(
ValueCheck( new ValuePosixRECheck("::.*::") ).Not()
)
);
-
+
return checkIP;
}
@@ -176,13 +176,15 @@
return checkAccessOID;
}
-inline blocxx::StringArray
+inline std::vector<blocxx::String>
checkLiteralValueList(const std::list<LiteralValue>& list)
{
- blocxx::StringArray result;
+ std::vector<blocxx::String> result;
std::list<LiteralValue>::const_iterator it = list.begin();
for(;it != list.end(); it++) {
- result.appendArray((*it).verify());
+ //result.appendArray((*it).verify());
+ std::vector<blocxx::String> v = (*it).verify();
+ result.insert(result.end(), v.begin(), v.end());
}
return result;
}
@@ -245,7 +247,7 @@
// throws or returns the process exit code or -1 (term by signal).
int wrapExecuteProcessAndGatherOutput(
- const blocxx::Array<blocxx::String> &cmd,
+ const std::vector<blocxx::String> &cmd,
blocxx::String &out,
blocxx::String &err,
const blocxx::EnvVars &env,
@@ -256,7 +258,7 @@
inline int rehashCAs(const blocxx::String &repositoryDir)
{
- blocxx::Array<blocxx::String> cmd;
+ std::vector<blocxx::String> cmd;
cmd.push_back(C_REHASH_COMMAND);
cmd.push_back(repositoryDir);
@@ -293,6 +295,10 @@
return status;
}
+std::vector<blocxx::String> convStringArray(const blocxx::StringArray &in);
+void appendArray(std::vector<blocxx::String> &in, const std::vector<blocxx::String> &arr);
+
+
}
// -------------------------------------------------------------------
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions.cpp Sat Jun 12 14:33:19 2010
@@ -69,26 +69,26 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
X509v3CRLExts::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
- result.appendArray(m_impl->authorityKeyIdentifier.verify());
- result.appendArray(m_impl->issuerAlternativeName.verify());
+ appendArray(result, m_impl->authorityKeyIdentifier.verify());
+ appendArray(result, m_impl->issuerAlternativeName.verify());
LOGIT_DEBUG_STRINGARRAY("X509v3CRLExts::verify()", result);
return result;;
}
-blocxx::StringArray
+std::vector<blocxx::String>
X509v3CRLExts::dump() const
{
- StringArray result;
- result.append("X509v3CRLExts::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("X509v3CRLExts::dump()");
- result.appendArray(m_impl->authorityKeyIdentifier.dump());
- result.appendArray(m_impl->issuerAlternativeName.dump());
+ appendArray(result, m_impl->authorityKeyIdentifier.dump());
+ appendArray(result, m_impl->issuerAlternativeName.dump());
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions_Priv.cpp Sat Jun 12 14:33:19 2010
@@ -71,7 +71,7 @@
void
X509v3CRLExts_Priv::setAuthorityKeyIdentifier(const AuthorityKeyIdentifierExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -83,7 +83,7 @@
void
X509v3CRLExts_Priv::setIssuerAlternativeName(const IssuerAlternativeNameExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLGenerationExtensions.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLGenerationExtensions.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLGenerationExtensions.cpp Sat Jun 12 14:33:19 2010
@@ -159,26 +159,26 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
X509v3CRLGenerationExts::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
- result.appendArray(m_impl->authorityKeyIdentifier.verify());
- result.appendArray(m_impl->issuerAlternativeName.verify());
+ appendArray(result, m_impl->authorityKeyIdentifier.verify());
+ appendArray(result, m_impl->issuerAlternativeName.verify());
LOGIT_DEBUG_STRINGARRAY("X509v3CRLGenerationExts::verify()", result);
return result;;
}
-blocxx::StringArray
+std::vector<blocxx::String>
X509v3CRLGenerationExts::dump() const
{
- StringArray result;
- result.append("X509v3CRLGenerationExts::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("X509v3CRLGenerationExts::dump()");
- result.appendArray(m_impl->authorityKeyIdentifier.dump());
- result.appendArray(m_impl->issuerAlternativeName.dump());
+ appendArray(result, m_impl->authorityKeyIdentifier.dump());
+ appendArray(result, m_impl->issuerAlternativeName.dump());
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions.cpp Sat Jun 12 14:33:19 2010
@@ -181,58 +181,58 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
X509v3CertificateExts::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
- result.appendArray(m_impl->nsBaseUrl.verify());
- result.appendArray(m_impl->nsRevocationUrl.verify());
- result.appendArray(m_impl->nsCaRevocationUrl.verify());
- result.appendArray(m_impl->nsRenewalUrl.verify());
- result.appendArray(m_impl->nsCaPolicyUrl.verify());
- result.appendArray(m_impl->nsSslServerName.verify());
- result.appendArray(m_impl->nsComment.verify());
- result.appendArray(m_impl->keyUsage.verify());
- result.appendArray(m_impl->nsCertType.verify());
- result.appendArray(m_impl->basicConstraints.verify());
- result.appendArray(m_impl->extendedKeyUsage.verify());
- result.appendArray(m_impl->subjectKeyIdentifier.verify());
- result.appendArray(m_impl->authorityKeyIdentifier.verify());
- result.appendArray(m_impl->subjectAlternativeName.verify());
- result.appendArray(m_impl->issuerAlternativeName.verify());
- result.appendArray(m_impl->authorityInfoAccess.verify());
- result.appendArray(m_impl->crlDistributionPoints.verify());
- result.appendArray(m_impl->certificatePolicies.verify());
+ appendArray(result, m_impl->nsBaseUrl.verify());
+ appendArray(result, m_impl->nsRevocationUrl.verify());
+ appendArray(result, m_impl->nsCaRevocationUrl.verify());
+ appendArray(result, m_impl->nsRenewalUrl.verify());
+ appendArray(result, m_impl->nsCaPolicyUrl.verify());
+ appendArray(result, m_impl->nsSslServerName.verify());
+ appendArray(result, m_impl->nsComment.verify());
+ appendArray(result, m_impl->keyUsage.verify());
+ appendArray(result, m_impl->nsCertType.verify());
+ appendArray(result, m_impl->basicConstraints.verify());
+ appendArray(result, m_impl->extendedKeyUsage.verify());
+ appendArray(result, m_impl->subjectKeyIdentifier.verify());
+ appendArray(result, m_impl->authorityKeyIdentifier.verify());
+ appendArray(result, m_impl->subjectAlternativeName.verify());
+ appendArray(result, m_impl->issuerAlternativeName.verify());
+ appendArray(result, m_impl->authorityInfoAccess.verify());
+ appendArray(result, m_impl->crlDistributionPoints.verify());
+ appendArray(result, m_impl->certificatePolicies.verify());
LOGIT_DEBUG_STRINGARRAY("X509v3CertificateExts::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
X509v3CertificateExts::dump() const
{
- StringArray result;
- result.append("X509v3CertificateExts::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("X509v3CertificateExts::dump()");
- result.appendArray(m_impl->nsBaseUrl.dump());
- result.appendArray(m_impl->nsRevocationUrl.dump());
- result.appendArray(m_impl->nsCaRevocationUrl.dump());
- result.appendArray(m_impl->nsRenewalUrl.dump());
- result.appendArray(m_impl->nsCaPolicyUrl.dump());
- result.appendArray(m_impl->nsSslServerName.dump());
- result.appendArray(m_impl->nsComment.dump());
- result.appendArray(m_impl->keyUsage.dump());
- result.appendArray(m_impl->nsCertType.dump());
- result.appendArray(m_impl->basicConstraints.dump());
- result.appendArray(m_impl->extendedKeyUsage.dump());
- result.appendArray(m_impl->subjectKeyIdentifier.dump());
- result.appendArray(m_impl->authorityKeyIdentifier.dump());
- result.appendArray(m_impl->subjectAlternativeName.dump());
- result.appendArray(m_impl->issuerAlternativeName.dump());
- result.appendArray(m_impl->authorityInfoAccess.dump());
- result.appendArray(m_impl->crlDistributionPoints.dump());
- result.appendArray(m_impl->certificatePolicies.dump());
+ appendArray(result, m_impl->nsBaseUrl.dump());
+ appendArray(result, m_impl->nsRevocationUrl.dump());
+ appendArray(result, m_impl->nsCaRevocationUrl.dump());
+ appendArray(result, m_impl->nsRenewalUrl.dump());
+ appendArray(result, m_impl->nsCaPolicyUrl.dump());
+ appendArray(result, m_impl->nsSslServerName.dump());
+ appendArray(result, m_impl->nsComment.dump());
+ appendArray(result, m_impl->keyUsage.dump());
+ appendArray(result, m_impl->nsCertType.dump());
+ appendArray(result, m_impl->basicConstraints.dump());
+ appendArray(result, m_impl->extendedKeyUsage.dump());
+ appendArray(result, m_impl->subjectKeyIdentifier.dump());
+ appendArray(result, m_impl->authorityKeyIdentifier.dump());
+ appendArray(result, m_impl->subjectAlternativeName.dump());
+ appendArray(result, m_impl->issuerAlternativeName.dump());
+ appendArray(result, m_impl->authorityInfoAccess.dump());
+ appendArray(result, m_impl->crlDistributionPoints.dump());
+ appendArray(result, m_impl->certificatePolicies.dump());
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp Sat Jun 12 14:33:19 2010
@@ -141,7 +141,7 @@
void
X509v3CertificateExts_Priv::setNsBaseUrl(const NsBaseUrlExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -153,7 +153,7 @@
void
X509v3CertificateExts_Priv::setNsRevocationUrl(const NsRevocationUrlExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -165,7 +165,7 @@
void
X509v3CertificateExts_Priv::setNsCaRevocationUrl(const NsCaRevocationUrlExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -177,7 +177,7 @@
void
X509v3CertificateExts_Priv::setNsRenewalUrl(const NsRenewalUrlExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -189,7 +189,7 @@
void
X509v3CertificateExts_Priv::setNsCaPolicyUrl(const NsCaPolicyUrlExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -201,7 +201,7 @@
void
X509v3CertificateExts_Priv::setNsSslServerName(const NsSslServerNameExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -213,7 +213,7 @@
void
X509v3CertificateExts_Priv::setNsComment(const NsCommentExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -225,7 +225,7 @@
void
X509v3CertificateExts_Priv::setNsCertType(const NsCertTypeExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -237,7 +237,7 @@
void
X509v3CertificateExts_Priv::setKeyUsage(const KeyUsageExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -249,7 +249,7 @@
void
X509v3CertificateExts_Priv::setBasicConstraints(const BasicConstraintsExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -261,7 +261,7 @@
void
X509v3CertificateExts_Priv::setExtendedKeyUsage(const ExtendedKeyUsageExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -273,7 +273,7 @@
void
X509v3CertificateExts_Priv::setSubjectKeyIdentifier(const SubjectKeyIdentifierExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -285,7 +285,7 @@
void
X509v3CertificateExts_Priv::setAuthorityKeyIdentifier(const AuthorityKeyIdentifierExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -297,7 +297,7 @@
void
X509v3CertificateExts_Priv::setSubjectAlternativeName(const SubjectAlternativeNameExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -309,7 +309,7 @@
void
X509v3CertificateExts_Priv::setIssuerAlternativeName(const IssuerAlternativeNameExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -321,7 +321,7 @@
void
X509v3CertificateExts_Priv::setAuthorityInfoAccess(const AuthorityInfoAccessExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -333,7 +333,7 @@
void
X509v3CertificateExts_Priv::setCRLDistributionPoints(const CRLDistributionPointsExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
@@ -345,7 +345,7 @@
void
X509v3CertificateExts_Priv::setCertificatePolicies(const CertificatePoliciesExt &ext)
{
- StringArray r = ext.verify();
+ std::vector<blocxx::String> r = ext.verify();
if(!r.empty())
{
LOGIT_ERROR(r[0]);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateIssueExtensions.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateIssueExtensions.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateIssueExtensions.cpp Sat Jun 12 14:33:19 2010
@@ -631,58 +631,58 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
X509v3CertificateIssueExts::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
- result.appendArray(m_impl->nsBaseUrl.verify());
- result.appendArray(m_impl->nsRevocationUrl.verify());
- result.appendArray(m_impl->nsCaRevocationUrl.verify());
- result.appendArray(m_impl->nsRenewalUrl.verify());
- result.appendArray(m_impl->nsCaPolicyUrl.verify());
- result.appendArray(m_impl->nsSslServerName.verify());
- result.appendArray(m_impl->nsComment.verify());
- result.appendArray(m_impl->keyUsage.verify());
- result.appendArray(m_impl->nsCertType.verify());
- result.appendArray(m_impl->basicConstraints.verify());
- result.appendArray(m_impl->extendedKeyUsage.verify());
- result.appendArray(m_impl->subjectKeyIdentifier.verify());
- result.appendArray(m_impl->authorityKeyIdentifier.verify());
- result.appendArray(m_impl->subjectAlternativeName.verify());
- result.appendArray(m_impl->issuerAlternativeName.verify());
- result.appendArray(m_impl->authorityInfoAccess.verify());
- result.appendArray(m_impl->crlDistributionPoints.verify());
- result.appendArray(m_impl->certificatePolicies.verify());
+ appendArray(result, m_impl->nsBaseUrl.verify());
+ appendArray(result, m_impl->nsRevocationUrl.verify());
+ appendArray(result, m_impl->nsCaRevocationUrl.verify());
+ appendArray(result, m_impl->nsRenewalUrl.verify());
+ appendArray(result, m_impl->nsCaPolicyUrl.verify());
+ appendArray(result, m_impl->nsSslServerName.verify());
+ appendArray(result, m_impl->nsComment.verify());
+ appendArray(result, m_impl->keyUsage.verify());
+ appendArray(result, m_impl->nsCertType.verify());
+ appendArray(result, m_impl->basicConstraints.verify());
+ appendArray(result, m_impl->extendedKeyUsage.verify());
+ appendArray(result, m_impl->subjectKeyIdentifier.verify());
+ appendArray(result, m_impl->authorityKeyIdentifier.verify());
+ appendArray(result, m_impl->subjectAlternativeName.verify());
+ appendArray(result, m_impl->issuerAlternativeName.verify());
+ appendArray(result, m_impl->authorityInfoAccess.verify());
+ appendArray(result, m_impl->crlDistributionPoints.verify());
+ appendArray(result, m_impl->certificatePolicies.verify());
LOGIT_DEBUG_STRINGARRAY("X509v3CertificateIssueExts::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
X509v3CertificateIssueExts::dump() const
{
- StringArray result;
- result.append("X509v3CertificateIssueExts::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("X509v3CertificateIssueExts::dump()");
- result.appendArray(m_impl->nsBaseUrl.dump());
- result.appendArray(m_impl->nsRevocationUrl.dump());
- result.appendArray(m_impl->nsCaRevocationUrl.dump());
- result.appendArray(m_impl->nsRenewalUrl.dump());
- result.appendArray(m_impl->nsCaPolicyUrl.dump());
- result.appendArray(m_impl->nsSslServerName.dump());
- result.appendArray(m_impl->nsComment.dump());
- result.appendArray(m_impl->keyUsage.dump());
- result.appendArray(m_impl->nsCertType.dump());
- result.appendArray(m_impl->basicConstraints.dump());
- result.appendArray(m_impl->extendedKeyUsage.dump());
- result.appendArray(m_impl->subjectKeyIdentifier.dump());
- result.appendArray(m_impl->authorityKeyIdentifier.dump());
- result.appendArray(m_impl->subjectAlternativeName.dump());
- result.appendArray(m_impl->issuerAlternativeName.dump());
- result.appendArray(m_impl->authorityInfoAccess.dump());
- result.appendArray(m_impl->crlDistributionPoints.dump());
- result.appendArray(m_impl->certificatePolicies.dump());
+ appendArray(result, m_impl->nsBaseUrl.dump());
+ appendArray(result, m_impl->nsRevocationUrl.dump());
+ appendArray(result, m_impl->nsCaRevocationUrl.dump());
+ appendArray(result, m_impl->nsRenewalUrl.dump());
+ appendArray(result, m_impl->nsCaPolicyUrl.dump());
+ appendArray(result, m_impl->nsSslServerName.dump());
+ appendArray(result, m_impl->nsComment.dump());
+ appendArray(result, m_impl->keyUsage.dump());
+ appendArray(result, m_impl->nsCertType.dump());
+ appendArray(result, m_impl->basicConstraints.dump());
+ appendArray(result, m_impl->extendedKeyUsage.dump());
+ appendArray(result, m_impl->subjectKeyIdentifier.dump());
+ appendArray(result, m_impl->authorityKeyIdentifier.dump());
+ appendArray(result, m_impl->subjectAlternativeName.dump());
+ appendArray(result, m_impl->issuerAlternativeName.dump());
+ appendArray(result, m_impl->authorityInfoAccess.dump());
+ appendArray(result, m_impl->crlDistributionPoints.dump());
+ appendArray(result, m_impl->certificatePolicies.dump());
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions.cpp Sat Jun 12 14:33:19 2010
@@ -276,38 +276,38 @@
return true;
}
-blocxx::StringArray
+std::vector<blocxx::String>
X509v3RequestExts::verify() const
{
- StringArray result;
+ std::vector<blocxx::String> result;
- result.appendArray(m_impl->nsSslServerName.verify());
- result.appendArray(m_impl->nsComment.verify());
- result.appendArray(m_impl->keyUsage.verify());
- result.appendArray(m_impl->nsCertType.verify());
- result.appendArray(m_impl->basicConstraints.verify());
- result.appendArray(m_impl->extendedKeyUsage.verify());
- result.appendArray(m_impl->subjectKeyIdentifier.verify());
- result.appendArray(m_impl->subjectAlternativeName.verify());
+ appendArray(result, m_impl->nsSslServerName.verify());
+ appendArray(result, m_impl->nsComment.verify());
+ appendArray(result, m_impl->keyUsage.verify());
+ appendArray(result, m_impl->nsCertType.verify());
+ appendArray(result, m_impl->basicConstraints.verify());
+ appendArray(result, m_impl->extendedKeyUsage.verify());
+ appendArray(result, m_impl->subjectKeyIdentifier.verify());
+ appendArray(result, m_impl->subjectAlternativeName.verify());
LOGIT_DEBUG_STRINGARRAY("X509v3RequestExts::verify()", result);
return result;
}
-blocxx::StringArray
+std::vector<blocxx::String>
X509v3RequestExts::dump() const
{
- StringArray result;
- result.append("X509v3RequestExts::dump()");
+ std::vector<blocxx::String> result;
+ result.push_back("X509v3RequestExts::dump()");
- result.appendArray(m_impl->nsSslServerName.dump());
- result.appendArray(m_impl->nsComment.dump());
- result.appendArray(m_impl->keyUsage.dump());
- result.appendArray(m_impl->nsCertType.dump());
- result.appendArray(m_impl->basicConstraints.dump());
- result.appendArray(m_impl->extendedKeyUsage.dump());
- result.appendArray(m_impl->subjectKeyIdentifier.dump());
- result.appendArray(m_impl->subjectAlternativeName.dump());
+ appendArray(result, m_impl->nsSslServerName.dump());
+ appendArray(result, m_impl->nsComment.dump());
+ appendArray(result, m_impl->keyUsage.dump());
+ appendArray(result, m_impl->nsCertType.dump());
+ appendArray(result, m_impl->basicConstraints.dump());
+ appendArray(result, m_impl->extendedKeyUsage.dump());
+ appendArray(result, m_impl->subjectKeyIdentifier.dump());
+ appendArray(result, m_impl->subjectAlternativeName.dump());
return result;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/Logger.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/Logger.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/Logger.hpp Sat Jun 12 14:33:19 2010
@@ -191,7 +191,7 @@
* create standard logger types (file, cerr, syslog), to set them as the
* global/default or per thread logger in the blocxx library as well as
* to retrieve them.
- *
+ *
* Each instance of the LiMaL logger contains a optional local component
* name, that is passed with every log message to the current logger and
* used instead of the default component name, that is set in the logger.
@@ -213,7 +213,7 @@
* @li @c %%d The date. May be followed by a date format specifier enclosed
* between braces. Examples:
* @code
- * "%d{%H:%M:%S}"
+ * "%d{%H:%M:%S}"
* "%d{%d %b %Y %H:%M:%S}"
* @endcode
* If no date format specifier is given then ISO8601 format is
@@ -295,10 +295,10 @@
* passed to the setDefaultLogger() or setThreadLogger() methods.
*
* @code
- * blocxx::Array<blocxx::String> components;
+ * std::vector<blocxx::String> components;
* components.push_back("*");
*
- * blocxx::Array<blocxx::String> categories;
+ * std::vector<blocxx::String> categories;
* categories.push_back("*");
*
* blocxx::LoggerRef l = ca_mgm::Logger::createCerrLogger(
@@ -321,8 +321,8 @@
*/
static blocxx::LoggerRef createCerrLogger(
const blocxx::String &component,
- const blocxx::Array<blocxx::String> &components,
- const blocxx::Array<blocxx::String> &categories,
+ const blocxx::StringArray &components,
+ const blocxx::StringArray &categories,
const blocxx::String &messageFormat
);
@@ -334,8 +334,8 @@
* passed to the setDefaultLogger() or setThreadLogger() methods.
*
* @code
- * blocxx::Array<blocxx::String> components(1, "*");
- * blocxx::Array<blocxx::String> categories(1, "*");
+ * std::vector<blocxx::String> components(1, "*");
+ * std::vector<blocxx::String> categories(1, "*");
*
* blocxx::LoggerRef l = ca_mgm::Logger::createSyslogLogger(
* "main", components, categories,
@@ -359,8 +359,8 @@
*/
static blocxx::LoggerRef createSyslogLogger(
const blocxx::String &component,
- const blocxx::Array<blocxx::String> &components,
- const blocxx::Array<blocxx::String> &categories,
+ const blocxx::StringArray &components,
+ const blocxx::StringArray &categories,
const blocxx::String &messageFormat,
const blocxx::String &identity,
const blocxx::String &facility
@@ -375,8 +375,8 @@
* passed to the setDefaultLogger() or setThreadLogger() methods.
*
* @code
- * blocxx::Array<blocxx::String> components(1, "*");
- * blocxx::Array<blocxx::String> categories(1, "*");
+ * std::vector<blocxx::String> components(1, "*");
+ * std::vector<blocxx::String> categories(1, "*");
*
* blocxx::LoggerRef l = ca_mgm::Logger::createFileLogger(
* "main", components, categories,
@@ -403,8 +403,8 @@
*/
static blocxx::LoggerRef createFileLogger(
const blocxx::String &component,
- const blocxx::Array<blocxx::String> &components,
- const blocxx::Array<blocxx::String> &categories,
+ const blocxx::StringArray &components,
+ const blocxx::StringArray &categories,
const blocxx::String &messageFormat,
const blocxx::String &filename,
blocxx::UInt64 maxLogFileSize = 0,
@@ -419,8 +419,8 @@
* passed to the setDefaultLogger() or setThreadLogger() methods.
*
* @code
- * blocxx::Array<blocxx::String> components(1, "*");
- * blocxx::Array<blocxx::String> categories(1, "*");
+ * std::vector<blocxx::String> components(1, "*");
+ * std::vector<blocxx::String> categories(1, "*");
*
* blocxx::LoggerRef l = ca_mgm::Logger::createNullLogger(
* "main", components, categories,
@@ -442,8 +442,8 @@
*/
static blocxx::LoggerRef createNullLogger(
const blocxx::String &component,
- const blocxx::Array<blocxx::String> &components,
- const blocxx::Array<blocxx::String> &categories,
+ const blocxx::StringArray &components,
+ const blocxx::StringArray &categories,
const blocxx::String &messageFormat
);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/Url.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/Url.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/Url.hpp Sat Jun 12 14:33:19 2010
@@ -206,7 +206,7 @@
* \brief Returns scheme names known to this object.
* \return An array with scheme names known by this object.
*/
- blocxx::StringArray
+ std::vector<blocxx::String>
getKnownSchemes() const;
@@ -388,7 +388,7 @@
*
* \return The path parameters splited into an array of substrings.
*/
- blocxx::StringArray
+ std::vector<blocxx::String>
getPathParamsArray() const;
/**
@@ -460,7 +460,7 @@
*
* \return The query string splited into an array of substrings.
*/
- blocxx::StringArray
+ std::vector<blocxx::String>
getQueryStringArray() const;
/**
@@ -647,7 +647,7 @@
* contains an invalid character.
*/
void
- setPathParamsArray(const blocxx::StringArray &parray);
+ setPathParamsArray(const std::vector<blocxx::String> &parray);
/**
* \brief Set the path parameters.
@@ -688,7 +688,7 @@
* contains an invalid character.
*/
void
- setQueryStringArray(const blocxx::StringArray &qarray);
+ setQueryStringArray(const std::vector<blocxx::String> &qarray);
/**
* \brief Set the query parameters.
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlBase.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlBase.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlBase.hpp Sat Jun 12 14:33:19 2010
@@ -443,7 +443,7 @@
*
* \return An array with scheme names known by this object.
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
getKnownSchemes() const;
/**
@@ -617,7 +617,7 @@
*
* \return The encoded path parameters array.
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
getPathParamsArray() const;
/**
@@ -688,7 +688,7 @@
*
* \return The query string splited into an array of substrings.
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
getQueryStringArray() const;
/**
@@ -874,7 +874,7 @@
* contains an invalid character.
*/
virtual void
- setPathParamsArray(const blocxx::StringArray &parray);
+ setPathParamsArray(const std::vector<blocxx::String> &parray);
/**
* \brief Set the path parameters.
@@ -921,7 +921,7 @@
* contains an invalid character.
*/
virtual void
- setQueryStringArray(const blocxx::StringArray &qarray);
+ setQueryStringArray(const std::vector<blocxx::String> &qarray);
/**
* \brief Set the query parameters.
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp Sat Jun 12 14:33:19 2010
@@ -276,7 +276,7 @@
* @return The resulting parameter array.
* @throws UrlNotSupportedException if @p psep separator is empty.
*/
-blocxx::StringArray
+std::vector<blocxx::String>
split(const blocxx::String &pstr,
const blocxx::String &psep);
@@ -331,7 +331,7 @@
* @return A parameter string.
*/
blocxx::String
-join(const blocxx::StringArray &parr,
+join(const std::vector<blocxx::String> &parr,
const blocxx::String &psep);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityInfoAccessExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityInfoAccessExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityInfoAccessExtension.hpp Sat Jun 12 14:33:19 2010
@@ -115,13 +115,13 @@
* @return Array with error messages. If this Array is empty this
* object is valid
*/
- blocxx::Array<String>
+ std::vector<String>
verify() const;
/**
* Return the content of this object for debugging
*/
- blocxx::Array<String>
+ std::vector<String>
dump() const;
#ifndef SWIG
@@ -220,13 +220,13 @@
* @return Array with error messages. If this Array is empty this
* object is valid
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
/**
* Return the content of this object for debugging
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityKeyIdentifierExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityKeyIdentifierExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityKeyIdentifierExtension.hpp Sat Jun 12 14:33:19 2010
@@ -78,13 +78,13 @@
* @return Array with error messages. If this Array is empty this
* object is valid
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
/**
* Return the content of this object for debugging
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
protected:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityKeyIdentifierGenerateExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityKeyIdentifierGenerateExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityKeyIdentifierGenerateExtension.hpp Sat Jun 12 14:33:19 2010
@@ -119,13 +119,13 @@
* @return Array with error messages. If this Array is empty this
* object is valid
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
/**
* Return the content of this object for debugging
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BasicConstraintsExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BasicConstraintsExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BasicConstraintsExtension.hpp Sat Jun 12 14:33:19 2010
@@ -95,12 +95,12 @@
* @return Array with error messages. If this Array is empty this
* object is valid
*/
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
/**
* Return the content of this object for debugging
*/
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
private:
blocxx::COWIntrusiveReference<BasicConstraintsExtImpl> m_impl;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BitExtensions.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BitExtensions.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/BitExtensions.hpp Sat Jun 12 14:33:19 2010
@@ -56,9 +56,9 @@
virtual void commit2Config(CA& ca, Type type) const = 0;
virtual bool valid() const = 0;
- virtual blocxx::StringArray verify() const = 0;
+ virtual std::vector<blocxx::String> verify() const = 0;
- virtual blocxx::StringArray dump() const = 0;
+ virtual std::vector<blocxx::String> dump() const = 0;
protected:
blocxx::COWIntrusiveReference<BitExtensionImpl> m_impl;
@@ -136,12 +136,12 @@
* @return Array with error messages. If this Array is empty this
* object is valid
*/
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
/**
* Return the content of this object for debugging
*/
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
private:
bool validKeyUsage(blocxx::UInt32 keyUsage) const;
@@ -217,12 +217,12 @@
* @return Array with error messages. If this Array is empty this
* object is valid
*/
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
/**
* Return the content of this object for debugging
*/
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
};
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp Sat Jun 12 14:33:19 2010
@@ -275,7 +275,7 @@
* <li>status (The status of the certificate: "valid", "revoked", "expired")</li>
* </ul>
*/
- blocxx::Array<std::map<blocxx::String, blocxx::String> >
+ std::vector<std::map<blocxx::String, blocxx::String> >
getCertificateList();
@@ -297,7 +297,7 @@
* <li>date</li>
* </ul>
*/
- blocxx::Array<std::map<blocxx::String, blocxx::String> >
+ std::vector<std::map<blocxx::String, blocxx::String> >
getRequestList();
@@ -599,7 +599,7 @@
*
* @return Array of Strings of available CAs
*/
- static blocxx::Array<blocxx::String>
+ static std::vector<blocxx::String>
getCAList(const String& repos=REPOSITORY);
/**
@@ -619,7 +619,7 @@
*
* @return a list of lists of the available CAs
*/
- static std::list<blocxx::Array<blocxx::String> >
+ static std::list<std::vector<blocxx::String> >
getCATree(const String& repos=REPOSITORY);
/**
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp Sat Jun 12 14:33:19 2010
@@ -60,10 +60,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
protected:
@@ -138,10 +138,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
protected:
@@ -149,7 +149,7 @@
CRLData();
- blocxx::StringArray
+ std::vector<blocxx::String>
checkRevocationData(const std::map<String, RevocationEntry>& rd) const;
};
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLDistributionPointsExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLDistributionPointsExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLDistributionPointsExtension.hpp Sat Jun 12 14:33:19 2010
@@ -61,10 +61,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLGenerationData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLGenerationData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLGenerationData.hpp Sat Jun 12 14:33:19 2010
@@ -75,10 +75,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLReason.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLReason.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLReason.hpp Sat Jun 12 14:33:19 2010
@@ -112,10 +112,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateData.hpp Sat Jun 12 14:33:19 2010
@@ -113,10 +113,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
protected:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateIssueData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateIssueData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificateIssueData.hpp Sat Jun 12 14:33:19 2010
@@ -117,13 +117,13 @@
* @return Array with error messages. If this Array is empty this
* object is valid
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
/**
* Return the content of this object for debugging
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp Sat Jun 12 14:33:19 2010
@@ -73,10 +73,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
#ifndef SWIG
@@ -135,10 +135,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
#ifndef SWIG
@@ -154,10 +154,10 @@
private:
blocxx::COWIntrusiveReference<CertificatePolicyImpl> m_impl;
- blocxx::StringArray
+ std::vector<blocxx::String>
checkCpsURIs(const StringList& cpsURIs) const;
- blocxx::StringArray
+ std::vector<blocxx::String>
checkNoticeList(const std::list<UserNotice>& list) const;
};
@@ -194,16 +194,16 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
blocxx::COWIntrusiveReference<CertificatePoliciesExtImpl> m_impl;
- blocxx::StringArray
+ std::vector<blocxx::String>
checkPolicies(const std::list<CertificatePolicy>& pl) const;
};
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/DNObject.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/DNObject.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/DNObject.hpp Sat Jun 12 14:33:19 2010
@@ -51,9 +51,9 @@
String getOpenSSLValue() const;
virtual bool valid() const;
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
#ifndef SWIG
@@ -87,15 +87,15 @@
String getOpenSSLString() const;
virtual bool valid() const;
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
protected:
blocxx::COWIntrusiveReference<DNObjectImpl> m_impl;
private:
- blocxx::StringArray
+ std::vector<blocxx::String>
checkRDNList(const std::list<RDNObject>& list) const;
};
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/ExtendedKeyUsageExt.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/ExtendedKeyUsageExt.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/ExtendedKeyUsageExt.hpp Sat Jun 12 14:33:19 2010
@@ -121,13 +121,13 @@
* @return Array with error messages. If this Array is empty this
* object is valid
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
/**
* Return the content of this object for debugging
*/
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/ExtensionBase.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/ExtensionBase.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/ExtensionBase.hpp Sat Jun 12 14:33:19 2010
@@ -55,9 +55,9 @@
virtual void commit2Config(CA& ca, Type type) const = 0;
virtual bool valid() const =0;
- virtual blocxx::StringArray verify() const =0;
+ virtual std::vector<blocxx::String> verify() const =0;
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
private:
blocxx::COWIntrusiveReference<ExtensionBaseImpl> m_impl;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/IssuerAlternativeNameExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/IssuerAlternativeNameExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/IssuerAlternativeNameExtension.hpp Sat Jun 12 14:33:19 2010
@@ -76,10 +76,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/LiteralValues.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/LiteralValues.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/LiteralValues.hpp Sat Jun 12 14:33:19 2010
@@ -101,10 +101,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
/**
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestData.hpp Sat Jun 12 14:33:19 2010
@@ -98,10 +98,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
protected:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestGenerationData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestGenerationData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/RequestGenerationData.hpp Sat Jun 12 14:33:19 2010
@@ -110,10 +110,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/StringExtensions.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/StringExtensions.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/StringExtensions.hpp Sat Jun 12 14:33:19 2010
@@ -45,9 +45,9 @@
virtual void commit2Config(CA& ca, Type type) const = 0;
virtual bool valid() const = 0;
- virtual blocxx::StringArray verify() const = 0;
+ virtual std::vector<blocxx::String> verify() const = 0;
- virtual blocxx::StringArray dump() const = 0;
+ virtual std::vector<blocxx::String> dump() const = 0;
protected:
StringExtension(const String &v );
@@ -79,9 +79,9 @@
virtual void commit2Config(CA& ca, Type type) const ;
virtual bool valid() const;
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
};
class NsRevocationUrlExt : public StringExtension {
@@ -104,9 +104,9 @@
virtual void commit2Config(CA& ca, Type type) const;
virtual bool valid() const;
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
};
class NsCaRevocationUrlExt : public StringExtension {
@@ -129,9 +129,9 @@
virtual void commit2Config(CA& ca, Type type) const;
virtual bool valid() const;
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
};
class NsRenewalUrlExt : public StringExtension {
@@ -154,9 +154,9 @@
virtual void commit2Config(CA& ca, Type type) const;
virtual bool valid() const;
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
};
class NsCaPolicyUrlExt : public StringExtension {
public:
@@ -178,9 +178,9 @@
virtual void commit2Config(CA& ca, Type type) const;
virtual bool valid() const;
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
};
class NsSslServerNameExt : public StringExtension {
public:
@@ -202,9 +202,9 @@
virtual void commit2Config(CA& ca, Type type) const;
virtual bool valid() const;
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
};
class NsCommentExt : public StringExtension {
public:
@@ -226,9 +226,9 @@
virtual void commit2Config(CA& ca, Type type) const;
virtual bool valid() const;
- virtual blocxx::StringArray verify() const;
+ virtual std::vector<blocxx::String> verify() const;
- virtual blocxx::StringArray dump() const;
+ virtual std::vector<blocxx::String> dump() const;
};
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectAlternativeNameExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectAlternativeNameExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectAlternativeNameExtension.hpp Sat Jun 12 14:33:19 2010
@@ -72,10 +72,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectKeyIdentifierExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectKeyIdentifierExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectKeyIdentifierExtension.hpp Sat Jun 12 14:33:19 2010
@@ -68,10 +68,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CRLExtensions.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CRLExtensions.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CRLExtensions.hpp Sat Jun 12 14:33:19 2010
@@ -60,10 +60,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
protected:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CRLGenerationExtensions.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CRLGenerationExtensions.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CRLGenerationExtensions.hpp Sat Jun 12 14:33:19 2010
@@ -79,10 +79,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CertificateExtensions.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CertificateExtensions.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CertificateExtensions.hpp Sat Jun 12 14:33:19 2010
@@ -114,10 +114,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
protected:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CertificateIssueExtensions.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CertificateIssueExtensions.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3CertificateIssueExtensions.hpp Sat Jun 12 14:33:19 2010
@@ -233,10 +233,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
private:
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3RequestExtensions.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3RequestExtensions.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/X509v3RequestExtensions.hpp Sat Jun 12 14:33:19 2010
@@ -138,10 +138,10 @@
virtual bool
valid() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
verify() const;
- virtual blocxx::StringArray
+ virtual std::vector<blocxx::String>
dump() const;
protected:
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CA1.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CA1.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CA1.cc Sat Jun 12 14:33:19 2010
@@ -24,13 +24,13 @@
try
{
cout << "START" << endl;
-
- StringArray comp;
+
+ blocxx::StringArray comp;
comp.push_back("ca-mgm");
comp.push_back("limal");
-
+
// Logging
-
+
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"CA1",
comp,
@@ -39,29 +39,29 @@
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("ca1_test", "system", "./TestRepos/");
-
+
cout << "======================== getRequestDefaults =================" << endl;
RequestGenerationData rgd = ca.getRequestDefaults(E_CA_Req);
cout << "======================== call verify() =================" << endl;
-
- StringArray a = rgd.verify();
-
+
+ std::vector<blocxx::String> a = rgd.verify();
+
StringArray::const_iterator it;
-
+
for(it = a.begin(); it != a.end(); ++it)
{
cout << (*it) << endl;
}
-
+
cout << "======================== call dump() =================" << endl;
- StringArray dump = rgd.dump();
+ std::vector<blocxx::String> dump = rgd.dump();
StringArray::const_iterator it2;
-
+
for(it2 = dump.begin(); it2 != dump.end(); ++it2)
{
if(!r.match(*it2))
@@ -73,20 +73,20 @@
cout << "======================== getIssueDefaults =================" << endl;
CertificateIssueData cid = ca.getIssueDefaults(E_CA_Cert);
-
+
cout << "======================== call verify() =================" << endl;
a = cid.verify();
-
+
for(it = a.begin(); it != a.end(); ++it)
{
cout << (*it) << endl;
}
-
+
cout << "======================== call dump() =================" << endl;
dump = cid.dump();
-
+
for(it2 = dump.begin(); it2 != dump.end(); ++it2)
{
if(!r.match(*it2))
@@ -98,16 +98,16 @@
cout << "======================== getCRLDefaults =================" << endl;
CRLGenerationData cgd = ca.getCRLDefaults();
-
+
cout << "======================== call verify() =================" << endl;
-
+
a = cgd.verify();
-
+
for(it = a.begin(); it != a.end(); ++it)
{
cout << (*it) << endl;
}
-
+
cout << "======================== call dump() =================" << endl;
dump = cgd.dump();
@@ -121,13 +121,13 @@
}
cout << "DONE" << endl;
-
+
}
catch(Exception& e)
{
cerr << e << endl;
}
-
+
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CA2.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CA2.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CA2.cc Sat Jun 12 14:33:19 2010
@@ -12,6 +12,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -19,13 +22,13 @@
int main(int argc, char **argv)
{
-
+
if ( argc != 2 )
{
cerr << "Usage: CA2 <filepath>" << endl;
exit( 1 );
}
-
+
// Logging
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"CA2",
@@ -34,9 +37,9 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
blocxx::String file = argv[ 1 ];
-
+
cout << "START" << endl;
cout << "file: " << file << endl;
@@ -46,7 +49,7 @@
cerr << "Unable to load '" << file << "'" << endl;
exit( 2 );
}
-
+
while( in )
{
try
@@ -54,16 +57,16 @@
blocxx::String line = blocxx::String::getLine( in );
if(line == "EOF") break;
- StringArray params = PerlRegEx("\\s").split(line);
+ std::vector<blocxx::String> params = convStringArray(PerlRegEx("\\s").split(line));
cout << "creating CA object" << endl;
CA ca(params[0], "system", "./TestRepos/");
-
+
RequestGenerationData rgd;
-
+
cout << "============= Test:" << params[0] << "=>" << params[1] << endl;
-
+
if(params[1] == "CA_Req")
{
rgd = ca.getRequestDefaults(E_CA_Req);
@@ -81,20 +84,20 @@
cout << "unknown parameter" << endl;
}
- cout << "============= Call Verify" << endl;
+ cout << "============= Call Verify" << endl;
+
+ std::vector<blocxx::String> a = rgd.verify();
- StringArray a = rgd.verify();
-
StringArray::const_iterator it;
for(it = a.begin(); it != a.end(); ++it)
{
cout << (*it) << endl;
}
-
- cout << "============= Call Dump" << endl;
+
+ cout << "============= Call Dump" << endl;
PerlRegEx r("^!CHANGING DATA!.*$");
- StringArray dump = rgd.dump();
+ std::vector<blocxx::String> dump = rgd.dump();
StringArray::const_iterator it2;
for(it2 = dump.begin(); it2 != dump.end(); ++it2)
{
@@ -109,7 +112,7 @@
cerr << e << endl;
}
}
-
+
cout << "DONE" << endl;
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CA3.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CA3.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CA3.cc Sat Jun 12 14:33:19 2010
@@ -12,6 +12,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -19,13 +22,13 @@
int main(int argc, char **argv)
{
-
+
if ( argc != 2 )
{
cerr << "Usage: CA3 <filepath>" << endl;
exit( 1 );
}
-
+
// Logging
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"CA3",
@@ -34,9 +37,9 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
blocxx::String file = argv[ 1 ];
-
+
cout << "START" << endl;
cout << "file: " << file << endl;
@@ -46,7 +49,7 @@
cerr << "Unable to load '" << file << "'" << endl;
exit( 2 );
}
-
+
while( in )
{
try
@@ -54,16 +57,16 @@
blocxx::String line = blocxx::String::getLine( in );
if(line == "EOF") break;
- StringArray params = PerlRegEx("\\s").split(line);
+ std::vector<blocxx::String> params = convStringArray(PerlRegEx("\\s").split(line));
cout << "creating CA object" << endl;
-
+
CA ca(params[0], "system", "./TestRepos/");
-
+
CertificateIssueData cid;
-
+
cout << "============= Test:" << params[0] << "=>" << params[1] << endl;
-
+
if(params[1] == "CA_Cert")
{
cid = ca.getIssueDefaults(E_CA_Cert);
@@ -81,21 +84,21 @@
cout << "unknown parameter" << endl;
}
- cout << "============= Call Verify" << endl;
+ cout << "============= Call Verify" << endl;
+
+ std::vector<blocxx::String> a = cid.verify();
- StringArray a = cid.verify();
-
StringArray::const_iterator it;
for(it = a.begin(); it != a.end(); ++it)
{
cout << (*it) << endl;
}
-
- cout << "============= Call Dump" << endl;
+
+ cout << "============= Call Dump" << endl;
PerlRegEx r("^!CHANGING DATA!.*$");
- StringArray dump = cid.dump();
-
+ std::vector<blocxx::String> dump = cid.dump();
+
StringArray::const_iterator it2;
for(it2 = dump.begin(); it2 != dump.end(); ++it2)
{
@@ -110,7 +113,7 @@
cerr << e << endl;
}
}
-
+
cout << "DONE" << endl;
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CA4.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CA4.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CA4.cc Sat Jun 12 14:33:19 2010
@@ -63,7 +63,7 @@
cout << "============= Call Verify" << endl;
- StringArray a = cgd.verify();
+ std::vector<blocxx::String> a = cgd.verify();
StringArray::const_iterator it;
for(it = a.begin(); it != a.end(); ++it)
@@ -74,7 +74,7 @@
cout << "============= Call Dump" << endl;
PerlRegEx r("^!CHANGING DATA!.*$");
- StringArray dump = cgd.dump();
+ std::vector<blocxx::String> dump = cgd.dump();
StringArray::const_iterator it2;
for(it2 = dump.begin(); it2 != dump.end(); ++it2)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CA5.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CA5.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CA5.cc Sat Jun 12 14:33:19 2010
@@ -12,6 +12,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -19,17 +22,17 @@
int main(int argc, char **argv)
{
-
+
if ( argc != 2 )
{
cerr << "Usage: CA5 <filepath>" << endl;
exit( 1 );
}
- StringArray comp;
+ blocxx::StringArray comp;
comp.push_back("ca-mgm");
comp.push_back("limal");
-
+
// Logging
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"CA5",
@@ -38,9 +41,9 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
blocxx::String file = argv[ 1 ];
-
+
cout << "START" << endl;
cout << "file: " << file << endl;
@@ -50,26 +53,26 @@
cerr << "Unable to load '" << file << "'" << endl;
exit( 2 );
}
-
+
while( in )
- {
+ {
try
- {
+ {
blocxx::String line = blocxx::String::getLine( in );
if(line == "EOF") break;
- StringArray params = PerlRegEx("\\s").split(line);
+ std::vector<blocxx::String> params = convStringArray(PerlRegEx("\\s").split(line));
cout << "creating CA object" << endl;
CA ca(params[0], "system", "./TestRepos/");
-
+
RequestGenerationData rgd;
-
+
cout << "============= Test:" << params[0] << "=>" << params[1] << endl;
-
+
Type t = E_CA_Req;
-
+
if(params[1] == "CA_Req")
{
t = E_CA_Req;
@@ -88,11 +91,11 @@
exit(1);
}
- cout << "============= read" << endl;
-
+ cout << "============= read" << endl;
+
rgd = ca.getRequestDefaults(t);
- cout << "============= write back unchanged" << endl;
+ cout << "============= write back unchanged" << endl;
std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
std::list<RDNObject>::iterator dnit;
@@ -111,23 +114,23 @@
DNObject dn(dnl);
rgd.setSubjectDN(dn);
ca.setRequestDefaults(t, rgd);
-
- cout << "============= re-read" << endl;
-
+
+ cout << "============= re-read" << endl;
+
RequestGenerationData Nrgd;
Nrgd = ca.getRequestDefaults(t);
-
- StringArray a = Nrgd.verify();
+
+ std::vector<blocxx::String> a = Nrgd.verify();
StringArray::const_iterator it;
for(it = a.begin(); it != a.end(); ++it)
{
cout << (*it) << endl;
}
-
- cout << "============= Call Dump" << endl;
+
+ cout << "============= Call Dump" << endl;
PerlRegEx r("^!CHANGING DATA!.*$");
- StringArray dump = Nrgd.dump();
+ std::vector<blocxx::String> dump = Nrgd.dump();
StringArray::const_iterator it2;
for(it2 = dump.begin(); it2 != dump.end(); ++it2)
{
@@ -142,7 +145,7 @@
cerr << e << endl;
}
}
-
+
cout << "DONE" << endl;
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CA6.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CA6.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CA6.cc Sat Jun 12 14:33:19 2010
@@ -12,6 +12,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -25,10 +28,10 @@
exit( 1 );
}
- StringArray comp;
+ blocxx::StringArray comp;
comp.push_back("ca-mgm");
comp.push_back("limal");
-
+
// Logging
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"CA6",
@@ -37,9 +40,9 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
blocxx::String file = argv[ 1 ];
-
+
cout << "START" << endl;
cout << "file: " << file << endl;
@@ -49,26 +52,26 @@
cerr << "Unable to load '" << file << "'" << endl;
exit( 2 );
}
-
+
while( in )
- {
+ {
try
- {
+ {
blocxx::String line = blocxx::String::getLine( in );
if(line == "EOF") break;
- StringArray params = PerlRegEx("\\s").split(line);
+ std::vector<blocxx::String> params = convStringArray(PerlRegEx("\\s").split(line));
cout << "creating CA object" << endl;
-
+
CA ca(params[0], "system", "./TestRepos/");
-
+
CertificateIssueData cid;
-
+
cout << "============= Test:" << params[0] << "=>" << params[1] << endl;
-
+
Type t = E_CA_Req;
-
+
if(params[1] == "CA_Cert")
{
t = E_CA_Cert;
@@ -87,33 +90,33 @@
exit(1);
}
- cout << "============= read" << endl;
-
+ cout << "============= read" << endl;
+
cid = ca.getIssueDefaults(t);
- cout << "============= write back unchanged" << endl;
+ cout << "============= write back unchanged" << endl;
ca.setIssueDefaults(t, cid);
-
- cout << "============= re-read" << endl;
+
+ cout << "============= re-read" << endl;
CertificateIssueData Ncid;
Ncid = ca.getIssueDefaults(t);
- cout << "============= Call Verify" << endl;
+ cout << "============= Call Verify" << endl;
+
+ std::vector<blocxx::String> a = Ncid.verify();
- StringArray a = Ncid.verify();
-
StringArray::const_iterator it;
for(it = a.begin(); it != a.end(); ++it)
{
cout << (*it) << endl;
}
-
- cout << "============= Call Dump" << endl;
+
+ cout << "============= Call Dump" << endl;
PerlRegEx r("^!CHANGING DATA!.*$");
- StringArray dump = Ncid.dump();
+ std::vector<blocxx::String> dump = Ncid.dump();
StringArray::const_iterator it2;
for(it2 = dump.begin(); it2 != dump.end(); ++it2)
{
@@ -128,7 +131,7 @@
cerr << e << endl;
}
}
-
+
cout << "DONE" << endl;
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CA7.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CA7.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CA7.cc Sat Jun 12 14:33:19 2010
@@ -12,6 +12,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -24,8 +27,8 @@
cerr << "Usage: CA7 <filepath>" << endl;
exit( 1 );
}
-
- StringArray comp;
+
+ blocxx::StringArray comp;
comp.push_back("ca-mgm");
comp.push_back("limal");
@@ -37,61 +40,61 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
blocxx::String file = argv[ 1 ];
-
+
cout << "START" << endl;
cout << "file: " << file << endl;
-
+
ifstream in( file.c_str() );
if ( in.fail() )
{
cerr << "Unable to load '" << file << "'" << endl;
exit( 2 );
}
-
+
while( in )
- {
+ {
try
- {
+ {
blocxx::String line = blocxx::String::getLine( in );
if(line == "EOF") break;
cout << "creating CA object" << endl;
-
+
CA ca(line, "system", "./TestRepos/");
-
+
CRLGenerationData cgd;
-
+
cout << "============= Test:" << line << endl;
-
- cout << "============= read" << endl;
+
+ cout << "============= read" << endl;
cgd = ca.getCRLDefaults();
- cout << "============= write back unchanged" << endl;
+ cout << "============= write back unchanged" << endl;
ca.setCRLDefaults(cgd);
- cout << "============= re-read" << endl;
+ cout << "============= re-read" << endl;
CRLGenerationData Ncgd;
Ncgd = ca.getCRLDefaults();
- cout << "============= Call Verify" << endl;
+ cout << "============= Call Verify" << endl;
+
+ std::vector<blocxx::String> a = Ncgd.verify();
- StringArray a = Ncgd.verify();
-
StringArray::const_iterator it;
for(it = a.begin(); it != a.end(); ++it)
{
cout << (*it) << endl;
}
-
- cout << "============= Call Dump" << endl;
+
+ cout << "============= Call Dump" << endl;
PerlRegEx r("^!CHANGING DATA!.*$");
- StringArray dump = Ncgd.dump();
+ std::vector<blocxx::String> dump = Ncgd.dump();
StringArray::const_iterator it2;
for(it2 = dump.begin(); it2 != dump.end(); ++it2)
{
@@ -99,14 +102,14 @@
{
cout << (*it2) << endl;
}
- }
+ }
}
catch(Exception& e)
{
cerr << e << endl;
}
}
-
+
cout << "DONE" << endl;
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CA8.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CA8.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CA8.cc Sat Jun 12 14:33:19 2010
@@ -23,13 +23,13 @@
{
cout << "START" << endl;
- StringArray cat;
+ blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
cat.push_back("INFO");
//cat.push_back("DEBUG");
-
+
// Logging
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"CA8",
@@ -38,17 +38,17 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
RequestGenerationData rgd = CA::getRootCARequestDefaults("./TestRepos/");
CertificateIssueData cid = CA::getRootCAIssueDefaults("./TestRepos/");
-
+
std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
std::list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -62,10 +62,10 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
-
+
CA::createRootCA("Test_CA", "system", rgd, cid, "./TestRepos/");
path::PathInfo iKey("./TestRepos/Test_CA/cacert.key");
@@ -93,7 +93,7 @@
if(iReq.isFile())
{
cout << iReq.toString() << " IS FILE" <<endl;
-
+
if(iKey.size() > 0)
{
cout << "Size is greater then 0" << endl;
@@ -111,7 +111,7 @@
if(iCrt.isFile())
{
cout << iCrt.toString() << " IS FILE" <<endl;
-
+
if(iKey.size() > 0)
{
cout << "Size is greater then 0" << endl;
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CA9.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CA9.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CA9.cc Sat Jun 12 14:33:19 2010
@@ -36,7 +36,7 @@
cout << "=================== start CA List ======================" << endl;
- StringArray list = CA::getCAList("./TestRepos/");
+ std::vector<blocxx::String> list = CA::getCAList("./TestRepos/");
StringArray::const_iterator it;
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CRLTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CRLTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CRLTest.cc Sat Jun 12 14:33:19 2010
@@ -50,7 +50,7 @@
cgd.extensions().issuerAlternativeName().setCopyIssuer(true);
cgd.extensions().issuerAlternativeName().setAlternativeNameList(list);
-
+
ca.createCRL(cgd);
path::PathInfo pi2("./TestRepos/Test_CA1/crl/crl.pem");
@@ -61,9 +61,9 @@
CRLData cd = ca.getCRL();
- StringArray ret = cd.getExtensions().dump();
- StringArray::const_iterator it;
-
+ std::vector<blocxx::String> ret = cd.getExtensions().dump();
+ std::vector<blocxx::String>::const_iterator it;
+
for(it = ret.begin(); it != ret.end(); ++it)
{
cout << (*it) << endl;
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest.cc Sat Jun 12 14:33:19 2010
@@ -22,7 +22,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -37,7 +37,7 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Client_Req);
@@ -47,7 +47,7 @@
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -61,12 +61,12 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
blocxx::String r = ca.createRequest("system", rgd, E_Client_Req);
-
+
cout << "RETURN Request " << endl;
CertificateIssueData cid = ca.getIssueDefaults(E_Client_Cert);
@@ -76,7 +76,7 @@
cout << "RETURN Certificate " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/newcerts/" + c + ".pem");
-
+
cout << "Certificate exists: " << Bool(pi.exists()) << endl;
cout << "DONE" << endl;
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest2.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest2.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest2.cc Sat Jun 12 14:33:19 2010
@@ -22,8 +22,8 @@
try
{
cout << "START" << endl;
-
- StringArray cat;
+
+ blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
cat.push_back("INFO");
@@ -37,17 +37,17 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
std::list<RDNObject>::iterator dnit;
-
+
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -61,7 +61,7 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
@@ -71,7 +71,7 @@
cout << "RETURN Certificate " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/newcerts/" + c + ".pem");
-
+
cout << "Certificate exists: " << Bool(pi.exists()) << endl;
cout << "DONE" << endl;
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest3.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest3.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest3.cc Sat Jun 12 14:33:19 2010
@@ -22,7 +22,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -37,19 +37,19 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Client_Req);
-
+
// ------------------------ Set DN --------------------------------
-
+
list<RDNObject> dnl = rgd.getSubjectDN().getDN();
list<RDNObject>::iterator dnit;
-
+
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -63,14 +63,14 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
// ------------------------ create request --------------------------------
blocxx::String r = ca.createRequest("system", rgd, E_Client_Req);
-
+
cout << "RETURN Request " << endl;
// ------------------------ get issue defaults --------------------------------
@@ -90,7 +90,7 @@
// ------------------------ create bit extension -----------------------------
KeyUsageExt ku(KeyUsageExt::decipherOnly);
- NsCertTypeExt nsCertType(NsCertTypeExt::objCA |
+ NsCertTypeExt nsCertType(NsCertTypeExt::objCA |
NsCertTypeExt::emailCA |
NsCertTypeExt::sslCA);
@@ -108,17 +108,17 @@
sl.push_back("nsSGC");
ExtendedKeyUsageExt extendedKeyUsage( sl );
-
+
// ------------------------ create key identifier extension -----------------------------
-
+
SubjectKeyIdentifierExt subjectKeyIdentifier(true);
- AuthorityKeyIdentifierGenerateExt
+ AuthorityKeyIdentifierGenerateExt
authorityKeyIdentifier(
AuthorityKeyIdentifierGenerateExt::KeyID_always,
AuthorityKeyIdentifierGenerateExt::Issuer_always);
// ------------------------ create alternative extension -----------------------------
-
+
list<LiteralValue> list;
list.push_back(LiteralValue("IP", "164.34.35.184"));
list.push_back(LiteralValue("IP", "2001:780:101:a00:211:11ff:fee6:a5af"));
@@ -126,18 +126,18 @@
list.push_back(LiteralValue("RID", "1.2.3.4"));
list.push_back(LiteralValue("email", "me(a)my-company.com"));
list.push_back(LiteralValue("URI", "http://www.my-company.com/"));
-
+
SubjectAlternativeNameExt subjectAlternativeName(true, list);
IssuerAlternativeNameExt issuerAlternativeName(true, list);
// ---------------- create authority information extension ------------------------
-
+
std::list<ca_mgm::AuthorityInformation> info;
- info.push_back(AuthorityInformation("OCSP",
+ info.push_back(AuthorityInformation("OCSP",
LiteralValue("URI", "http://www.my-company.com/ocsp.pl")));
- info.push_back(AuthorityInformation("caIssuers",
+ info.push_back(AuthorityInformation("caIssuers",
LiteralValue("URI", "http://www.my-company.com/caIssuer.html")));
-
+
AuthorityInfoAccessExt authorityInfoAccess;
authorityInfoAccess.setAuthorityInformation(info);
@@ -156,7 +156,7 @@
CertificatePolicy p2;
p2.setPolicyIdentifier("1.3.6.8");
-
+
StringList slp;
slp.push_back("http://www.my-company.com/");
slp.push_back("http://www2.my-company.com/");
@@ -177,7 +177,7 @@
p.push_back(p2);
CertificatePoliciesExt certificatePolicies(p);
-
+
// ------------------------ get current extensions -----------------------------
X509v3CertificateIssueExts ex = cid.getExtensions();
@@ -206,13 +206,13 @@
ex.setCertificatePolicies(certificatePolicies);
cid.setExtensions(ex);
-
+
blocxx::String c = ca.issueCertificate(r, cid, E_CA_Cert);
cout << "RETURN Certificate " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/newcerts/" + c + ".pem");
-
+
cout << "Certificate exists: " << Bool(pi.exists()) << endl;
cout << "DONE" << endl;
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest4.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest4.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest4.cc Sat Jun 12 14:33:19 2010
@@ -12,6 +12,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -23,7 +26,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,19 +41,19 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Client_Req);
-
+
// ------------------------ Set DN --------------------------------
-
+
std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
std::list<RDNObject>::iterator dnit;
-
+
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -64,14 +67,14 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
// ------------------------ create request --------------------------------
blocxx::String r = ca.createRequest("system", rgd, E_Client_Req);
-
+
cout << "RETURN Request " << endl;
// ------------------------ get issue defaults --------------------------------
@@ -92,7 +95,7 @@
// ------------------------ create bit extension -----------------------------
cid.extensions().keyUsage().setKeyUsage(KeyUsageExt::decipherOnly);
- cid.extensions().nsCertType().setNsCertType(NsCertTypeExt::objCA |
+ cid.extensions().nsCertType().setNsCertType(NsCertTypeExt::objCA |
NsCertTypeExt::emailCA |
NsCertTypeExt::sslCA);
@@ -110,35 +113,35 @@
sl.push_back("nsSGC");
cid.extensions().extendedKeyUsage().setExtendedKeyUsage( sl );
-
+
// ------------------------ create key identifier extension -----------------------------
-
+
cid.extensions().subjectKeyIdentifier().setSubjectKeyIdentifier(true);
cid.extensions().authorityKeyIdentifier().setKeyID(AuthorityKeyIdentifierGenerateExt::KeyID_always);
cid.extensions().authorityKeyIdentifier().setIssuer(AuthorityKeyIdentifierGenerateExt::Issuer_always);
// ------------------------ create alternative extension -----------------------------
-
+
std::list<LiteralValue> list;
list.push_back(LiteralValue("IP", "164.34.35.184"));
list.push_back(LiteralValue("DNS", "ca.my-company.com"));
list.push_back(LiteralValue("RID", "1.2.3.4"));
list.push_back(LiteralValue("email", "me(a)my-company.com"));
list.push_back(LiteralValue("URI", "http://www.my-company.com/"));
-
+
cid.extensions().subjectAlternativeName().setCopyEmail(true);
cid.extensions().subjectAlternativeName().setAlternativeNameList(list);
cid.extensions().issuerAlternativeName().setCopyIssuer(true);
cid.extensions().issuerAlternativeName().setAlternativeNameList(list);
-
+
// ---------------- create authority information extension ------------------------
-
+
std::list<AuthorityInformation> info;
- info.push_back(AuthorityInformation("OCSP",
+ info.push_back(AuthorityInformation("OCSP",
LiteralValue("URI", "http://www.my-company.com/ocsp.pl")));
- info.push_back(AuthorityInformation("caIssuers",
+ info.push_back(AuthorityInformation("caIssuers",
LiteralValue("URI", "http://www.my-company.com/caIssuer.html")));
-
+
cid.extensions().authorityInfoAccess().setAuthorityInformation(info);
// ------------------------ create CRL dist point extension -----------------------
@@ -155,7 +158,7 @@
CertificatePolicy p2;
p2.setPolicyIdentifier("1.3.6.8");
-
+
StringList slp;
slp.push_back("http://www.my-company.com/");
slp.push_back("http://www2.my-company.com/");
@@ -176,22 +179,22 @@
p.push_back(p2);
cid.extensions().certificatePolicies().setPolicies(p);
-
+
//---------------------------------------------------------------------------------
-
+
blocxx::String c = ca.issueCertificate(r, cid, E_CA_Cert);
cout << "RETURN Certificate " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/newcerts/" + c + ".pem");
-
+
cout << "Certificate exists: " << Bool(pi.exists()) << endl;
CertificateData cd = ca.getCertificate(c);
-
- StringArray ret = cd.getExtensions().dump();
- StringArray::const_iterator it;
-
+
+ std::vector<blocxx::String> ret = cd.getExtensions().dump();
+ std::vector<blocxx::String>::const_iterator it;
+
for(it = ret.begin(); it != ret.end(); ++it)
{
if((*it).startsWith("KeyID"))
@@ -203,7 +206,7 @@
cout << (*it) << endl;
}
}
-
+
cout << "DONE" << endl;
}
catch(Exception& e)
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest5.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest5.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest5.cc Sat Jun 12 14:33:19 2010
@@ -23,7 +23,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,19 +38,19 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Client_Req);
-
+
// ------------------------ Set DN --------------------------------
-
+
std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
std::list<RDNObject>::iterator dnit;
-
+
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -64,14 +64,14 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
// ------------------------ create request --------------------------------
blocxx::String r = ca.createRequest("system", rgd, E_Client_Req);
-
+
cout << "RETURN Request " << endl;
// ------------------------ get issue defaults --------------------------------
@@ -81,7 +81,7 @@
// ------------------------ create bit extension -----------------------------
cid.extensions().keyUsage().setKeyUsage(KeyUsageExt::decipherOnly);
- cid.extensions().nsCertType().setNsCertType(NsCertTypeExt::objCA |
+ cid.extensions().nsCertType().setNsCertType(NsCertTypeExt::objCA |
NsCertTypeExt::emailCA |
NsCertTypeExt::sslCA);
@@ -90,7 +90,7 @@
cid.extensions().basicConstraints().setBasicConstraints(true, 3);
// ------------------------ create alternative extension -----------------------------
-
+
std::list<LiteralValue> list;
list.push_back(LiteralValue("DNS", "ca.my-company.com"));
list.push_back(LiteralValue("DNS", "127-55-2-80ca.my-company.com"));
@@ -100,28 +100,28 @@
list.push_back(LiteralValue("1.3.6.1.4.1.311.20.2.3", "me/admin(a)MY-COMPANY.COM")); // ms_upn
list.push_back(LiteralValue("1.3.6.1.5.2.2", "me/admin(a)MY-COMPANY.COM")); // krb5PrincipalName
list.push_back(LiteralValue("IP", "2001:780:101:a00:211:11ff:fee6:a5af")); // IPv6 address
-
+
cid.extensions().subjectAlternativeName().setCopyEmail(true);
cid.extensions().subjectAlternativeName().setAlternativeNameList(list);
cid.extensions().issuerAlternativeName().setCopyIssuer(true);
cid.extensions().issuerAlternativeName().setAlternativeNameList(list);
-
+
blocxx::String c = ca.issueCertificate(r, cid, E_CA_Cert);
//sleep(10000);
-
+
cout << "RETURN Certificate " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/newcerts/" + c + ".pem");
-
+
cout << "Certificate exists: " << Bool(pi.exists()) << endl;
CertificateData cd = ca.getCertificate(c);
-
- StringArray ret = cd.getExtensions().dump();
- StringArray::const_iterator it;
-
+
+ std::vector<blocxx::String> ret = cd.getExtensions().dump();
+ std::vector<blocxx::String>::const_iterator it;
+
for(it = ret.begin(); it != ret.end(); ++it)
{
if((*it).startsWith("KeyID"))
@@ -133,7 +133,7 @@
cout << (*it) << endl;
}
}
-
+
cout << "DONE" << endl;
}
catch(Exception& e)
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest6.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest6.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest6.cc Sat Jun 12 14:33:19 2010
@@ -23,7 +23,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,19 +38,19 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Client_Req);
-
+
// ------------------------ Set DN --------------------------------
-
+
std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
std::list<RDNObject>::iterator dnit;
-
+
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -64,14 +64,14 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
// ------------------------ create request --------------------------------
blocxx::String r = ca.createRequest("system", rgd, E_Client_Req);
-
+
cout << "RETURN Request " << endl;
// ------------------------ get issue defaults --------------------------------
@@ -81,7 +81,7 @@
// ------------------------ create bit extension -----------------------------
cid.extensions().keyUsage().setKeyUsage(KeyUsageExt::decipherOnly);
- cid.extensions().nsCertType().setNsCertType(NsCertTypeExt::objCA |
+ cid.extensions().nsCertType().setNsCertType(NsCertTypeExt::objCA |
NsCertTypeExt::emailCA |
NsCertTypeExt::sslCA);
@@ -90,7 +90,7 @@
cid.extensions().basicConstraints().setBasicConstraints(true, 3);
// ------------------------ create alternative extension -----------------------------
-
+
std::list<LiteralValue> list;
list.push_back(LiteralValue("DNS", "ca.my-company.com"));
list.push_back(LiteralValue("DNS", "127-55-2-80 ca.my-company.com"));
@@ -100,28 +100,28 @@
list.push_back(LiteralValue("1.3.6.1.4.1.311.20.2.3", "me/admin(a)MY-COMPANY.COM")); // ms_upn
list.push_back(LiteralValue("1.3.6.1.5.2.2", "me/admin(a)MY-COMPANY.COM")); // krb5PrincipalName
list.push_back(LiteralValue("IP", "2001:780:101:a00:211:11ff:fee6:a5af")); // IPv6 address
-
+
cid.extensions().subjectAlternativeName().setCopyEmail(true);
cid.extensions().subjectAlternativeName().setAlternativeNameList(list);
cid.extensions().issuerAlternativeName().setCopyIssuer(true);
cid.extensions().issuerAlternativeName().setAlternativeNameList(list);
-
+
blocxx::String c = ca.issueCertificate(r, cid, E_CA_Cert);
//sleep(10000);
-
+
cout << "RETURN Certificate " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/newcerts/" + c + ".pem");
-
+
cout << "Certificate exists: " << Bool(pi.exists()) << endl;
CertificateData cd = ca.getCertificate(c);
-
- StringArray ret = cd.getExtensions().dump();
- StringArray::const_iterator it;
-
+
+ std::vector<blocxx::String> ret = cd.getExtensions().dump();
+ std::vector<blocxx::String>::const_iterator it;
+
for(it = ret.begin(); it != ret.end(); ++it)
{
if((*it).startsWith("KeyID"))
@@ -133,7 +133,7 @@
cout << (*it) << endl;
}
}
-
+
cout << "DONE" << endl;
}
catch(Exception& e)
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ConvertTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ConvertTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ConvertTest.cc Sat Jun 12 14:33:19 2010
@@ -49,21 +49,21 @@
{
ByteBuffer pem = LocalManagement::readFile("./TestRepos3/SUSERootCA/cacert.pem");
-
+
ByteBuffer der = LocalManagement::x509Convert(pem, E_PEM, E_DER);
-
+
if(der.size() > 0)
{
cout << "Got DER certificate" << endl;
}
-
+
ByteBuffer pem2 = LocalManagement::x509Convert(der, E_DER, E_PEM);
-
+
if(pem2.size() > 0)
{
cout << "Got PEM certificate" << endl;
}
-
+
if(pem == pem2)
{
cout << "correct" << endl;
@@ -74,21 +74,21 @@
{
ByteBuffer pem = LocalManagement::readFile("./TestRepos3/SUSERootCA/cacert.req");
-
+
ByteBuffer der = LocalManagement::reqConvert(pem, E_PEM, E_DER);
-
+
if(der.size() > 0)
{
cout << "Got DER request" << endl;
}
-
+
ByteBuffer pem2 = LocalManagement::reqConvert(der, E_DER, E_PEM);
-
+
if(pem2.size() > 0)
{
cout << "Got PEM request" << endl;
}
-
+
if(pem == pem2)
{
cout << "correct" << endl;
@@ -99,21 +99,21 @@
{
ByteBuffer pem = LocalManagement::readFile("./TestRepos3/SUSERootCA/crl/crl.pem");
-
+
ByteBuffer der = LocalManagement::crlConvert(pem, E_PEM, E_DER);
-
+
if(der.size() > 0)
{
cout << "Got DER CRL" << endl;
}
-
+
ByteBuffer pem2 = LocalManagement::crlConvert(der, E_DER, E_PEM);
-
+
if(pem2.size() > 0)
{
cout << "Got PEM CRL" << endl;
}
-
+
if(pem == pem2)
{
cout << "correct" << endl;
@@ -124,16 +124,16 @@
{
ByteBuffer pem = LocalManagement::readFile("./TestRepos3/SUSERootCA/cacert.key");
-
+
ByteBuffer der = LocalManagement::rsaConvert(pem, E_PEM, E_DER, "system", "");
-
+
if(der.size() > 0)
{
cout << "Got DER Key" << endl;
}
-
+
ByteBuffer pem2 = LocalManagement::rsaConvert(der, E_DER, E_PEM, "", "tralla", "aes256");
-
+
if(pem2.size() > 0)
{
cout << "Got PEM Key" << endl;
@@ -147,7 +147,7 @@
{
cout << "!!!WRONG encryption" << endl;
}
-
+
//cout << pem2.data() << endl;
}
}
@@ -158,17 +158,17 @@
ByteBuffer crt = LocalManagement::readFile("./TestRepos3/SUSERootCA/certs/01.pem");
ByteBuffer key = LocalManagement::readFile("./TestRepos3/SUSERootCA/keys/a64a6c95f2a3dc22975e13691ad8e2bb-1111160526.key");
ByteBuffer ca = LocalManagement::readFile("./TestRepos3/SUSERootCA/cacert.pem");
-
+
ByteBuffer p12 = LocalManagement::createPKCS12(crt, key, "system", "tralla",
ca, "./TestRepos3/.cas/", false);
-
+
if(p12.size() > 0)
{
cout << "Got PKCS12 data" << endl;
}
-
+
ByteBuffer pem = LocalManagement::pkcs12ToPEM(p12, "tralla", "system", "aes256");
-
+
if(pem.size() > 0)
{
cout << "Got PEM " << endl;
@@ -182,7 +182,7 @@
{
cout << "!!!WRONG encryption" << endl;
}
-
+
//cout << pem.data() << endl;
}
}
@@ -194,13 +194,13 @@
cout << "===================== Test rsaConvert Exception =====================" << endl;
-
+
try
{
ByteBuffer pem = LocalManagement::readFile("./TestRepos3/SUSERootCA/cacert.key");
-
+
ByteBuffer der = LocalManagement::rsaConvert(pem, E_PEM, E_DER, "wrong password", "");
-
+
if(der.size() > 0)
{
cout << "Got DER Key" << endl;
@@ -211,7 +211,7 @@
cout << "Got expected Exception." << endl;
cerr << "Exception:" << endl << e.getFile() << ": " << e.type() << ": " << e.getErrorCode() << ": ";
blocxx::String msg = blocxx::String(e.getMessage());
-
+
cerr << msg.tokenize("\n\r")[0] << endl << "END" << endl;
}
@@ -223,12 +223,12 @@
ByteBuffer ca = LocalManagement::readFile("./TestRepos3/SUSERootCA/cacert.pem");
ByteBuffer p12;
-
+
try
{
p12 = LocalManagement::createPKCS12(crt, key, "wrong password", "tralla",
ca, "./TestRepos3/.cas/", false);
-
+
if(p12.size() > 0)
{
cout << "Got PKCS12 data" << endl;
@@ -242,18 +242,18 @@
cerr << msg.tokenize("\n\r")[0] << endl << "END" << endl;
}
-
+
p12 = LocalManagement::createPKCS12(crt, key, "system", "tralla",
ca, "./TestRepos3/.cas/", false);
-
+
try
{
ByteBuffer pem = LocalManagement::pkcs12ToPEM(p12, "wrong password", "system", "aes256");
-
+
if(pem.size() > 0)
{
cout << "Got PEM " << endl;
-
+
PerlRegEx p("DEK-Info: AES-256-CBC");
if(p.match(pem.data()))
{
@@ -263,7 +263,7 @@
{
cout << "!!!WRONG encryption" << endl;
}
-
+
//cout << pem.data() << endl;
}
}
@@ -275,7 +275,7 @@
cerr << msg.tokenize("\n\r")[0] << endl << "END" << endl;
}
-
+
cout << "DONE" << endl;
return 0;
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ExportTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ExportTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ExportTest.cc Sat Jun 12 14:33:19 2010
@@ -44,29 +44,29 @@
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("SUSEIPsecCA", "system", "./TestRepos3/");
-
- cout << "==================== ca.exportCACert(PEM); ======================" << endl;
+
+ cout << "==================== ca.exportCACert(PEM); ======================" << endl;
ByteBuffer ba = ca.exportCACert(E_PEM);
-
+
CertificateData cd = LocalManagement::getCertificate(ba, E_PEM);
cout << "Subject: " << cd.getSubjectDN().getOpenSSLString() << endl;
- cout << "==================== ca.exportCACert(DER); ======================" << endl;
+ cout << "==================== ca.exportCACert(DER); ======================" << endl;
ba = ca.exportCACert(E_DER);
-
+
cd = LocalManagement::getCertificate(ba, E_DER);
cout << "Subject: " << cd.getSubjectDN().getOpenSSLString() << endl;
- cout << "==================== ca.exportCAKeyAsPEM(''); ======================" << endl;
+ cout << "==================== ca.exportCAKeyAsPEM(''); ======================" << endl;
ba = ca.exportCAKeyAsPEM("");
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testCAKey.key");
path::PathInfo pi("./TestRepos3/testCAKey.key");
@@ -78,7 +78,7 @@
if(!r.match(blocxx::String(ba.data(), ba.size())))
{
cout << "Key is decrypted" << endl;
-
+
path::removeFile("./TestRepos3/testCAKey.key");
}
else
@@ -87,10 +87,10 @@
}
}
- cout << "==================== ca.exportCAKeyAsPEM('tralla'); ======================" << endl;
+ cout << "==================== ca.exportCAKeyAsPEM('tralla'); ======================" << endl;
ba = ca.exportCAKeyAsPEM("tralla");
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testCAKey2.key");
pi.stat("./TestRepos3/testCAKey2.key");
@@ -98,7 +98,7 @@
if(pi.exists())
{
cout << "Key exists" << endl;
-
+
if(!r.match(blocxx::String(ba.data(), ba.size())))
{
cout << "Key is decrypted" << endl;
@@ -111,10 +111,10 @@
}
}
- cout << "==================== ca.exportCAKeyAsDER(); ======================" << endl;
+ cout << "==================== ca.exportCAKeyAsDER(); ======================" << endl;
ba = ca.exportCAKeyAsDER();
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testCAKeyDER.key");
pi.stat("./TestRepos3/testCAKeyDER.key");
@@ -122,14 +122,14 @@
if(pi.exists() && pi.size() > 1000)
{
cout << "Key exists" << endl;
-
+
path::removeFile("./TestRepos3/testCAKeyDER.key");
}
- cout << "=============== ca.exportCAasPKCS12('tralla', false); ===============" << endl;
+ cout << "=============== ca.exportCAasPKCS12('tralla', false); ===============" << endl;
ba = ca.exportCAasPKCS12("tralla", false);
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testCA.p12");
pi.stat("./TestRepos3/testCA.p12");
@@ -137,14 +137,14 @@
if(pi.exists() && pi.size() > 2500)
{
cout << "Certificate exists" << endl;
-
+
path::removeFile("./TestRepos3/testCA.p12");
}
- cout << "================= ca.exportCAasPKCS12('tralla', true); =================" << endl;
+ cout << "================= ca.exportCAasPKCS12('tralla', true); =================" << endl;
ba = ca.exportCAasPKCS12("tralla", true);
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testCAChain.p12");
pi.stat("./TestRepos3/testCAChain.p12");
@@ -152,33 +152,33 @@
if(pi.exists() && pi.size() > 5400)
{
cout << "Certificate exists" << endl;
-
+
path::removeFile("./TestRepos3/testCAChain.p12");
}
CA ca2("SUSEUserCA", "system", "./TestRepos3/");
- cout << "==================== ca.exportCertificate(PEM); ======================" << endl;
+ cout << "==================== ca.exportCertificate(PEM); ======================" << endl;
ba = ca2.exportCertificate("04:9528e1d8783f83b662fca6085a8c1467-1111161258", E_PEM);
-
+
cd = LocalManagement::getCertificate(ba, E_PEM);
cout << "Subject: " << cd.getSubjectDN().getOpenSSLString() << endl;
- cout << "==================== ca.exportCertificate(DER); ======================" << endl;
+ cout << "==================== ca.exportCertificate(DER); ======================" << endl;
ba = ca2.exportCertificate("04:9528e1d8783f83b662fca6085a8c1467-1111161258", E_DER);
-
+
cd = LocalManagement::getCertificate(ba, E_DER);
cout << "Subject: " << cd.getSubjectDN().getOpenSSLString() << endl;
- cout << "================== ca.exportCertificateKeyAsPEM(decr); ===================" << endl;
+ cout << "================== ca.exportCertificateKeyAsPEM(decr); ===================" << endl;
ba = ca2.exportCertificateKeyAsPEM("04:9528e1d8783f83b662fca6085a8c1467-1111161258",
"system", "");
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testKey.key");
pi.stat("./TestRepos3/testKey.key");
@@ -186,11 +186,11 @@
if(pi.exists())
{
cout << "Key exists" << endl;
-
+
if(!r.match(blocxx::String(ba.data(), ba.size())))
{
cout << "Key is decrypted" << endl;
-
+
path::removeFile("./TestRepos3/testKey.key");
}
@@ -200,11 +200,11 @@
}
}
- cout << "============ ca.exportexportCertificateKeyAsPEM('tralla'); =============" << endl;
+ cout << "============ ca.exportexportCertificateKeyAsPEM('tralla'); =============" << endl;
ba = ca2.exportCertificateKeyAsPEM("04:9528e1d8783f83b662fca6085a8c1467-1111161258",
"system", "tralla");
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testKey2.key");
pi.stat("./TestRepos3/testKey2.key");
@@ -212,11 +212,11 @@
if(pi.exists())
{
cout << "Key exists" << endl;
-
+
if(!r.match(blocxx::String(ba.data(), ba.size())))
{
cout << "Key is decrypted" << endl;
-
+
}
else
{
@@ -226,11 +226,11 @@
}
}
- cout << "==================== ca.exportCertificateKeyAsDER(); ======================" << endl;
+ cout << "==================== ca.exportCertificateKeyAsDER(); ======================" << endl;
ba = ca2.exportCertificateKeyAsDER("04:9528e1d8783f83b662fca6085a8c1467-1111161258",
"system");
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testKeyDER.key");
pi.stat("./TestRepos3/testKeyDER.key");
@@ -238,15 +238,15 @@
if(pi.exists() && pi.size() > 1000)
{
cout << "Key exists" << endl;
-
+
path::removeFile("./TestRepos3/testKeyDER.key");
}
- cout << "============= ca.exportCertificateAsPKCS12(..., false); ==================" << endl;
+ cout << "============= ca.exportCertificateAsPKCS12(..., false); ==================" << endl;
ba = ca2.exportCertificateAsPKCS12("04:9528e1d8783f83b662fca6085a8c1467-1111161258",
"system", "tralla", false);
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testCert.p12");
pi.stat("./TestRepos3/testCert.p12");
@@ -254,15 +254,15 @@
if(pi.exists() && pi.size() > 2500)
{
cout << "Certificate exists" << endl;
-
+
path::removeFile("./TestRepos3/testCert.p12");
}
-
- cout << "=============== ca.exportCertificateAsPKCS12(..., true); ================" << endl;
+
+ cout << "=============== ca.exportCertificateAsPKCS12(..., true); ================" << endl;
ba = ca2.exportCertificateAsPKCS12("04:9528e1d8783f83b662fca6085a8c1467-1111161258",
"system", "tralla", true);
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testCertChain.p12");
pi.stat("./TestRepos3/testCertChain.p12");
@@ -270,22 +270,22 @@
if(pi.exists() && pi.size() > 5400)
{
cout << "Certificate exists" << endl;
-
+
path::removeFile("./TestRepos3/testCertChain.p12");
}
-
- cout << "==================== ca.exportCRL(PEM); ======================" << endl;
-
+
+ cout << "==================== ca.exportCRL(PEM); ======================" << endl;
+
ba = ca2.exportCRL(E_PEM);
-
+
CRLData crl = LocalManagement::getCRL(ba, E_PEM);
cout << "Issuer: " << crl.getIssuerDN().getOpenSSLString() << endl;
- cout << "==================== ca.exportCRL(DER); ======================" << endl;
-
+ cout << "==================== ca.exportCRL(DER); ======================" << endl;
+
ba = ca2.exportCRL(E_DER);
-
+
crl = LocalManagement::getCRL(ba, E_DER);
cout << "Issuer: " << crl.getIssuerDN().getOpenSSLString() << endl;
@@ -296,7 +296,7 @@
{
cerr << e << endl;
}
-
+
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/IPv6CheckTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/IPv6CheckTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/IPv6CheckTest.cc Sat Jun 12 14:33:19 2010
@@ -25,7 +25,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -40,12 +40,12 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
cout << "=================== start Test ======================" << endl;
ValueCheck check = initIP6Check();
- blocxx::StringArray iparr ;
+ std::vector<blocxx::String> iparr ;
iparr.push_back("2001:780:101:a00:211:11ff:fee6:a5af");
iparr.push_back("fe80::211:11ff:fee6:a5af");
iparr.push_back("2001::a5af");
@@ -68,7 +68,7 @@
cout << *ip_it << " => is not valid" << endl;
}
}
-
+
cout << "DONE" << endl;
}
catch(Exception& e)
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ImportCommonCertificateTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ImportCommonCertificateTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ImportCommonCertificateTest.cc Sat Jun 12 14:33:19 2010
@@ -41,14 +41,14 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca2("SUSEUserCA", "system", "./TestRepos3/");
-
- cout << "============ ca.exportCertificateAsPKCS12(..., false); ===========" << endl;
-
+
+ cout << "============ ca.exportCertificateAsPKCS12(..., false); ===========" << endl;
+
ByteBuffer ba = ca2.exportCertificateAsPKCS12("04:9528e1d8783f83b662fca6085a8c1467-1111161258",
"system", "tralla", false);
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testCert.p12");
path::PathInfo pi("./TestRepos3/testCert.p12");
@@ -56,8 +56,8 @@
{
cout << "Certificate exists" << endl;
}
-
- cout << "================= importAsLocalCertificate() ==================" << endl;
+
+ cout << "================= importAsLocalCertificate() ==================" << endl;
LocalManagement::importAsLocalCertificate(ba,
"tralla",
@@ -99,11 +99,11 @@
path::removeFile("./TestRepos3/testCert.p12");
- cout << "============ ca.exportCertificateAsPKCS12(..., true); ============" << endl;
+ cout << "============ ca.exportCertificateAsPKCS12(..., true); ============" << endl;
ba = ca2.exportCertificateAsPKCS12("04:9528e1d8783f83b662fca6085a8c1467-1111161258",
"system", "tralla", true);
-
+
LocalManagement::writeFile(ba, "./TestRepos3/testCertChain.p12");
pi.stat("./TestRepos3/testCertChain.p12");
@@ -112,32 +112,32 @@
cout << "Certificate exists" << endl;
}
- cout << "================ importAsLocalCertificate(Chain) ==================" << endl;
+ cout << "================ importAsLocalCertificate(Chain) ==================" << endl;
LocalManagement::importAsLocalCertificate(pi.toString(),
"tralla",
"./TestRepos3/localTest/certs2/",
"./TestRepos3/localTest/servercerts/servercert2.pem",
"./TestRepos3/localTest/servercerts/serverkey2.pem");
-
+
pi.stat("./TestRepos3/localTest/servercerts/servercert2.pem");
if(pi.exists())
{
cout << "servercert.pem exists" << endl;
}
-
+
pi.stat("./TestRepos3/localTest/servercerts/serverkey2.pem");
if(pi.exists() && pi.hasPerm(0600))
{
cout << "serverkey.pem exists and has permissions 0600" << endl;
}
-
+
pi.stat("./TestRepos3/localTest/certs2/YaST-CA.pem");
if(pi.exists())
{
cout << "CA exists" << endl;
}
-
+
pi.stat("./TestRepos3/localTest/certs2/YaST-CA-0.pem");
if(pi.exists())
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ImportRequestTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ImportRequestTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ImportRequestTest.cc Sat Jun 12 14:33:19 2010
@@ -23,7 +23,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,14 +38,14 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
cout << "=================== start ImportRequestTest ======================" << endl;
{
CA ca("Test_CA1", "system", "./TestRepos/");
blocxx::String name = ca.importRequest(blocxx::String("./TestRepos/importRequestTest.req"),
E_PEM);
-
+
path::PathInfo pi("./TestRepos/Test_CA1/req/" + name + ".req");
if(pi.exists())
{
@@ -56,7 +56,7 @@
name = ca.importRequest(blocxx::String("./TestRepos/c293624b6a877f401407ce8f8f1f327e.req"),
E_PEM);
-
+
path::PathInfo pi2("./TestRepos/Test_CA1/req/" + name + ".req");
if(pi2.exists())
{
@@ -66,7 +66,7 @@
name = ca.importRequest(blocxx::String("./TestRepos/importRequestTest-DER.req"),
E_DER);
-
+
path::PathInfo pi3("./TestRepos/Test_CA1/req/" + name + ".req");
if(pi3.exists())
{
@@ -75,7 +75,7 @@
}
cout << "=================== end ImportRequestTest ========================" << endl;
-
+
cout << "DONE" << endl;
}
catch(blocxx::Exception& e)
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ListCATreeTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ListCATreeTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ListCATreeTest.cc Sat Jun 12 14:33:19 2010
@@ -22,7 +22,7 @@
try
{
cout << "START" << endl;
-
+
// Logging
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"ListCATreeTest",
@@ -31,15 +31,15 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
cout << "=================== start CA Tree List ======================" << endl;
- std::list<Array<blocxx::String> > tree = CA::getCATree("./TestRepos3/");
- std::list<Array<blocxx::String> >::const_iterator it_ext;
+ std::list<std::vector<blocxx::String> > tree = CA::getCATree("./TestRepos3/");
+ std::list<std::vector<blocxx::String> >::const_iterator it_ext;
for(it_ext = tree.begin(); it_ext != tree.end(); ++it_ext)
{
- Array<blocxx::String>::const_iterator it_int;
+ std::vector<blocxx::String>::const_iterator it_int;
for(it_int = (*it_ext).begin(); it_int != (*it_ext).end(); ++it_int)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ListTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ListTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ListTest.cc Sat Jun 12 14:33:19 2010
@@ -14,6 +14,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -24,7 +27,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -39,15 +42,15 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
cout << "=================== start getRequestList ======================" << endl;
{
CA ca("Test_CA2", "system", "./TestRepos/");
- Array<map<blocxx::String, blocxx::String> > ret;
+ std::vector< std::map<blocxx::String, blocxx::String> > ret;
ret = ca.getRequestList();
-
- Array<map<blocxx::String, blocxx::String> >::const_iterator it;
+
+ std::vector< std::map<blocxx::String, blocxx::String> >::const_iterator it;
for(it = ret.begin(); it != ret.end(); ++it)
{
@@ -60,7 +63,7 @@
if((*it2).first == "date")
{
PerlRegEx r("^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)\\s(\\d\\d):(\\d\\d):(\\d\\d)");
- StringArray sa = r.capture( (*it2).second );
+ std::vector<blocxx::String> sa = convStringArray(r.capture( (*it2).second ));
if(sa.size() == 7)
{
@@ -85,11 +88,11 @@
cout << "=================== start getCertificateList ==================" << endl;
{
CA ca2("Test_CA2", "system", "./TestRepos/");
-
- Array<map<blocxx::String, blocxx::String> > ret;
+
+ std::vector<map<blocxx::String, blocxx::String> > ret;
ret = ca2.getCertificateList();
-
- Array<map<blocxx::String, blocxx::String> >::const_iterator it = ret.begin();
+
+ std::vector<map<blocxx::String, blocxx::String> >::const_iterator it = ret.begin();
for(it = ret.begin(); it != ret.end(); ++it)
{
@@ -105,7 +108,7 @@
cout << "getCertificateList successfully executed" << endl;
}
cout << "=================== end List tests ========================" << endl;
-
+
cout << "DONE" << endl;
}
catch(blocxx::Exception& e)
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCATest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCATest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCATest.cc Sat Jun 12 14:33:19 2010
@@ -23,7 +23,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,33 +38,33 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
cout << "=================== start ParseCATest ======================" << endl;
{
CA ca("Test_CA2", "system", "./TestRepos/");
CertificateData cd = ca.getCA();
- Array<blocxx::String> ret = cd.dump();
+ std::vector<blocxx::String> ret = cd.dump();
- Array<blocxx::String>::const_iterator it;
+ std::vector<blocxx::String>::const_iterator it;
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
cout << (*it) << endl;
}
cout << "=================== call verify ======================" << endl;
ret = cd.verify();
-
+
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
cout << (*it) << endl;
}
}
cout << "=================== end ParseCATest ========================" << endl;
-
+
cout << "DONE" << endl;
}
catch(blocxx::Exception& e)
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCRLTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCRLTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCRLTest.cc Sat Jun 12 14:33:19 2010
@@ -12,6 +12,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -19,13 +22,13 @@
int main(int argc, char **argv)
{
-
+
if ( argc != 2 )
{
cerr << "Usage: ParseCRLTest <filepath>" << endl;
exit( 1 );
}
-
+
// Logging
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"ParseCRLTest",
@@ -34,7 +37,7 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
blocxx::String file = argv[ 1 ];
cout << "START" << endl;
@@ -46,42 +49,42 @@
cerr << "Unable to load '" << file << "'" << endl;
exit( 2 );
}
-
+
while( in )
- {
+ {
try
- {
+ {
blocxx::String line = blocxx::String::getLine( in );
if(line == "EOF" || line.empty()) break;
- StringArray params = blocxx::PerlRegEx("\\s").split(line);
+ std::vector<blocxx::String> params = convStringArray(blocxx::PerlRegEx("\\s").split(line));
if(params.size() != 2) break;
CA ca(params[1], "system", params[0]);
-
+
cout << "Parse CRL in " << params[0] << "/" << params[1] << endl;
CRLData crl = ca.getCRL();
cout << "got the data" << endl;
- StringArray ret = crl.dump();
+ std::vector<blocxx::String> ret = crl.dump();
cout << "dump the data" << endl;
StringArray::const_iterator it;
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
cout << (*it) << endl;
}
cout << "=================== call verify ======================" << endl;
ret = crl.verify();
-
+
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
cout << "> " << (*it) << endl;
}
@@ -93,7 +96,7 @@
cerr << e << endl;
}
}
-
+
cout << "DONE" << endl;
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCertificateTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCertificateTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCertificateTest.cc Sat Jun 12 14:33:19 2010
@@ -12,6 +12,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -19,13 +22,13 @@
int main(int argc, char **argv)
{
-
+
if ( argc != 2 )
{
cerr << "Usage: ParseCertificateTest <filepath>" << endl;
exit( 1 );
}
-
+
// Logging
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"ParseCertificateTest",
@@ -34,9 +37,9 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
blocxx::String file = argv[ 1 ];
-
+
cout << "START" << endl;
cout << "file: " << file << endl;
@@ -46,37 +49,37 @@
cerr << "Unable to load '" << file << "'" << endl;
exit( 2 );
}
-
+
while( in )
{
try
- {
+ {
blocxx::String line = blocxx::String::getLine( in );
if(line == "EOF" || line.empty()) break;
- StringArray params = blocxx::PerlRegEx("\\s").split(line);
+ std::vector<blocxx::String> params = convStringArray(blocxx::PerlRegEx("\\s").split(line));
if(params.size() != 2) break;
CA ca(params[0], "system", "./TestRepos/");
-
+
cout << "Parse " << params[1] << " in " << params[0] << endl;
CertificateData cd = ca.getCertificate(params[1]);
-
- StringArray ret = cd.dump();
+
+ std::vector<blocxx::String> ret = cd.dump();
StringArray::const_iterator it;
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
cout << (*it) << endl;
}
cout << "=================== call verify ======================" << endl;
ret = cd.verify();
-
+
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
cout << "> " << (*it) << endl;
}
@@ -88,7 +91,7 @@
cerr << e << endl;
}
}
-
+
cout << "DONE" << endl;
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCertificateTest2.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCertificateTest2.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseCertificateTest2.cc Sat Jun 12 14:33:19 2010
@@ -13,6 +13,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -20,13 +23,13 @@
int main(int argc, char **argv)
{
-
+
if ( argc != 2 )
{
cerr << "Usage: ParseCertificateTest2 <filepath>" << endl;
exit( 1 );
}
-
+
// Logging
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"ParseCertificateTest2",
@@ -35,9 +38,9 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
blocxx::String file = argv[ 1 ];
-
+
cout << "START" << endl;
cout << "file: " << file << endl;
@@ -47,40 +50,40 @@
cerr << "Unable to load '" << file << "'" << endl;
exit( 2 );
}
-
+
while( in )
{
try
- {
+ {
blocxx::String line = blocxx::String::getLine( in );
if(line == "EOF" || line.empty()) break;
- StringArray params = blocxx::PerlRegEx("\\s").split(line);
+ std::vector<blocxx::String> params = convStringArray(blocxx::PerlRegEx("\\s").split(line));
if(params.size() != 2) break;
-
+
cout << "Parse " << params[0] << " Format:" << params[1] <<endl;
FormatType t = E_PEM;
if(params[1] == "DER")
t = E_DER;
-
+
CertificateData cd = LocalManagement::getCertificate(params[0], t);
-
- StringArray ret = cd.dump();
+
+ std::vector<blocxx::String> ret = cd.dump();
StringArray::const_iterator it;
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
cout << (*it) << endl;
}
cout << "=================== call verify ======================" << endl;
ret = cd.verify();
-
+
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
cout << "> " << (*it) << endl;
}
@@ -92,7 +95,7 @@
cerr << e << endl;
}
}
-
+
cout << "DONE" << endl;
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseRequestTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseRequestTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ParseRequestTest.cc Sat Jun 12 14:33:19 2010
@@ -12,6 +12,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -19,13 +22,13 @@
int main(int argc, char **argv)
{
-
+
if ( argc != 2 )
{
cerr << "Usage: ParseRequestTest <filepath>" << endl;
exit( 1 );
}
-
+
// Logging
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"ParseRequestTest",
@@ -34,9 +37,9 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
blocxx::String file = argv[ 1 ];
-
+
cout << "START" << endl;
cout << "file: " << file << endl;
@@ -46,51 +49,51 @@
cerr << "Unable to load '" << file << "'" << endl;
exit( 2 );
}
-
+
while( in )
- {
+ {
try
- {
+ {
blocxx::String line = blocxx::String::getLine( in );
if(line == "EOF" || line.empty()) break;
- StringArray params = blocxx::PerlRegEx("\\s").split(line);
+ std::vector<blocxx::String> params = convStringArray(blocxx::PerlRegEx("\\s").split(line));
if(params.size() != 2) break;
CA ca(params[0], "system", "./TestRepos/");
-
+
cout << "Parse " << params[1] << " in " << params[0] << endl;
RequestData cd = ca.getRequest(params[1]);
- StringArray ret = cd.dump();
+ std::vector<blocxx::String> ret = cd.dump();
StringArray::const_iterator it;
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
cout << (*it) << endl;
}
cout << "=================== call verify ======================" << endl;
ret = cd.verify();
-
+
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
cout << "> " << (*it) << endl;
}
cout << cd.getRequestAsText() << endl;
cout << cd.getExtensionsAsText() << endl;
-
+
}
catch(Exception& e)
{
cerr << e << endl;
}
}
-
+
cout << "DONE" << endl;
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveCertificateTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveCertificateTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveCertificateTest.cc Sat Jun 12 14:33:19 2010
@@ -13,6 +13,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -23,7 +26,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,23 +41,23 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
cout << "=================== start ======================" << endl;
{
CA ca("Test_CA1", "system", "./TestRepos/");
- Array<map<blocxx::String, blocxx::String> > ret;
+ std::vector<map<blocxx::String, blocxx::String> > ret;
ret = ca.getCertificateList();
- Array<map<blocxx::String, blocxx::String> >::const_iterator it;
+ std::vector<map<blocxx::String, blocxx::String> >::const_iterator it;
int i = 0;
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
blocxx::String certificateName = (*((*it).find("certificate"))).second;
blocxx::String state = (*((*it).find("status"))).second;
PerlRegEx p("^([[:xdigit:]]+):([[:xdigit:]]+[\\d-]*)$");
- StringArray sa = p.capture(certificateName);
+ std::vector<blocxx::String> sa = convStringArray(p.capture(certificateName));
if(sa.size() != 3)
{
@@ -67,13 +70,13 @@
//cerr << "i == " << i << " State == " << state << endl;
-
+
if(i == 1 && state != "Valid")
{
path::PathInfo certFile("./TestRepos/Test_CA1/newcerts/" +
certificateName + ".pem");
if(certFile.exists())
- {
+ {
ca.deleteCertificate(certificateName);
certFile.stat();
@@ -119,9 +122,9 @@
path::PathInfo certFile("./TestRepos/Test_CA1/newcerts/" +
certificateName + ".pem");
if(certFile.exists())
- {
+ {
ca.deleteCertificate(certificateName, false);
-
+
certFile.stat();
if(!certFile.exists())
{
@@ -169,7 +172,7 @@
try
{
ca.deleteCertificate(certificateName, false);
-
+
certFile.stat();
if(!certFile.exists())
{
@@ -196,14 +199,14 @@
continue;
}
}
- }
+ }
cout << "DONE" << endl;
}
catch(Exception& e)
{
cerr << e << endl;
}
-
+
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveRequestTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveRequestTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveRequestTest.cc Sat Jun 12 14:33:19 2010
@@ -23,7 +23,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,16 +38,16 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
cout << "=================== start ======================" << endl;
{
CA ca("Test_CA1", "system", "./TestRepos/");
- Array<map<blocxx::String, blocxx::String> > ret;
+ std::vector<map<blocxx::String, blocxx::String> > ret;
ret = ca.getRequestList();
blocxx::String requestName = (*(ret[0].find("request"))).second;
-
+
path::PathInfo reqFile("./TestRepos/Test_CA1/req/" + requestName + ".req");
if(reqFile.exists())
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RequestTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RequestTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RequestTest.cc Sat Jun 12 14:33:19 2010
@@ -12,6 +12,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -22,7 +25,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -37,7 +40,7 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
@@ -47,7 +50,7 @@
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -61,21 +64,21 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
-
+
// ------------------------ create netscape extension -----------------------------
-
+
rgd.extensions().nsSslServerName().setValue("*.my-company.com");
rgd.extensions().nsComment().setValue("My Company Certificate");
// ------------------------ create bit extension -----------------------------
-
+
rgd.extensions().keyUsage().setKeyUsage(KeyUsageExt::digitalSignature);
rgd.extensions().nsCertType().setNsCertType(NsCertTypeExt::client |
NsCertTypeExt::email);
-
+
rgd.extensions().basicConstraints().setPresent(false);
StringList sl;
@@ -83,28 +86,28 @@
sl.push_back("2.12.10.39");
rgd.extensions().extendedKeyUsage().setExtendedKeyUsage( sl );
-
+
std::list<LiteralValue> list;
list.push_back(LiteralValue("email", "me(a)my-company.com"));
list.push_back(LiteralValue("URI", "http://www.my-company.com/"));
-
+
rgd.extensions().subjectAlternativeName().setCopyEmail(true);
rgd.extensions().subjectAlternativeName().setAlternativeNameList(list);
-
-
+
+
blocxx::String r = ca.createRequest("system", rgd, E_Server_Req);
-
+
cout << "RETURN Request " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/req/" + r + ".req");
-
+
cout << "Request exists: " << Bool(pi.exists()) << endl;
RequestData rd = ca.getRequest(r);
- StringArray ret = rd.getExtensions().dump();
- StringArray::const_iterator it;
-
+ std::vector<blocxx::String> ret = rd.getExtensions().dump();
+ std::vector<blocxx::String>::const_iterator it;
+
for(it = ret.begin(); it != ret.end(); ++it)
{
if((*it).startsWith("KeyID"))
@@ -116,7 +119,7 @@
cout << (*it) << endl;
}
}
-
+
cout << "DONE" << endl;
}
catch(Exception& e)
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest.cc Sat Jun 12 14:33:19 2010
@@ -12,6 +12,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -22,13 +25,13 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
cat.push_back("INFO");
//cat.push_back("DEBUG");
-
+
// Logging
LoggerRef l = ca_mgm::Logger::createCerrLogger(
"RevokeTest",
@@ -37,17 +40,17 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
list<RDNObject> dnl = rgd.getSubjectDN().getDN();
list<RDNObject>::iterator dnit;
-
+
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
- {
+ {
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -60,7 +63,7 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
@@ -71,7 +74,7 @@
cout << "RETURN Certificate " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/newcerts/" + c + ".pem");
-
+
cout << "Certificate exists: " << Bool(pi.exists()) << endl;
cout << "Try to revoke it" << endl;
@@ -79,7 +82,7 @@
ca.revokeCertificate(c);
PerlRegEx r0("^([0-9a-fA-F]+):.*");
- StringArray serial = r0.capture(c);
+ std::vector<blocxx::String> serial = convStringArray(r0.capture(c));
ifstream in ("./TestRepos/Test_CA1/index.txt");
@@ -95,14 +98,14 @@
{
cout << "Found revoked certificate " << endl;
}
-
+
if(line.empty()) break;
}
cout << "Create a CRL" << endl;
CRLGenerationData cgd = ca.getCRLDefaults();
-
+
ca.createCRL(cgd);
path::PathInfo pi2("./TestRepos/Test_CA1/crl/crl.pem");
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest2.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest2.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest2.cc Sat Jun 12 14:33:19 2010
@@ -13,6 +13,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -23,7 +26,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,17 +41,17 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
list<RDNObject> dnl = rgd.getSubjectDN().getDN();
list<RDNObject>::iterator dnit;
-
+
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -62,7 +65,7 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
@@ -73,7 +76,7 @@
cout << "RETURN Certificate " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/newcerts/" + c + ".pem");
-
+
cout << "Certificate exists: " << Bool(pi.exists()) << endl;
cout << "Try to revoke it" << endl;
@@ -84,7 +87,7 @@
ca.revokeCertificate(c, reason);
PerlRegEx r0("^([0-9a-fA-F]+):.*");
- StringArray serial = r0.capture(c);
+ std::vector<blocxx::String> serial = convStringArray(r0.capture(c));
ifstream in ("./TestRepos/Test_CA1/index.txt");
@@ -101,14 +104,14 @@
{
cout << "Found revoked certificate " << endl;
}
-
+
if(line.empty()) break;
}
cout << "Create a CRL" << endl;
CRLGenerationData cgd = ca.getCRLDefaults();
-
+
ca.createCRL(cgd);
path::PathInfo pi2("./TestRepos/Test_CA1/crl/crl.pem");
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest3.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest3.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest3.cc Sat Jun 12 14:33:19 2010
@@ -13,6 +13,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -23,7 +26,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,17 +41,17 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
list<RDNObject> dnl = rgd.getSubjectDN().getDN();
list<RDNObject>::iterator dnit;
-
+
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -62,7 +65,7 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
@@ -73,7 +76,7 @@
cout << "RETURN Certificate " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/newcerts/" + c + ".pem");
-
+
cout << "Certificate exists: " << Bool(pi.exists()) << endl;
cout << "Try to revoke it" << endl;
@@ -84,7 +87,7 @@
ca.revokeCertificate(c, reason);
PerlRegEx r0("^([0-9a-fA-F]+):.*");
- StringArray serial = r0.capture(c);
+ std::vector<blocxx::String> serial = convStringArray(r0.capture(c));
ifstream in ("./TestRepos/Test_CA1/index.txt");
@@ -101,14 +104,14 @@
{
cout << "Found revoked certificate " << endl;
}
-
+
if(line.empty()) break;
}
cout << "Create a CRL" << endl;
-
+
CRLGenerationData cgd = ca.getCRLDefaults();
-
+
ca.createCRL(cgd);
path::PathInfo pi2("./TestRepos/Test_CA1/crl/crl.pem");
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest4.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest4.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest4.cc Sat Jun 12 14:33:19 2010
@@ -13,6 +13,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -23,7 +26,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,17 +41,17 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
list<RDNObject> dnl = rgd.getSubjectDN().getDN();
list<RDNObject>::iterator dnit;
-
+
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -62,7 +65,7 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
@@ -73,7 +76,7 @@
cout << "RETURN Certificate " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/newcerts/" + c + ".pem");
-
+
cout << "Certificate exists: " << Bool(pi.exists()) << endl;
cout << "Try to revoke it" << endl;
@@ -84,7 +87,7 @@
ca.revokeCertificate(c, reason);
PerlRegEx r0("^([0-9a-fA-F]+):.*");
- StringArray serial = r0.capture(c);
+ std::vector<blocxx::String> serial = convStringArray(r0.capture(c));
ifstream in ("./TestRepos/Test_CA1/index.txt");
@@ -101,14 +104,14 @@
{
cout << "Found revoked certificate " << endl;
}
-
+
if(line.empty()) break;
}
cout << "Create a CRL" << endl;
CRLGenerationData cgd = ca.getCRLDefaults();
-
+
ca.createCRL(cgd);
path::PathInfo pi2("./TestRepos/Test_CA1/crl/crl.pem");
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest5.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest5.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest5.cc Sat Jun 12 14:33:19 2010
@@ -13,6 +13,9 @@
#include <fstream>
#include <unistd.h>
+// FIXME: need to be removed
+#include <Utils.hpp>
+
using namespace blocxx;
using namespace ca_mgm;
@@ -23,7 +26,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,17 +41,17 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
std::list<RDNObject>::iterator dnit;
-
+
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -62,7 +65,7 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
@@ -73,7 +76,7 @@
cout << "RETURN Certificate " << endl;
path::PathInfo pi("./TestRepos/Test_CA1/newcerts/" + c + ".pem");
-
+
cout << "Certificate exists: " << Bool(pi.exists()) << endl;
cout << "Try to revoke it" << endl;
@@ -84,7 +87,7 @@
ca.revokeCertificate(c, reason);
PerlRegEx r0("^([0-9a-fA-F]+):.*");
- StringArray serial = r0.capture(c);
+ std::vector<blocxx::String> serial = convStringArray(r0.capture(c));
ifstream in ("./TestRepos/Test_CA1/index.txt");
@@ -101,14 +104,14 @@
{
cout << "Found revoked certificate " << endl;
}
-
+
if(line.empty()) break;
}
cout << "Create a CRL" << endl;
CRLGenerationData cgd = ca.getCRLDefaults();
-
+
ca.createCRL(cgd);
path::PathInfo pi2("./TestRepos/Test_CA1/crl/crl.pem");
@@ -122,7 +125,7 @@
{
cerr << e << endl;
}
-
+
return 0;
}
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/SubCATest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/SubCATest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/SubCATest.cc Sat Jun 12 14:33:19 2010
@@ -22,7 +22,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -37,17 +37,17 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_CA_Req);
list<RDNObject> dnl = rgd.getSubjectDN().getDN();
list<RDNObject>::iterator dnit;
-
+
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
cout << "DN Key " << (*dnit).getType() << endl;
-
+
if((*dnit).getType() == "countryName")
{
(*dnit).setRDNValue("DE");
@@ -61,12 +61,12 @@
(*dnit).setRDNValue("suse(a)suse.de");
}
}
-
+
DNObject dn(dnl);
rgd.setSubjectDN(dn);
CertificateIssueData cid = ca.getIssueDefaults(E_CA_Cert);
- cid.setCertifyPeriode(cid.getStartDate(),
+ cid.setCertifyPeriode(cid.getStartDate(),
cid.getStartDate() + 63072000); // startDate + 2 Years
ca.createSubCA("SubCA_Test", "system", rgd, cid);
@@ -76,7 +76,7 @@
path::PathInfo pi2("./TestRepos/SubCA_Test/cacert.pem");
cout << "Sub CA exists: " << Bool(pi2.exists()) << endl;
-
+
cout << "DONE" << endl;
}
catch(Exception& e)
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt Sat Jun 12 14:33:19 2010
@@ -1,14 +1,14 @@
-b4d4e48e6de644c953290eb2854a6ced-1275584668 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-bc5324c7f5c2a27492fb6795745b596b-1275584670 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1275584675 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1275584677 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1275584680 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1275584689 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c293624b6a877f401407ce8f8f1f327e-1275584690 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1275584692 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c1943ae4b9bd7320fae3e29f217483e3-1275584693 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
-d816690a832b0e52becd255d3a62e975-1275584696 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-9198f6798d9da70d7cbfb67b610633f5-1275584698 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-3e248858337c2b46dc67a0f9389376dd-1275584699 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-bf04fdd95062554800c1556085f47063-1275584700 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-9797ac11af29f94b82c1e5b0499ab5f2-1275584702 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276345591 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+bc5324c7f5c2a27492fb6795745b596b-1276345594 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276345599 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276345604 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1276345607 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276345618 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c293624b6a877f401407ce8f8f1f327e-1276345619 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1276345620 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c1943ae4b9bd7320fae3e29f217483e3-1276345621 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
+d816690a832b0e52becd255d3a62e975-1276345626 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+9198f6798d9da70d7cbfb67b610633f5-1276345628 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+3e248858337c2b46dc67a0f9389376dd-1276345629 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+bf04fdd95062554800c1556085f47063-1276345630 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+9797ac11af29f94b82c1e5b0499ab5f2-1276345633 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt Sat Jun 12 14:33:19 2010
@@ -1,11 +1,11 @@
-V 110603170430Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110603170430Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110603170432Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110603170435Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110603170438Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-R 110603170454Z 100603170456Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
-R 110603170456Z 100603170457Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-R 110603170458Z 100603170458Z,keyTime,20100603184818Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-R 110603170459Z 100603170500Z,CAkeyTime,20100603184820Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-R 110603170500Z 100603170501Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-V 120602170502Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+V 110612122634Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110612122634Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110612122637Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110612122641Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110612122645Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+R 110612122704Z 100612122706Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
+R 110612122706Z 100612122707Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+R 110612122708Z 100612122708Z,keyTime,20100612141028Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+R 110612122709Z 100612122709Z,CAkeyTime,20100612141029Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+R 110612122710Z 100612122712Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+V 120611122713Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
Binary files - no diff available.
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem Sat Jun 12 14:33:19 2010
@@ -1,7 +1,7 @@
-----BEGIN X509 CRL-----
MIIC+TCCAeECAQEwDQYJKoZIhvcNAQEFBQAwQzELMAkGA1UEBhMCREUxFzAVBgNV
BAMTDlN0YXRpYyBUZXN0IENBMRswGQYJKoZIhvcNAQkBFgxzdXNlQHN1c2UuZGUX
-DTEwMDYwMzE3MDUwNVoXDTEwMDYwNDE3MDUwNVowgfAwEgIBAxcNMDUwODE4MTQx
+DTEwMDYxMjEyMjcxNVoXDTEwMDYxMzEyMjcxNVowgfAwEgIBAxcNMDUwODE4MTQx
MzIzWjAyAgEEFw0wNTA4MTgxNDEzMjVaMB4wCgYDVR0VBAMKAQYwEAYDVR0XBAkG
ByqGSM44AgIwOgIBBRcNMDUwODE4MTQxMzI2WjAmMAoGA1UdFQQDCgEBMBgGA1Ud
GAQRGA8yMDA1MDgxODE1NTY0NlowOgIBBhcNMDUwODE4MTQxMzI4WjAmMAoGA1Ud
@@ -9,10 +9,10 @@
ODE4WjAaMAoGA1UdFQQDCgEGMAwGA1UdFwQFBgMuFSugdzB1MHMGA1UdIwRsMGqA
FDIAwASkKojCPsrVvdhM01KIIH87oUekRTBDMQswCQYDVQQGEwJERTEXMBUGA1UE
AxMOU3RhdGljIFRlc3QgQ0ExGzAZBgkqhkiG9w0BCQEWDHN1c2VAc3VzZS5kZYIJ
-AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQAQJKi8C1+8hxF9JGSIpSVyZv7W
-99HoxQBFku3tg5XQVfI3z4JQ6d0c2trrogvdZ2TnYJexY9IrKSLf4HcJlQ2TBwmb
-UD7xIv2kgdJnzO64BXD6POqfwXKgLTw5qtKNuM2JPaKebjvWGHAmn84uYWIY3DVC
-8bR4M5+LCr/h5zjP/Ta1O697Q8g2z8o6ZfsQJdrbFWFW3pw3mXkFYwNt663wM9B1
-0060OdwDPrWIBpYRKExOPrqM+hwpF3x2ue/UjtAWuqYVhs3bQIzqqpYqx0MSG2g+
-WPaKeSzmh06X4jzR7Z1VP/uq28i6wZIOMOCY4CYx4OV9g13gF9YYdQtguAL3
+AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQCItwddiIsTrzxzN7HFEgXbqcsI
+Dvqif7NLI+tl3/tpqL8ym9E6AzQbG9GFv8IGrcoQUqZPQgbAHqbLb49GQjuqEC6Q
+bcZJ0RFYBoOUPNUYrdPnjwOVXpHCOEQVMiOnWFQldyDo80BywyjkJkkebl40MATp
+8++ufkugFpa0ChwKstbv0nvLPkEhm4vTCfTHZF2alMLj5EBJQLj+Z23cX//D3x9B
+NWnxtx3sD/gdYGh4KfFbvB9YZjyTVLd3qME4Cbdau+m5eKFvewTSP7c3/f7UHh2k
+yX/uUO23JVADbflUb1G4bfq78sAojnVF5H/aRX9kYYK5jyxB0PsRGmSctE6Y
-----END X509 CRL-----
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/UpdateDBTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/UpdateDBTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/UpdateDBTest.cc Sat Jun 12 14:33:19 2010
@@ -23,7 +23,7 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
@@ -38,22 +38,22 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
cout << "=================== start Update DB ======================" << endl;
{
CA ca("Test_CA1", "system", "./TestRepos/");
ca.updateDB();
-
+
cout << "UpdateDB successfully executed" << endl;
}
cout << "=================== test wrong password ==================" << endl;
-
+
try
{
CA ca2("Test_CA1", "tralla", "./TestRepos/");
-
+
ca2.updateDB();
}
catch(ValueException &re)
@@ -61,7 +61,7 @@
cout << "Got ValueException. This is ok!" << endl;
}
cout << "=================== end Update DB ========================" << endl;
-
+
cout << "DONE" << endl;
}
catch(Exception& e)
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/VerifyTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/VerifyTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/VerifyTest.cc Sat Jun 12 14:33:19 2010
@@ -23,14 +23,14 @@
try
{
cout << "START" << endl;
-
+
blocxx::StringArray cat;
cat.push_back("FATAL");
cat.push_back("ERROR");
cat.push_back("INFO");
cat.push_back("DEBUG");
- StringArray comp;
+ blocxx::StringArray comp;
comp.push_back("ca-mgm");
comp.push_back("limal");
@@ -42,7 +42,7 @@
"%-5p %c - %m"
);
ca_mgm::Logger::setDefaultLogger(l);
-
+
cout << "=================== start Verify Test ======================" << endl;
{
PerlRegEx r1("revoked");
@@ -54,20 +54,20 @@
ca.createCRL(cgd);
- Array<map<blocxx::String, blocxx::String> > ret;
+ std::vector<map<blocxx::String, blocxx::String> > ret;
ret = ca.getCertificateList();
-
- Array<map<blocxx::String, blocxx::String> >::const_iterator it;
+
+ std::vector<map<blocxx::String, blocxx::String> >::const_iterator it;
for(it = ret.begin(); it != ret.end(); ++it)
- {
+ {
blocxx::String name = (*(*it).find("certificate")).second;
blocxx::String serial = (*(*it).find("serial")).second;
-
+
try
{
ca.verifyCertificate( name );
-
+
cout << serial << ": Verify success" << endl;
}
catch(RuntimeException &e)
@@ -88,7 +88,7 @@
}
}
cout << "=================== end List tests ========================" << endl;
-
+
cout << "DONE" << endl;
}
catch(Exception& e)
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/iniParser.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/iniParser.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/iniParser.cc Sat Jun 12 14:33:19 2010
@@ -29,12 +29,12 @@
{
LIMAL_SLOG(logger, "ERROR",
"Adding " << i->first
- << " : " << entry.getValue());
+ << " : " << entry.getValue());
}
}
// Adding Entries and SubSections
-
+
SectionMap sMap = descSection.getSections();
for (SectionMap::iterator i = sMap.begin(); i != sMap.end(); i++)
{
@@ -45,17 +45,17 @@
section.contains (i->first) !=VALUEandSECTION )
{
LIMAL_SLOG_INFO(logger, "Creating Subsection " << i->first);
-
+
Section newSection(i->first,section);
newSection.setComment (sec.getComment ());
-
+
addEntries (sec, newSection );
}
else
{
(section.getSection (i->first)).setComment (sec.getComment ());
addEntries (sec, section.getSection (i->first));
- }
+ }
}
}
@@ -68,7 +68,7 @@
{
Entry entry = i->second;
LIMAL_SLOG_INFO(logger, "Deleting Entry: " << i->first);
-
+
if (!section.delEntry (i->first))
{
LIMAL_SLOG(logger, "ERROR",
@@ -77,7 +77,7 @@
}
// Deleting sections if it has no entry
-
+
SectionMap sMap = descSection.getSections();
for (SectionMap::iterator i = sMap.begin(); i != sMap.end(); i++)
{
@@ -86,7 +86,7 @@
&& sec.entrySize() <= 0)
{
// This section has no enties, so it will be deleted
- LIMAL_SLOG_INFO(logger, "Deleting Section: " << i->first);
+ LIMAL_SLOG_INFO(logger, "Deleting Section: " << i->first);
if (!section.delSection (i->first))
{
LIMAL_SLOG(logger, "ERROR",
@@ -97,7 +97,7 @@
{
// It has entries. So we look forward
deleteEntries (sec, section.getSection (i->first));
- }
+ }
}
}
@@ -156,14 +156,14 @@
LIMAL_SLOG_INFO(logger, tab);
LIMAL_SLOG_INFO(logger, tab <<
- "SectionComment " << section->getComment());
-
+ "SectionComment " << section->getComment());
+
EntryMap eMap= section->getEntries();
for (EntryMap::iterator i = eMap.begin(); i != eMap.end(); i++)
{
Entry entry = i->second;
LIMAL_SLOG_INFO(logger, tab <<
- "Comment " << i->first << " : " << entry.getComment());
+ "Comment " << i->first << " : " << entry.getComment());
LIMAL_SLOG_INFO(logger, tab <<
"Entry " << i->first << " : " << entry.getValue());
}
@@ -184,7 +184,7 @@
if ( argc != 2 )
{
std::cerr << "Usage: iniParser <filepath>" << std::endl;
- std::cout << "DONE" << std::endl;
+ std::cout << "DONE" << std::endl;
exit( 1 );
}
@@ -204,25 +204,25 @@
// Loading description file
INIParser descParser;
- blocxx::Array<Options> options;
- blocxx::StringArray commentsDescr;
- blocxx::Array<SectionDescr> sectionDescr;
- blocxx::Array<EntryDescr> entryDescr;
- blocxx::Array<IoPatternDescr> rewrites;
+ std::vector<Options> options;
+ std::vector<blocxx::String> commentsDescr;
+ std::vector<SectionDescr> sectionDescr;
+ std::vector<EntryDescr> entryDescr;
+ std::vector<IoPatternDescr> rewrites;
String file = argv[ 1 ];
- std::cout << "== loading file : " << file << std::endl;
+ std::cout << "== loading file : " << file << std::endl;
descParser.initFiles (file);
- options.append (GLOBAL_VALUES);
+ options.push_back (GLOBAL_VALUES);
IoPatternDescr pattern = {"^[ \t]*([^=]*[^ \t=])[ \t]*=[ \t]*(.*[^ \t]|)[ \t]*$" ,"%s=%s"};
EntryDescr eDescr = {pattern, "", "" ,false};
- entryDescr.append (eDescr);
- commentsDescr.append(String("^[ \t]*;.*"));
+ entryDescr.push_back (eDescr);
+ commentsDescr.push_back(String("^[ \t]*;.*"));
IoPatternDescr patternBegin = {"[ \t]*\\+([A-Za-z0-9_]+)[ \t]*", "+%s"};
- IoPatternDescr patternEnd = {"[ \t]*\\-([A-Za-z0-9_]+)[ \t]*", "-%s"};
+ IoPatternDescr patternEnd = {"[ \t]*\\-([A-Za-z0-9_]+)[ \t]*", "-%s"};
SectionDescr sDescr = {patternBegin, patternEnd , true };
- sectionDescr.append (sDescr);
+ sectionDescr.push_back (sDescr);
if (!descParser.initMachine (options, commentsDescr, sectionDescr,
entryDescr, rewrites, " "))
@@ -236,14 +236,14 @@
LIMAL_SLOG(logger, "ERROR", "Cannot parse configuration file " << file);
exit (1);
}
-
-
+
+
LIMAL_SLOG(logger, "DEBUG", "Configuration file " << file << " parsed.");
dumpTree(&(descParser.iniFile));
// Initialize parser for testfile
INIParser parser;
-
+
options.clear();
commentsDescr.clear();
sectionDescr.clear();
@@ -252,13 +252,13 @@
int counter = 1;
Key key;
- Value value;
+ Value value;
key = "option1";
while (descParser.iniFile.contains (key) == VALUE)
{
value = descParser.iniFile.getValue (key);
-#define COMPARE_OPTION(X) if (value == #X) options.append(X); else
+#define COMPARE_OPTION(X) if (value == #X) options.push_back(X); else
COMPARE_OPTION(IGNOMR_CASE_REGEXPS);
COMPARE_OPTION(IGNORE_CASE);
COMPARE_OPTION(FIRST_UPPER);
@@ -280,7 +280,7 @@
key = "comment1";
while (descParser.iniFile.contains (key) == VALUE)
{
- commentsDescr.append (descParser.iniFile.getValue (key));
+ commentsDescr.push_back (descParser.iniFile.getValue (key));
key = "comment";
key += String(++counter);
}
@@ -289,40 +289,40 @@
key = "match1";
while (descParser.iniFile.contains (key) == VALUE)
{
- String keyWrite = "write" + String(counter);
- IoPatternDescr pattern = {descParser.iniFile.getValue (key) ,
+ String keyWrite = "write" + String(counter);
+ IoPatternDescr pattern = {descParser.iniFile.getValue (key) ,
descParser.iniFile.getValue (keyWrite)};
- EntryDescr eDescr = {pattern, "", "" ,false};
- entryDescr.append (eDescr);
+ EntryDescr eDescr = {pattern, "", "" ,false};
+ entryDescr.push_back (eDescr);
key = "match";
key += String(++counter);
}
-
+
counter = 1;
key = "secBeginReg1";
while (descParser.iniFile.contains (key) == VALUE)
{
- String keyWrite = "secBeginWrite" + String(counter);
+ String keyWrite = "secBeginWrite" + String(counter);
IoPatternDescr patternBegin = {descParser.iniFile.getValue (key) ,
descParser.iniFile.getValue (keyWrite)};
key = "secEndReg" + String(counter);
keyWrite = "secEndWrite" + String(counter);
IoPatternDescr patternEnd = {descParser.iniFile.getValue (key),
- descParser.iniFile.getValue (keyWrite)};
+ descParser.iniFile.getValue (keyWrite)};
SectionDescr sDescr = {patternBegin, patternEnd ,
descParser.iniFile.contains (key) == VALUE };
- sectionDescr.append (sDescr);
+ sectionDescr.push_back (sDescr);
key = "secBeginReg";
key += String(++counter);
}
-
+
// Parsing input file
-
+
String srcFile = file + String("i.test");
String command = "/bin/cp " + file + "i " + srcFile;
system(command.c_str());
parser.initFiles (srcFile);
-
+
if (!parser.initMachine (options, commentsDescr, sectionDescr,
entryDescr, rewrites, " "))
{
@@ -335,7 +335,7 @@
LIMAL_SLOG(logger, "ERROR", "Cannot parse file " << srcFile);
exit (1);
}
-
+
LIMAL_SLOG(logger, "DEBUG", "file " << srcFile << " parsed.");
dumpTree(&(parser.iniFile));
@@ -382,14 +382,14 @@
key = "searchSection";
key += String(++counter);
}
-
-
+
+
parser.write();
// Re-reading testfile
INIParser testparser;
testparser.initFiles (srcFile);
-
+
if (!testparser.initMachine (options, commentsDescr, sectionDescr,
entryDescr, rewrites, " "))
{
@@ -402,7 +402,7 @@
LIMAL_SLOG(logger, "ERROR", "Cannot parse file " << srcFile);
exit (1);
}
-
+
LIMAL_SLOG(logger, "DEBUG", "file " << srcFile << " parsed AGAIN.");
dumpTree(&(testparser.iniFile));
--
To unsubscribe, e-mail: limal-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: limal-commit+help(a)opensuse.org
1
0
r2668 - in /limal-branches/mc-devel/limal-ca-mgm: src/ src/INIParser/ src/limal/ src/limal/ca-mgm/ testsuite/ testsuite/TestRepos/Test_CA1/ testsuite/TestRepos/Test_CA2/ testsuite/TestRepos/Test_CA...
by mcalmer@svn.opensuse.org 03 Jun '10
by mcalmer@svn.opensuse.org 03 Jun '10
03 Jun '10
Author: mcalmer
Date: Thu Jun 3 19:05:48 2010
New Revision: 2668
URL: http://svn.opensuse.org/viewcvs/limal?rev=2668&view=rev
Log:
switch include blocxx/Map => map
Modified:
limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLDataImpl.hpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.hpp
limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.cpp
limal-branches/mc-devel/limal-ca-mgm/src/LocalManagement.cpp
limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp
limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp
limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/PathInfo.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp
limal-branches/mc-devel/limal-ca-mgm/testsuite/ListTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveCertificateTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveRequestTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
limal-branches/mc-devel/limal-ca-mgm/testsuite/VerifyTest.cc
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp Thu Jun 3 19:05:48 2010
@@ -661,22 +661,22 @@
commitConfig2Template();
}
-blocxx::Array<blocxx::Map<blocxx::String, blocxx::String> >
+blocxx::Array<std::map<blocxx::String, blocxx::String> >
CA::getCertificateList()
{
updateDB();
- Array<Map<String, String> > ret;
+ Array< std::map<String, String> > ret;
ret = OpenSSLUtils::listCertificates(m_impl->caName, m_impl->repositoryDir);
return ret;
}
-blocxx::Array<blocxx::Map<blocxx::String, blocxx::String> >
+blocxx::Array<std::map<blocxx::String, blocxx::String> >
CA::getRequestList()
{
- Array<Map<String, String> > ret;
+ Array< std::map<String, String> > ret;
ret = OpenSSLUtils::listRequests(m_impl->caName, m_impl->repositoryDir);
@@ -1372,7 +1372,7 @@
return ret;
}
- Map<String, Array<String> > caHash;
+ std::map<String, Array<String> > caHash;
Array<String>::const_iterator it = caList.begin();
for(; it != caList.end(); ++it)
@@ -1388,7 +1388,7 @@
}
- Map<String, Array<String> >::const_iterator chit = caHash.begin();
+ std::map<String, Array<String> >::const_iterator chit = caHash.begin();
for(; chit != caHash.end(); ++chit)
{
// subject == issuer
@@ -1406,7 +1406,7 @@
bool issuerFound = false;
// sub CA; find caName of the issuer
- Map<String, Array<String> >::const_iterator chitnew = caHash.begin();
+ std::map<String, Array<String> >::const_iterator chitnew = caHash.begin();
for(; chitnew != caHash.end(); ++chitnew)
{
// issuer == subject
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLData.cpp Thu Jun 3 19:05:48 2010
@@ -203,7 +203,7 @@
return m_impl->extensions;
}
-blocxx::Map<blocxx::String, RevocationEntry>
+std::map<blocxx::String, RevocationEntry>
CRLData::getRevocationData() const
{
return m_impl->revocationData;
@@ -335,7 +335,7 @@
result.appendArray(m_impl->extensions.dump());
- blocxx::Map< String, RevocationEntry >::const_iterator it = m_impl->revocationData.begin();
+ std::map< String, RevocationEntry >::const_iterator it = m_impl->revocationData.begin();
for(; it != m_impl->revocationData.end(); ++it)
{
result.append((*it).first);
@@ -351,10 +351,10 @@
{}
StringArray
-CRLData::checkRevocationData(const blocxx::Map<String, RevocationEntry>& rd) const
+CRLData::checkRevocationData(const std::map<String, RevocationEntry>& rd) const
{
StringArray result;
- blocxx::Map<String, RevocationEntry>::const_iterator it = rd.begin();
+ std::map<String, RevocationEntry>::const_iterator it = rd.begin();
for(; it != rd.end(); ++it)
{
result.appendArray(((*it).second).verify());
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLDataImpl.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLDataImpl.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLDataImpl.hpp Thu Jun 3 19:05:48 2010
@@ -72,7 +72,7 @@
, signatureAlgorithm(E_SHA1RSA)
, signature(ByteBuffer())
, extensions(X509v3CRLExts_Priv())
- , revocationData(blocxx::Map<String, RevocationEntry>())
+ , revocationData(std::map<String, RevocationEntry>())
, x509(NULL)
{}
@@ -116,7 +116,7 @@
X509v3CRLExts extensions;
- blocxx::Map<String, RevocationEntry> revocationData;
+ std::map<String, RevocationEntry> revocationData;
X509_CRL *x509;
};
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.cpp Thu Jun 3 19:05:48 2010
@@ -267,7 +267,7 @@
}
void
-CRLData_Priv::setRevocationData(const blocxx::Map<String, RevocationEntry>& data)
+CRLData_Priv::setRevocationData(const std::map<String, RevocationEntry>& data)
{
StringArray r = checkRevocationData(data);
if(!r.empty())
@@ -431,7 +431,7 @@
// get revocationData
- blocxx::Map<String, RevocationEntry> revData;
+ std::map<String, RevocationEntry> revData;
for (int i=0; i<sk_X509_REVOKED_num(x509->crl->revoked); i++)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLData_Priv.hpp Thu Jun 3 19:05:48 2010
@@ -84,7 +84,7 @@
setExtensions(const X509v3CRLExts& ext);
void
- setRevocationData(const blocxx::Map<String, RevocationEntry>& data);
+ setRevocationData(const std::map<String, RevocationEntry>& data);
private:
CRLData_Priv& operator=(const CRLData_Priv& data);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp Thu Jun 3 19:05:48 2010
@@ -25,7 +25,7 @@
#include <limal/ValueRegExCheck.hpp>
#include <limal/Exception.hpp>
#include <blocxx/Format.hpp>
-#include <blocxx/Map.hpp>
+#include <map>
#include <blocxx/COWIntrusiveCountableBase.hpp>
#include "DNObjectImpl.hpp"
@@ -84,7 +84,7 @@
{
if(m_impl->value.empty()) return String();
- Map<String, String> opensslKeys;
+ std::map<String, String> opensslKeys;
opensslKeys["countryName"] = "C";
opensslKeys["stateOrProvinceName"] = "ST";
opensslKeys["localityName"] = "L";
@@ -95,7 +95,7 @@
//opensslKeys[""] = "";
String ret;
- Map<String, String>::const_iterator it = opensslKeys.find(m_impl->type);
+ std::map<String, String>::const_iterator it = opensslKeys.find(m_impl->type);
if( it != opensslKeys.end())
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp Thu Jun 3 19:05:48 2010
@@ -32,7 +32,7 @@
#define LIMAL_INI_PARSER_HPP
#include <limal/ca-mgm/config.h>
-#include <blocxx/Map.hpp>
+#include <map>
#include <list>
#include <blocxx/Array.hpp>
#include <blocxx/String.hpp>
@@ -94,8 +94,8 @@
class Section;
-typedef blocxx::Map<Key, Entry> EntryMap;
-typedef blocxx::Map<Key, Section> SectionMap;
+typedef std::map<Key, Entry> EntryMap;
+typedef std::map<Key, Section> SectionMap;
typedef EntryMap::size_type EntrySize;
typedef SectionMap::size_type SectionSize;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniParser.cpp Thu Jun 3 19:05:48 2010
@@ -379,7 +379,7 @@
}
// do we know about the file?
- Map<String,FileDescr>::iterator ff = multi_files.find (*f);
+ std::map<String,FileDescr>::iterator ff = multi_files.find (*f);
if (ff == multi_files.end())
{
// new file
Modified: limal-branches/mc-devel/limal-ca-mgm/src/LocalManagement.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/LocalManagement.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/LocalManagement.cpp Thu Jun 3 19:05:48 2010
@@ -76,7 +76,7 @@
String data(out.data(), out.size());
- Array< Map<String, String> > list;
+ Array< std::map<String, String> > list;
String info;
String cert;
@@ -113,7 +113,7 @@
StringArray ia = endRegex.capture(*lineIT);
if(ia.size() == 2 && ia[1] == info) {
- Map<String, String> v;
+ std::map<String, String> v;
v["info"] = info;
v["data"] = cert;
v["keyID"] = keyID;
@@ -203,12 +203,12 @@
// search for the server certificate
- Array< Map<String, String> >::iterator certMap = list.begin();
+ Array< std::map<String, String> >::iterator certMap = list.begin();
for(; certMap != list.end(); ++certMap) {
- Map<String, String>::iterator keyIT = (*certMap).find("keyID");
- Map<String, String>::iterator subjectIT = (*certMap).find("subject");
+ std::map<String, String>::iterator keyIT = (*certMap).find("keyID");
+ std::map<String, String>::iterator subjectIT = (*certMap).find("subject");
if( keyIT != (*certMap).end() &&
!((*keyIT).second.empty()) &&
@@ -230,7 +230,7 @@
for(; certMap != list.end(); ++certMap) {
- Map<String, String>::iterator keyIT = (*certMap).find("keyID");
+ std::map<String, String>::iterator keyIT = (*certMap).find("keyID");
if( keyIT != (*certMap).end() &&
(*keyIT).second == keyID ) {
@@ -247,7 +247,7 @@
for(; certMap != list.end(); ++certMap) {
- Map<String, String>::iterator subjectIT = (*certMap).find("subject");
+ std::map<String, String>::iterator subjectIT = (*certMap).find("subject");
if( subjectIT != (*certMap).end() &&
(*subjectIT).second == serverCertIssuer ) {
@@ -264,7 +264,7 @@
for(; certMap != list.end(); ++certMap) {
- Map<String, String>::iterator dataIT = (*certMap).find("data");
+ std::map<String, String>::iterator dataIT = (*certMap).find("data");
if( dataIT != (*certMap).end() &&
!(*dataIT).second.empty() ) {
Modified: limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp Thu Jun 3 19:05:48 2010
@@ -2051,11 +2051,11 @@
return ret;
}
-blocxx::Array<blocxx::Map<blocxx::String, blocxx::String> >
+blocxx::Array<std::map<blocxx::String, blocxx::String> >
OpenSSLUtils::listRequests(const String &caName,
const String &repository)
{
- Array<Map<String, String> > ret;
+ Array<std::map<String, String> > ret;
std::list<String> tmpList;
String reqDir = repository + "/" + caName + "/req/";
@@ -2108,7 +2108,7 @@
date = dt.toString("%Y-%m-%d %H:%M:%S", DateTime::E_LOCAL_TIME);
}
- Map<String, String> reqLine;
+ std::map<String, String> reqLine;
String subject;
reqLine["request"] = md5;
@@ -2203,11 +2203,11 @@
return ret;
}
-blocxx::Array<blocxx::Map<blocxx::String, blocxx::String> >
+blocxx::Array<std::map<blocxx::String, blocxx::String> >
OpenSSLUtils::listCertificates(const String &caName,
const String &repository)
{
- Array<Map<String, String> > ret;
+ Array<std::map<String, String> > ret;
std::list<String> tmpList;
String certDir = repository + "/" + caName + "/newcerts/";
@@ -2252,7 +2252,7 @@
String serial = sa[1];
String md5 = sa[2];
- Map<String, String> certLine;
+ std::map<String, String> certLine;
String subject;
certLine["serial"] = serial;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.hpp Thu Jun 3 19:05:48 2010
@@ -183,11 +183,11 @@
parseIndexTXT(const String &caName,
const String &repository = REPOSITORY);
- static blocxx::Array<blocxx::Map<blocxx::String, blocxx::String> >
+ static blocxx::Array<std::map<blocxx::String, blocxx::String> >
listRequests(const String &caName,
const String &repository = REPOSITORY);
- static blocxx::Array<blocxx::Map<blocxx::String, blocxx::String> >
+ static blocxx::Array<std::map<blocxx::String, blocxx::String> >
listCertificates(const String &caName,
const String &repository = REPOSITORY);
Modified: limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/UrlBase.cpp Thu Jun 3 19:05:48 2010
@@ -101,7 +101,7 @@
/*
** Behaviour configuration variables.
*/
-typedef blocxx::Map< blocxx::String, blocxx::String > UrlConfig;
+typedef std::map< blocxx::String, blocxx::String > UrlConfig;
// -------------------------------------------------------------------
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/PathInfo.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/PathInfo.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/PathInfo.hpp Thu Jun 3 19:05:48 2010
@@ -764,7 +764,7 @@
private:
- blocxx::Map<dev_t,std::set<ino_t> > _devino;
+ std::map<dev_t,std::set<ino_t> > _devino;
public:
/**
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/UrlUtils.hpp Thu Jun 3 19:05:48 2010
@@ -92,7 +92,7 @@
* A string map, containing key and value pairs parsed from a
* PathParam- or Query-String.
*/
-typedef blocxx::Map<blocxx::String,blocxx::String> ParamMap;
+typedef std::map<blocxx::String,blocxx::String> ParamMap;
// -------------------------------------------------------------------
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp Thu Jun 3 19:05:48 2010
@@ -275,7 +275,7 @@
* <li>status (The status of the certificate: "valid", "revoked", "expired")</li>
* </ul>
*/
- blocxx::Array<blocxx::Map<blocxx::String, blocxx::String> >
+ blocxx::Array<std::map<blocxx::String, blocxx::String> >
getCertificateList();
@@ -297,7 +297,7 @@
* <li>date</li>
* </ul>
*/
- blocxx::Array<blocxx::Map<blocxx::String, blocxx::String> >
+ blocxx::Array<std::map<blocxx::String, blocxx::String> >
getRequestList();
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLData.hpp Thu Jun 3 19:05:48 2010
@@ -115,7 +115,7 @@
X509v3CRLExts
getExtensions() const;
- blocxx::Map<String, RevocationEntry>
+ std::map<String, RevocationEntry>
getRevocationData() const;
RevocationEntry
@@ -150,7 +150,7 @@
CRLData();
blocxx::StringArray
- checkRevocationData(const blocxx::Map<String, RevocationEntry>& rd) const;
+ checkRevocationData(const std::map<String, RevocationEntry>& rd) const;
};
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp Thu Jun 3 19:05:48 2010
@@ -26,7 +26,7 @@
#include <blocxx/String.hpp>
#include <list>
#include <blocxx/Array.hpp>
-#include <blocxx/Map.hpp>
+#include <map>
#include <errno.h>
#define REPOSITORY "/var/lib/CAM/"
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ListTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ListTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ListTest.cc Thu Jun 3 19:05:48 2010
@@ -44,14 +44,14 @@
{
CA ca("Test_CA2", "system", "./TestRepos/");
- Array<Map<blocxx::String, blocxx::String> > ret;
+ Array<map<blocxx::String, blocxx::String> > ret;
ret = ca.getRequestList();
- Array<Map<blocxx::String, blocxx::String> >::const_iterator it;
+ Array<map<blocxx::String, blocxx::String> >::const_iterator it;
for(it = ret.begin(); it != ret.end(); ++it)
{
- Map<blocxx::String, blocxx::String>::const_iterator it2;
+ map<blocxx::String, blocxx::String>::const_iterator it2;
cout << "New Entry" << endl;
@@ -86,14 +86,14 @@
{
CA ca2("Test_CA2", "system", "./TestRepos/");
- Array<Map<blocxx::String, blocxx::String> > ret;
+ Array<map<blocxx::String, blocxx::String> > ret;
ret = ca2.getCertificateList();
- Array<Map<blocxx::String, blocxx::String> >::const_iterator it = ret.begin();
+ Array<map<blocxx::String, blocxx::String> >::const_iterator it = ret.begin();
for(it = ret.begin(); it != ret.end(); ++it)
{
- Map<blocxx::String, blocxx::String>::const_iterator it2;
+ map<blocxx::String, blocxx::String>::const_iterator it2;
cout << "New Entry" << endl;
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveCertificateTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveCertificateTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveCertificateTest.cc Thu Jun 3 19:05:48 2010
@@ -43,10 +43,10 @@
{
CA ca("Test_CA1", "system", "./TestRepos/");
- Array<Map<blocxx::String, blocxx::String> > ret;
+ Array<map<blocxx::String, blocxx::String> > ret;
ret = ca.getCertificateList();
- Array<Map<blocxx::String, blocxx::String> >::const_iterator it;
+ Array<map<blocxx::String, blocxx::String> >::const_iterator it;
int i = 0;
for(it = ret.begin(); it != ret.end(); ++it)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveRequestTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveRequestTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RemoveRequestTest.cc Thu Jun 3 19:05:48 2010
@@ -43,7 +43,7 @@
{
CA ca("Test_CA1", "system", "./TestRepos/");
- Array<Map<blocxx::String, blocxx::String> > ret;
+ Array<map<blocxx::String, blocxx::String> > ret;
ret = ca.getRequestList();
blocxx::String requestName = (*(ret[0].find("request"))).second;
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt Thu Jun 3 19:05:48 2010
@@ -1,14 +1,14 @@
-b4d4e48e6de644c953290eb2854a6ced-1275583073 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-bc5324c7f5c2a27492fb6795745b596b-1275583074 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1275583080 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1275583083 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1275583087 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1275583097 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c293624b6a877f401407ce8f8f1f327e-1275583098 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1275583099 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c1943ae4b9bd7320fae3e29f217483e3-1275583100 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
-d816690a832b0e52becd255d3a62e975-1275583105 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-9198f6798d9da70d7cbfb67b610633f5-1275583107 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-3e248858337c2b46dc67a0f9389376dd-1275583108 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-bf04fdd95062554800c1556085f47063-1275583111 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-9797ac11af29f94b82c1e5b0499ab5f2-1275583113 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1275584668 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+bc5324c7f5c2a27492fb6795745b596b-1275584670 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1275584675 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1275584677 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1275584680 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1275584689 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c293624b6a877f401407ce8f8f1f327e-1275584690 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1275584692 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c1943ae4b9bd7320fae3e29f217483e3-1275584693 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
+d816690a832b0e52becd255d3a62e975-1275584696 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+9198f6798d9da70d7cbfb67b610633f5-1275584698 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+3e248858337c2b46dc67a0f9389376dd-1275584699 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+bf04fdd95062554800c1556085f47063-1275584700 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+9797ac11af29f94b82c1e5b0499ab5f2-1275584702 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt Thu Jun 3 19:05:48 2010
@@ -1,11 +1,11 @@
-V 110603163754Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110603163754Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110603163758Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110603163801Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110603163805Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-R 110603163822Z 100603163824Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
-R 110603163825Z 100603163826Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-R 110603163827Z 100603163828Z,keyTime,20100603182148Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-R 110603163828Z 100603163830Z,CAkeyTime,20100603182150Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-R 110603163831Z 100603163832Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-V 120602163833Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+V 110603170430Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110603170430Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110603170432Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110603170435Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110603170438Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+R 110603170454Z 100603170456Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
+R 110603170456Z 100603170457Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+R 110603170458Z 100603170458Z,keyTime,20100603184818Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+R 110603170459Z 100603170500Z,CAkeyTime,20100603184820Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+R 110603170500Z 100603170501Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+V 120602170502Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
Binary files - no diff available.
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem Thu Jun 3 19:05:48 2010
@@ -1,7 +1,7 @@
-----BEGIN X509 CRL-----
MIIC+TCCAeECAQEwDQYJKoZIhvcNAQEFBQAwQzELMAkGA1UEBhMCREUxFzAVBgNV
BAMTDlN0YXRpYyBUZXN0IENBMRswGQYJKoZIhvcNAQkBFgxzdXNlQHN1c2UuZGUX
-DTEwMDYwMzE2MzgzNFoXDTEwMDYwNDE2MzgzNFowgfAwEgIBAxcNMDUwODE4MTQx
+DTEwMDYwMzE3MDUwNVoXDTEwMDYwNDE3MDUwNVowgfAwEgIBAxcNMDUwODE4MTQx
MzIzWjAyAgEEFw0wNTA4MTgxNDEzMjVaMB4wCgYDVR0VBAMKAQYwEAYDVR0XBAkG
ByqGSM44AgIwOgIBBRcNMDUwODE4MTQxMzI2WjAmMAoGA1UdFQQDCgEBMBgGA1Ud
GAQRGA8yMDA1MDgxODE1NTY0NlowOgIBBhcNMDUwODE4MTQxMzI4WjAmMAoGA1Ud
@@ -9,10 +9,10 @@
ODE4WjAaMAoGA1UdFQQDCgEGMAwGA1UdFwQFBgMuFSugdzB1MHMGA1UdIwRsMGqA
FDIAwASkKojCPsrVvdhM01KIIH87oUekRTBDMQswCQYDVQQGEwJERTEXMBUGA1UE
AxMOU3RhdGljIFRlc3QgQ0ExGzAZBgkqhkiG9w0BCQEWDHN1c2VAc3VzZS5kZYIJ
-AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQChBhX5FmB+d+F5DAppJvaWjRbY
-X0zQK+NzxB1x4SIHje3n+k9G7EzMOiB2hbvpXQnH3Z/V79f6MT8YmvELDIMfoBG/
-FPPYg1GWnsU5vVQdW1AGuafk597lEt78w2Q80Y36bfkbinasFjHFI2xh72mNwovQ
-RmhDPuWCfwU0HAoAT7jqi+DQ380/te3OYVBxCPhEDhji0baU8toaEIyl9Kb1Sz7n
-ksqPqQg+hFdbAw3Ov4gdKyk9+V6cVal1mx+3GILtmeGt8UD1K4VZd3hWXbj04mJp
-ab24bcH1K23xAFomnHD1TI9xUupWY+hPWXLwe7nnTIlQpziipSCKhrdfvnVE
+AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQAQJKi8C1+8hxF9JGSIpSVyZv7W
+99HoxQBFku3tg5XQVfI3z4JQ6d0c2trrogvdZ2TnYJexY9IrKSLf4HcJlQ2TBwmb
+UD7xIv2kgdJnzO64BXD6POqfwXKgLTw5qtKNuM2JPaKebjvWGHAmn84uYWIY3DVC
+8bR4M5+LCr/h5zjP/Ta1O697Q8g2z8o6ZfsQJdrbFWFW3pw3mXkFYwNt663wM9B1
+0060OdwDPrWIBpYRKExOPrqM+hwpF3x2ue/UjtAWuqYVhs3bQIzqqpYqx0MSG2g+
+WPaKeSzmh06X4jzR7Z1VP/uq28i6wZIOMOCY4CYx4OV9g13gF9YYdQtguAL3
-----END X509 CRL-----
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/VerifyTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/VerifyTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/VerifyTest.cc Thu Jun 3 19:05:48 2010
@@ -54,10 +54,10 @@
ca.createCRL(cgd);
- Array<Map<blocxx::String, blocxx::String> > ret;
+ Array<map<blocxx::String, blocxx::String> > ret;
ret = ca.getCertificateList();
- Array<Map<blocxx::String, blocxx::String> >::const_iterator it;
+ Array<map<blocxx::String, blocxx::String> >::const_iterator it;
for(it = ret.begin(); it != ret.end(); ++it)
{
--
To unsubscribe, e-mail: limal-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: limal-commit+help(a)opensuse.org
1
0
r2667 - in /limal-branches/mc-devel/limal-ca-mgm/src: DNObjectImpl.hpp INIParser/INIParser.hpp ValueCheck.cpp limal/PathUtils.hpp limal/ValueCheck.hpp limal/ca-mgm/CommonData.hpp
by mcalmer@svn.opensuse.org 03 Jun '10
by mcalmer@svn.opensuse.org 03 Jun '10
03 Jun '10
Author: mcalmer
Date: Thu Jun 3 18:46:36 2010
New Revision: 2667
URL: http://svn.opensuse.org/viewcvs/limal?rev=2667&view=rev
Log:
switch include blocxx/List => list
Modified:
limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp
limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/PathUtils.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueCheck.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp
Modified: limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp Thu Jun 3 18:46:36 2010
@@ -24,7 +24,7 @@
#include <limal/ca-mgm/config.h>
#include <limal/ca-mgm/CommonData.hpp>
-#include <blocxx/List.hpp>
+#include <list>
#include <blocxx/COWIntrusiveCountableBase.hpp>
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp Thu Jun 3 18:46:36 2010
@@ -33,7 +33,7 @@
#include <limal/ca-mgm/config.h>
#include <blocxx/Map.hpp>
-#include <blocxx/List.hpp>
+#include <list>
#include <blocxx/Array.hpp>
#include <blocxx/String.hpp>
#include <blocxx/StringStream.hpp>
Modified: limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp Thu Jun 3 18:46:36 2010
@@ -30,7 +30,7 @@
#include <blocxx/Types.hpp>
#include <blocxx/String.hpp>
#include <blocxx/RefCount.hpp>
-#include <blocxx/List.hpp>
+#include <list>
#include "Utils.hpp"
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/PathUtils.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/PathUtils.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/PathUtils.hpp Thu Jun 3 18:46:36 2010
@@ -31,7 +31,7 @@
#include <limal/ca-mgm/config.h>
#include <limal/PathName.hpp>
-#include <blocxx/List.hpp>
+#include <list>
namespace LIMAL_NAMESPACE
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueCheck.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueCheck.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueCheck.hpp Thu Jun 3 18:46:36 2010
@@ -29,7 +29,7 @@
#include <limal/ca-mgm/config.h>
#include <blocxx/String.hpp>
#include <blocxx/RefCount.hpp>
-#include <blocxx/List.hpp>
+#include <list>
namespace LIMAL_NAMESPACE
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp Thu Jun 3 18:46:36 2010
@@ -24,7 +24,7 @@
#include <blocxx/Types.hpp>
#include <blocxx/String.hpp>
-#include <blocxx/List.hpp>
+#include <list>
#include <blocxx/Array.hpp>
#include <blocxx/Map.hpp>
#include <errno.h>
--
To unsubscribe, e-mail: limal-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: limal-commit+help(a)opensuse.org
1
0
r2666 - in /limal-branches/mc-devel/limal-ca-mgm: ./ src/ src/INIParser/ src/limal/ src/limal/ca-mgm/ testsuite/ testsuite/TestRepos/Test_CA1/ testsuite/TestRepos/Test_CA2/ testsuite/TestRepos/Test...
by mcalmer@svn.opensuse.org 03 Jun '10
by mcalmer@svn.opensuse.org 03 Jun '10
03 Jun '10
Author: mcalmer
Date: Thu Jun 3 18:38:59 2010
New Revision: 2666
URL: http://svn.opensuse.org/viewcvs/limal?rev=2666&view=rev
Log:
blocxx::List => std::list
Modified:
limal-branches/mc-devel/limal-ca-mgm/Makefile.am
limal-branches/mc-devel/limal-ca-mgm/src/AuthorityInfoAccessExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CAConfig.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CRLDistributionPointsExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp
limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp
limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.cpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp
limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h
limal-branches/mc-devel/limal-ca-mgm/src/IssuerAlternativeNameExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp
limal-branches/mc-devel/limal-ca-mgm/src/PathUtils.cpp
limal-branches/mc-devel/limal-ca-mgm/src/SubjectAlternativeNameExtension.cpp
limal-branches/mc-devel/limal-ca-mgm/src/Utils.hpp
limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions_Priv.cpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/PathName.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/PathUtils.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueCheck.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityInfoAccessExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CAConfig.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLDistributionPointsExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/DNObject.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/IssuerAlternativeNameExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectAlternativeNameExtension.hpp
limal-branches/mc-devel/limal-ca-mgm/testsuite/CA5.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CA8.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CAConfig.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CRLTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest2.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest3.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest4.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest5.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest6.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/ListCATreeTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RequestTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest2.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest3.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest4.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest5.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/SubCATest.cc
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
Modified: limal-branches/mc-devel/limal-ca-mgm/Makefile.am
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/Makefile.am (original)
+++ limal-branches/mc-devel/limal-ca-mgm/Makefile.am Thu Jun 3 18:38:59 2010
@@ -42,7 +42,7 @@
maintainer-clean-local:
-rm -rf m4
-configure.in: configure.in.in $(srcdir)/VERSION
+configure.in: $(srcdir)/VERSION
$(MAKE) -f Makefile.cvs all
EXTRA_DIST = \
Modified: limal-branches/mc-devel/limal-ca-mgm/src/AuthorityInfoAccessExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/AuthorityInfoAccessExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/AuthorityInfoAccessExtension.cpp Thu Jun 3 18:38:59 2010
@@ -71,7 +71,7 @@
{
public:
AuthorityInfoAccessExtImpl()
- : info(blocxx::List<AuthorityInformation>())
+ : info(std::list<AuthorityInformation>())
{}
AuthorityInfoAccessExtImpl(const AuthorityInfoAccessExtImpl &aie)
@@ -86,7 +86,7 @@
return new AuthorityInfoAccessExtImpl(*this);
}
- blocxx::List<AuthorityInformation> info;
+ std::list<AuthorityInformation> info;
};
@@ -298,9 +298,9 @@
}
void
-AuthorityInfoAccessExt::setAuthorityInformation(const blocxx::List<AuthorityInformation>& infolist)
+AuthorityInfoAccessExt::setAuthorityInformation(const std::list<AuthorityInformation>& infolist)
{
- blocxx::List<AuthorityInformation>::const_iterator it = infolist.begin();
+ std::list<AuthorityInformation>::const_iterator it = infolist.begin();
for(;it != infolist.end(); it++) {
if(!(*it).valid()) {
LOGIT_ERROR("invalid AuthorityInformation in infolist");
@@ -312,7 +312,7 @@
m_impl->info = infolist;
}
-blocxx::List<AuthorityInformation>
+std::list<AuthorityInformation>
AuthorityInfoAccessExt::getAuthorityInformation() const
{
if(!isPresent()) {
@@ -347,7 +347,7 @@
if(isCritical()) extString += "critical,";
String val;
- blocxx::List<AuthorityInformation>::const_iterator it = m_impl->info.begin();
+ std::list<AuthorityInformation>::const_iterator it = m_impl->info.begin();
for(;it != m_impl->info.end(); ++it)
{
val = "";
@@ -378,7 +378,7 @@
LOGIT_DEBUG("return AuthorityInfoAccessExt::valid() is false");
return false;
}
- blocxx::List<AuthorityInformation>::const_iterator it = m_impl->info.begin();
+ std::list<AuthorityInformation>::const_iterator it = m_impl->info.begin();
for(;it != m_impl->info.end(); it++)
{
if(!(*it).valid())
@@ -402,7 +402,7 @@
{
result.append(String("No access informations available"));
}
- blocxx::List<AuthorityInformation>::const_iterator it = m_impl->info.begin();
+ std::list<AuthorityInformation>::const_iterator it = m_impl->info.begin();
for(;it != m_impl->info.end(); it++)
{
result.appendArray((*it).verify());
@@ -421,7 +421,7 @@
result.appendArray(ExtensionBase::dump());
if(!isPresent()) return result;
- blocxx::List< AuthorityInformation >::const_iterator it = m_impl->info.begin();
+ std::list< AuthorityInformation >::const_iterator it = m_impl->info.begin();
for(; it != m_impl->info.end(); ++it)
{
result.appendArray((*it).dump());
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CA.cpp Thu Jun 3 18:38:59 2010
@@ -1360,10 +1360,10 @@
}
-blocxx::List<blocxx::Array<blocxx::String> >
+std::list<blocxx::Array<blocxx::String> >
CA::getCATree(const String& repos)
{
- List<Array<String> > ret;
+ std::list<Array<String> > ret;
Array<String> caList = CA::getCAList(repos);
@@ -1599,10 +1599,10 @@
}
StringList::const_iterator it = policyKeys.begin();
- blocxx::List<RDNObject> l = dn.getDN();
+ std::list<RDNObject> l = dn.getDN();
bool policyFound = false;
- blocxx::List<RDNObject> caDNList = getCA().getSubjectDN().getDN();
+ std::list<RDNObject> caDNList = getCA().getSubjectDN().getDN();
for(; it != policyKeys.end(); ++it)
{
@@ -1625,7 +1625,7 @@
// we need a value
bool foundInDN = false;
- blocxx::List<RDNObject>::const_iterator rdnit = l.begin();
+ std::list<RDNObject>::const_iterator rdnit = l.begin();
for(; rdnit != l.end(); ++rdnit)
{
@@ -1718,7 +1718,7 @@
// read the CA and check the value
// *it == key (e.g. commonName, emailAddress, ...
- blocxx::List<RDNObject>::const_iterator rdnit = l.begin();
+ std::list<RDNObject>::const_iterator rdnit = l.begin();
RDNObject rdn2check = RDNObject_Priv(*it, "");
for(; rdnit != l.end(); ++rdnit)
@@ -1732,7 +1732,7 @@
bool validMatch = false;
- blocxx::List<RDNObject>::const_iterator caRdnIT = caDNList.begin();
+ std::list<RDNObject>::const_iterator caRdnIT = caDNList.begin();
for(; caRdnIT != caDNList.end(); ++caRdnIT)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CAConfig.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CAConfig.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CAConfig.cpp Thu Jun 3 18:38:59 2010
@@ -209,10 +209,10 @@
return false;
}
-blocxx::List<blocxx::String>
+std::list<blocxx::String>
CAConfig::getKeylist(const String §ion) const
{
- blocxx::List<String> keylist;
+ std::list<String> keylist;
if (m_impl->parser.iniFile.contains(section) == SECTION)
{
@@ -224,11 +224,11 @@
void
CAConfig::copySection(const String &srcSection, const String &destSection)
{
- blocxx::List<String> keylist;
+ std::list<String> keylist;
keylist = getKeylist(srcSection);
- blocxx::List<String>::const_iterator it = keylist.begin();
+ std::list<String>::const_iterator it = keylist.begin();
for(; it != keylist.end(); ++it)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CRLDistributionPointsExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CRLDistributionPointsExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CRLDistributionPointsExtension.cpp Thu Jun 3 18:38:59 2010
@@ -37,7 +37,7 @@
{
public:
CRLDistributionPointsExtImpl()
- : altNameList(List<LiteralValue>())
+ : altNameList(std::list<LiteralValue>())
{}
CRLDistributionPointsExtImpl(const CRLDistributionPointsExtImpl& impl)
@@ -52,7 +52,7 @@
return new CRLDistributionPointsExtImpl(*this);
}
- blocxx::List<LiteralValue> altNameList;
+ std::list<LiteralValue> altNameList;
};
@@ -121,7 +121,7 @@
}
void
-CRLDistributionPointsExt::setCRLDistributionPoints(blocxx::List<LiteralValue> dp)
+CRLDistributionPointsExt::setCRLDistributionPoints(std::list<LiteralValue> dp)
{
StringArray r = checkLiteralValueList(dp);
if(!r.empty())
@@ -133,7 +133,7 @@
setPresent(true);
}
-blocxx::List<LiteralValue>
+std::list<LiteralValue>
CRLDistributionPointsExt::getCRLDistributionPoints() const
{
if(!isPresent())
@@ -171,7 +171,7 @@
if(isCritical()) extString += "critical,";
String val;
- blocxx::List<LiteralValue>::const_iterator it = m_impl->altNameList.begin();
+ std::list<LiteralValue>::const_iterator it = m_impl->altNameList.begin();
for(int j = 0;it != m_impl->altNameList.end(); ++it, ++j)
{
val = "";
@@ -236,7 +236,7 @@
result.appendArray(ExtensionBase::dump());
if(!isPresent()) return result;
- blocxx::List< LiteralValue >::const_iterator it = m_impl->altNameList.begin();
+ std::list< LiteralValue >::const_iterator it = m_impl->altNameList.begin();
for(; it != m_impl->altNameList.end(); ++it)
{
result.appendArray((*it).dump());
Modified: limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/CertificatePoliciesExtension.cpp Thu Jun 3 18:38:59 2010
@@ -40,7 +40,7 @@
UserNoticeImpl()
: explicitText("")
, organization("")
- , noticeNumbers(blocxx::List<blocxx::Int32>())
+ , noticeNumbers(std::list<blocxx::Int32>())
{}
UserNoticeImpl(const UserNoticeImpl& impl)
@@ -63,7 +63,7 @@
// (if included) must BOTH be present.
String organization; // max 200 characters
- blocxx::List<blocxx::Int32> noticeNumbers;
+ std::list<blocxx::Int32> noticeNumbers;
};
@@ -74,13 +74,13 @@
CertificatePolicyImpl()
: policyIdentifier(String())
, cpsURI(StringList())
- , noticeList(blocxx::List<UserNotice>())
+ , noticeList(std::list<UserNotice>())
{}
CertificatePolicyImpl(const String &policyIdentifier)
: policyIdentifier(policyIdentifier)
, cpsURI(StringList())
- , noticeList(blocxx::List<UserNotice>())
+ , noticeList(std::list<UserNotice>())
{}
CertificatePolicyImpl(const CertificatePolicyImpl& impl)
@@ -100,7 +100,7 @@
String policyIdentifier; // required
StringList cpsURI; // Certification Practice Statement
- blocxx::List<UserNotice> noticeList;
+ std::list<UserNotice> noticeList;
};
class CertificatePoliciesExtImpl : public blocxx::COWIntrusiveCountableBase
@@ -108,10 +108,10 @@
public:
CertificatePoliciesExtImpl()
: ia5org(false),
- policies(blocxx::List<CertificatePolicy>())
+ policies(std::list<CertificatePolicy>())
{}
- CertificatePoliciesExtImpl(const blocxx::List<CertificatePolicy>& policies)
+ CertificatePoliciesExtImpl(const std::list<CertificatePolicy>& policies)
: ia5org(false),
policies(policies)
{}
@@ -130,7 +130,7 @@
}
bool ia5org;
- blocxx::List<CertificatePolicy> policies;
+ std::list<CertificatePolicy> policies;
};
@@ -225,7 +225,7 @@
void
UserNotice::setOrganizationNotice(const String& org,
- const blocxx::List<blocxx::Int32>& numbers)
+ const std::list<blocxx::Int32>& numbers)
{
m_impl->organization = org;
m_impl->noticeNumbers = numbers;
@@ -237,7 +237,7 @@
return m_impl->organization;
}
-blocxx::List<blocxx::Int32>
+std::list<blocxx::Int32>
UserNotice::getNoticeNumbers() const
{
return m_impl->noticeNumbers;
@@ -275,7 +275,7 @@
ca.getConfig()->setValue(sectionName, "organization", m_impl->organization);
String numbers;
- blocxx::List<blocxx::Int32>::const_iterator it = m_impl->noticeNumbers.begin();
+ std::list<blocxx::Int32>::const_iterator it = m_impl->noticeNumbers.begin();
for(;it != m_impl->noticeNumbers.end(); ++it)
{
numbers += String(*it)+",";
@@ -333,7 +333,7 @@
result.append("organization = " + m_impl->organization);
String n;
- blocxx::List< blocxx::Int32 >::const_iterator it = m_impl->noticeNumbers.begin();
+ std::list< blocxx::Int32 >::const_iterator it = m_impl->noticeNumbers.begin();
for(; it != m_impl->noticeNumbers.end(); ++it)
{
n += String(*it) + " ";
@@ -485,7 +485,7 @@
}
void
-CertificatePolicy::setUserNoticeList(const blocxx::List<UserNotice>& list)
+CertificatePolicy::setUserNoticeList(const std::list<UserNotice>& list)
{
StringArray r = checkNoticeList(list);
if(!r.empty())
@@ -496,7 +496,7 @@
m_impl->noticeList = list;
}
-blocxx::List<UserNotice>
+std::list<UserNotice>
CertificatePolicy::getUserNoticeList() const
{
return m_impl->noticeList;
@@ -536,7 +536,7 @@
ca.getConfig()->setValue(sectionName, "CPS."+String(i),(*it));
}
- blocxx::List<UserNotice>::const_iterator nit = m_impl->noticeList.begin();
+ std::list<UserNotice>::const_iterator nit = m_impl->noticeList.begin();
for(blocxx::UInt32 j = 1;nit != m_impl->noticeList.end(); ++nit, ++j)
{
String n = (*nit).commit2Config(ca, type, j);
@@ -608,7 +608,7 @@
result.append("CPS = " + (*it1));
}
- blocxx::List< UserNotice >::const_iterator it2 = m_impl->noticeList.begin();
+ std::list< UserNotice >::const_iterator it2 = m_impl->noticeList.begin();
for(; it2 != m_impl->noticeList.end(); ++it2)
{
result.appendArray((*it2).dump());
@@ -666,10 +666,10 @@
}
blocxx::StringArray
-CertificatePolicy::checkNoticeList(const blocxx::List<UserNotice>& list) const
+CertificatePolicy::checkNoticeList(const std::list<UserNotice>& list) const
{
StringArray result;
- blocxx::List<UserNotice>::const_iterator it = list.begin();
+ std::list<UserNotice>::const_iterator it = list.begin();
for(;it != list.end(); it++)
{
result.appendArray((*it).verify());
@@ -685,7 +685,7 @@
, m_impl(new CertificatePoliciesExtImpl())
{}
-CertificatePoliciesExt::CertificatePoliciesExt(const blocxx::List<CertificatePolicy>& policies)
+CertificatePoliciesExt::CertificatePoliciesExt(const std::list<CertificatePolicy>& policies)
: ExtensionBase()
, m_impl(new CertificatePoliciesExtImpl(policies))
{
@@ -784,7 +784,7 @@
}
void
-CertificatePoliciesExt::setPolicies(const blocxx::List<CertificatePolicy>& policies)
+CertificatePoliciesExt::setPolicies(const std::list<CertificatePolicy>& policies)
{
StringArray r = checkPolicies(policies);
if(!r.empty())
@@ -797,7 +797,7 @@
setPresent(true);
}
-blocxx::List<CertificatePolicy>
+std::list<CertificatePolicy>
CertificatePoliciesExt::getPolicies() const
{
if(!isPresent())
@@ -836,7 +836,7 @@
if(m_impl->ia5org) extString += "ia5org,";
- blocxx::List<CertificatePolicy>::const_iterator it = m_impl->policies.begin();
+ std::list<CertificatePolicy>::const_iterator it = m_impl->policies.begin();
for(blocxx::UInt32 i = 0;it != m_impl->policies.end(); ++it, ++i)
{
extString += (*it).commit2Config(ca, type, i) + ",";
@@ -898,7 +898,7 @@
if(!isPresent()) return result;
result.append("ia5org = " + blocxx::Bool(m_impl->ia5org).toString());
- blocxx::List< CertificatePolicy >::const_iterator it = m_impl->policies.begin();
+ std::list< CertificatePolicy >::const_iterator it = m_impl->policies.begin();
for(; it != m_impl->policies.end(); ++it)
{
result.appendArray((*it).dump());
@@ -909,10 +909,10 @@
blocxx::StringArray
-CertificatePoliciesExt::checkPolicies(const blocxx::List<CertificatePolicy>& pl) const
+CertificatePoliciesExt::checkPolicies(const std::list<CertificatePolicy>& pl) const
{
StringArray result;
- blocxx::List<CertificatePolicy>::const_iterator it = pl.begin();
+ std::list<CertificatePolicy>::const_iterator it = pl.begin();
for(;it != pl.end(); it++)
{
result.appendArray((*it).verify());
Modified: limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/DNObject.cpp Thu Jun 3 18:38:59 2010
@@ -357,7 +357,7 @@
}
}
-DNObject::DNObject(const blocxx::List<RDNObject> &dn)
+DNObject::DNObject(const std::list<RDNObject> &dn)
: m_impl(new DNObjectImpl())
{
m_impl->dn = dn;
@@ -386,7 +386,7 @@
}
void
-DNObject::setDN(const blocxx::List<RDNObject> &dn)
+DNObject::setDN(const std::list<RDNObject> &dn)
{
StringArray r = checkRDNList(dn);
if(!r.empty())
@@ -397,7 +397,7 @@
m_impl->dn = dn;
}
-blocxx::List<RDNObject>
+std::list<RDNObject>
DNObject::getDN() const
{
return m_impl->dn;
@@ -408,7 +408,7 @@
{
String ret;
- blocxx::List<RDNObject>::const_iterator it = m_impl->dn.begin();
+ std::list<RDNObject>::const_iterator it = m_impl->dn.begin();
for(; it != m_impl->dn.end(); ++it)
{
if(! (*it).getOpenSSLValue().empty())
@@ -454,11 +454,11 @@
}
blocxx::StringArray
-DNObject::checkRDNList(const blocxx::List<RDNObject>& list) const
+DNObject::checkRDNList(const std::list<RDNObject>& list) const
{
StringArray result;
- blocxx::List<RDNObject>::const_iterator it = list.begin();
+ std::list<RDNObject>::const_iterator it = list.begin();
for(; it != list.end(); ++it)
{
result.appendArray((*it).verify());
@@ -472,7 +472,7 @@
StringArray result;
result.append("DNObject::dump()");
- blocxx::List< RDNObject >::const_iterator it = m_impl->dn.begin();
+ std::list< RDNObject >::const_iterator it = m_impl->dn.begin();
for(; it != m_impl->dn.end(); ++it)
{
result.appendArray((*it).dump());
Modified: limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/DNObjectImpl.hpp Thu Jun 3 18:38:59 2010
@@ -69,7 +69,7 @@
{
public:
DNObjectImpl()
- : dn(blocxx::List<RDNObject>())
+ : dn(std::list<RDNObject>())
{}
DNObjectImpl(const DNObjectImpl& impl)
@@ -84,7 +84,7 @@
return new DNObjectImpl(*this);
}
- blocxx::List<RDNObject> dn;
+ std::list<RDNObject> dn;
};
Modified: limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/DNObject_Priv.cpp Thu Jun 3 18:38:59 2010
@@ -116,7 +116,7 @@
}
- List<RDNObject>::iterator it = dn.begin();
+ std::list<RDNObject>::iterator it = dn.begin();
bool found = false;
for(; it != dn.end(); ++it) {
@@ -141,7 +141,7 @@
/* and this is the other option */
- List<RDNObject> tmpDN;
+ std::list<RDNObject> tmpDN;
for(uint j = 0 ; j < lines.size(); ++j)
{
@@ -230,7 +230,7 @@
lastFieldName.startsWith("emailAddress", String::E_CASE_INSENSITIVE)))
{
// do we have a default for lastFiledName?
- blocxx::List<RDNObject>::const_iterator rdnIT;
+ std::list<RDNObject>::const_iterator rdnIT;
for(rdnIT = m_impl->dn.begin(); rdnIT != m_impl->dn.end(); ++rdnIT)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.cpp Thu Jun 3 18:38:59 2010
@@ -223,33 +223,38 @@
if (m_parser)
{
m_parser->inifile.Dir (path, stringList);
- if (stringList.find(key) != stringList.end())
- {
- ret = VALUE;
- }
+ StringList::const_iterator it;
+ for(it = stringList.begin(); it != stringList.end(); ++it)
+ {
+ if( key == *it)
+ ret = VALUE;
+ }
path.clear();
stringList.clear();
path.append("section");
path.appendArray (m_path);
m_parser->inifile.Dir (path, stringList);
- if (stringList.find(key) != stringList.end())
- {
- if (ret == VALUE)
- {
- ret = VALUEandSECTION;
- }
- else
- {
- ret = SECTION;
- }
- }
+ for(it = stringList.begin(); it != stringList.end(); ++it)
+ {
+ if( key == *it)
+ {
+ if (ret == VALUE)
+ {
+ ret = VALUEandSECTION;
+ }
+ else
+ {
+ ret = SECTION;
+ }
+ }
+ }
}
return ret;
}
// -------------------------------------------------------------------
-blocxx::List<blocxx::String> Section::getEntryKeys() const
+std::list<blocxx::String> Section::getEntryKeys() const
{
StringList entryKeys;
StringList stringList;
@@ -483,7 +488,7 @@
}
// -------------------------------------------------------------------
-blocxx::List<blocxx::String> Section::getSectionKeys() const
+std::list<blocxx::String> Section::getSectionKeys() const
{
StringList sectionList;
StringList stringList;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/INIParser.hpp Thu Jun 3 18:38:59 2010
@@ -183,9 +183,9 @@
/**
* Get all entry keys of a section in the order like they
* have been written to file.
- * @return blocxx::List<blocxx::String>
+ * @return std::list<blocxx::String>
*/
- blocxx::List<blocxx::String> getEntryKeys() const;
+ std::list<blocxx::String> getEntryKeys() const;
/**
@@ -277,9 +277,9 @@
/**
* Get all section keys of a section in the order like they
* have been written to file.
- * @return blocxx::List<blocxx::String>
+ * @return std::list<blocxx::String>
*/
- blocxx::List<blocxx::String> getSectionKeys() const;
+ std::list<blocxx::String> getSectionKeys() const;
/**
Modified: limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/INIParser/IniFile.h Thu Jun 3 18:38:59 2010
@@ -15,13 +15,12 @@
#define IniFile_h
#include <limal/Logger.hpp>
-#include <blocxx/List.hpp>
#include <blocxx/String.hpp>
#include <blocxx/Array.hpp>
#include <blocxx/Map.hpp>
#include <blocxx/IntrusiveReference.hpp>
#include "INIParser/INIParserDescr.hpp"
-
+#include <list>
#include <map>
#define INIPARSER "IniParser"
@@ -36,7 +35,7 @@
*/
struct SectionAll;
-typedef blocxx::List<SectionAll> SectionList;
+typedef std::list<SectionAll> SectionList;
struct SectionAll
{
@@ -49,7 +48,7 @@
SectionList sectionList;
};
-typedef blocxx::List<blocxx::String> StringList;
+typedef std::list<blocxx::String> StringList;
typedef blocxx::Map<blocxx::String, blocxx::String> StringMap;
/**
@@ -202,7 +201,7 @@
//enum IniType { VALUE, SECTION,};
struct IniContainerElement;
-typedef blocxx::List<IniContainerElement> IniContainer;
+typedef std::list<IniContainerElement> IniContainer;
typedef IniContainer::iterator IniIterator;
/** indices */
Modified: limal-branches/mc-devel/limal-ca-mgm/src/IssuerAlternativeNameExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/IssuerAlternativeNameExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/IssuerAlternativeNameExtension.cpp Thu Jun 3 18:38:59 2010
@@ -38,11 +38,11 @@
public:
IssuerAlternativeNameExtImpl()
: issuerCopy(false)
- , altNameList(blocxx::List<LiteralValue>())
+ , altNameList(std::list<LiteralValue>())
{}
IssuerAlternativeNameExtImpl(bool copyIssuer,
- const blocxx::List<LiteralValue> &alternativeNameList)
+ const std::list<LiteralValue> &alternativeNameList)
: issuerCopy(copyIssuer)
, altNameList(alternativeNameList)
{}
@@ -61,7 +61,7 @@
}
bool issuerCopy;
- blocxx::List<LiteralValue> altNameList;
+ std::list<LiteralValue> altNameList;
};
@@ -71,7 +71,7 @@
{}
IssuerAlternativeNameExt::IssuerAlternativeNameExt(bool copyIssuer,
- const blocxx::List<LiteralValue> &alternativeNameList)
+ const std::list<LiteralValue> &alternativeNameList)
: ExtensionBase()
, m_impl(new IssuerAlternativeNameExtImpl(copyIssuer, alternativeNameList))
{
@@ -167,7 +167,7 @@
}
void
-IssuerAlternativeNameExt::setAlternativeNameList(const blocxx::List<LiteralValue> &alternativeNameList)
+IssuerAlternativeNameExt::setAlternativeNameList(const std::list<LiteralValue> &alternativeNameList)
{
StringArray r = checkLiteralValueList(alternativeNameList);
if(!r.empty())
@@ -179,7 +179,7 @@
setPresent(true);
}
-blocxx::List<LiteralValue>
+std::list<LiteralValue>
IssuerAlternativeNameExt::getAlternativeNameList() const
{
if(!isPresent())
@@ -231,7 +231,7 @@
if(m_impl->issuerCopy) extString += "issuer:copy,";
String val;
- blocxx::List<LiteralValue>::const_iterator it = m_impl->altNameList.begin();
+ std::list<LiteralValue>::const_iterator it = m_impl->altNameList.begin();
for(int j = 0;it != m_impl->altNameList.end(); ++it, ++j)
{
val = "";
@@ -303,7 +303,7 @@
result.append("Issuer:copy = " + Bool(m_impl->issuerCopy).toString());
- blocxx::List< LiteralValue >::const_iterator it = m_impl->altNameList.begin();
+ std::list< LiteralValue >::const_iterator it = m_impl->altNameList.begin();
for(; it != m_impl->altNameList.end(); ++it)
{
result.appendArray((*it).dump());
Modified: limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/OpenSSLUtils.cpp Thu Jun 3 18:38:59 2010
@@ -212,8 +212,8 @@
blocxx::String errOutput;
int status = -1;
- blocxx::List<RDNObject> dnList = dn.getDN();
- blocxx::List<RDNObject>::const_iterator it;
+ std::list<RDNObject> dnList = dn.getDN();
+ std::list<RDNObject>::const_iterator it;
for(it = dnList.begin(); it != dnList.end(); ++it)
{
@@ -1857,7 +1857,7 @@
blocxx::Array<blocxx::String>
OpenSSLUtils::listCA(const String &repository)
{
- List<String> tmpList;
+ std::list<String> tmpList;
Array<String> retList;
int r = path::readDir(tmpList, repository, false);
@@ -1873,7 +1873,7 @@
tmpList.sort();
- List<String>::const_iterator cont;
+ std::list<String>::const_iterator cont;
path::PathInfo pi(repository);
@@ -2056,7 +2056,7 @@
const String &repository)
{
Array<Map<String, String> > ret;
- List<String> tmpList;
+ std::list<String> tmpList;
String reqDir = repository + "/" + caName + "/req/";
@@ -2074,7 +2074,7 @@
tmpList.sort();
Array<Array<String> > camdb = OpenSSLUtils::parseCAMDB(caName, repository);
- List<String>::const_iterator cont;
+ std::list<String>::const_iterator cont;
path::PathInfo pi(reqDir);
for(cont = tmpList.begin(); cont != tmpList.end(); ++cont)
@@ -2208,7 +2208,7 @@
const String &repository)
{
Array<Map<String, String> > ret;
- List<String> tmpList;
+ std::list<String> tmpList;
String certDir = repository + "/" + caName + "/newcerts/";
@@ -2226,7 +2226,7 @@
tmpList.sort();
Array<Array<String> > indexTXT = OpenSSLUtils::parseIndexTXT(caName, repository);
- List<String>::const_iterator cont;
+ std::list<String>::const_iterator cont;
path::PathInfo pi(certDir);
for(cont = tmpList.begin(); cont != tmpList.end(); ++cont)
Modified: limal-branches/mc-devel/limal-ca-mgm/src/PathUtils.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/PathUtils.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/PathUtils.cpp Thu Jun 3 18:38:59 2010
@@ -278,7 +278,7 @@
//
// DESCRIPTION :
//
-int readDir( List<String> & retlist,
+int readDir( std::list<String> & retlist,
const PathName & path, bool dots )
{
retlist.clear();
Modified: limal-branches/mc-devel/limal-ca-mgm/src/SubjectAlternativeNameExtension.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/SubjectAlternativeNameExtension.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/SubjectAlternativeNameExtension.cpp Thu Jun 3 18:38:59 2010
@@ -38,11 +38,11 @@
public:
SubjectAlternativeNameExtImpl()
: emailCopy(false)
- , altNameList(blocxx::List<LiteralValue>())
+ , altNameList(std::list<LiteralValue>())
{}
SubjectAlternativeNameExtImpl(bool copyEmail,
- const blocxx::List<LiteralValue> &alternativeNameList)
+ const std::list<LiteralValue> &alternativeNameList)
: emailCopy(copyEmail)
, altNameList(alternativeNameList)
{}
@@ -61,7 +61,7 @@
}
bool emailCopy;
- blocxx::List<LiteralValue> altNameList;
+ std::list<LiteralValue> altNameList;
};
@@ -117,7 +117,7 @@
}
SubjectAlternativeNameExt::SubjectAlternativeNameExt(bool copyEmail,
- const blocxx::List<LiteralValue> &alternativeNameList)
+ const std::list<LiteralValue> &alternativeNameList)
: ExtensionBase()
, m_impl(new SubjectAlternativeNameExtImpl(copyEmail, alternativeNameList))
{
@@ -160,7 +160,7 @@
}
void
-SubjectAlternativeNameExt::setAlternativeNameList(const blocxx::List<LiteralValue> &alternativeNameList)
+SubjectAlternativeNameExt::setAlternativeNameList(const std::list<LiteralValue> &alternativeNameList)
{
StringArray r = checkLiteralValueList(alternativeNameList);
if(!r.empty())
@@ -183,7 +183,7 @@
return m_impl->emailCopy;
}
-blocxx::List<LiteralValue>
+std::list<LiteralValue>
SubjectAlternativeNameExt::getAlternativeNameList() const
{
if(!isPresent())
@@ -221,7 +221,7 @@
if(m_impl->emailCopy) extString += "email:copy,";
String val;
- blocxx::List<LiteralValue>::const_iterator it = m_impl->altNameList.begin();
+ std::list<LiteralValue>::const_iterator it = m_impl->altNameList.begin();
for(int j = 0;it != m_impl->altNameList.end(); ++it, ++j)
{
val = "";
@@ -288,7 +288,7 @@
result.append("email:copy = " + Bool(m_impl->emailCopy).toString());
- blocxx::List< LiteralValue >::const_iterator it = m_impl->altNameList.begin();
+ std::list< LiteralValue >::const_iterator it = m_impl->altNameList.begin();
for(; it != m_impl->altNameList.end(); ++it)
{
result.appendArray((*it).dump());
Modified: limal-branches/mc-devel/limal-ca-mgm/src/Utils.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/Utils.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/Utils.hpp Thu Jun 3 18:38:59 2010
@@ -177,10 +177,10 @@
}
inline blocxx::StringArray
- checkLiteralValueList(const blocxx::List<LiteralValue>& list)
+ checkLiteralValueList(const std::list<LiteralValue>& list)
{
blocxx::StringArray result;
- blocxx::List<LiteralValue>::const_iterator it = list.begin();
+ std::list<LiteralValue>::const_iterator it = list.begin();
for(;it != list.end(); it++) {
result.appendArray((*it).verify());
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/ValueCheck.cpp Thu Jun 3 18:38:59 2010
@@ -133,7 +133,7 @@
if( !m_list.empty())
{
- blocxx::List<ValueCheck>::const_iterator i;
+ std::list<ValueCheck>::const_iterator i;
for( i = m_list.begin(); i != m_list.end(); ++i)
{
if( i->m_cop == E_AND)
@@ -163,7 +163,7 @@
String res(m_self->explain(value));
if( !m_list.empty())
{
- blocxx::List<ValueCheck>::const_iterator i;
+ std::list<ValueCheck>::const_iterator i;
for( i = m_list.begin(); i != m_list.end(); ++i)
{
if( i->m_cop == E_AND)
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3CRLExtensions_Priv.cpp Thu Jun 3 18:38:59 2010
@@ -141,7 +141,7 @@
int j;
GENERAL_NAME *gen;
- blocxx::List<LiteralValue> lvList;
+ std::list<LiteralValue> lvList;
for(j = 0; j < sk_GENERAL_NAME_num(gns); j++)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3CertificateExtensions_Priv.cpp Thu Jun 3 18:38:59 2010
@@ -710,7 +710,7 @@
int j;
GENERAL_NAME *gen;
- blocxx::List<LiteralValue> lvList;
+ std::list<LiteralValue> lvList;
for(j = 0; j < sk_GENERAL_NAME_num(gns); j++)
{
@@ -779,7 +779,7 @@
int j;
GENERAL_NAME *gen;
- blocxx::List<LiteralValue> lvList;
+ std::list<LiteralValue> lvList;
for(j = 0; j < sk_GENERAL_NAME_num(gns); j++)
{
@@ -850,7 +850,7 @@
DIST_POINT *point;
int i, j;
GENERAL_NAME *gen;
- blocxx::List<LiteralValue> lvList;
+ std::list<LiteralValue> lvList;
for(i = 0; i < sk_DIST_POINT_num(cdps); i++)
{
@@ -925,7 +925,7 @@
ACCESS_DESCRIPTION *desc;
int i;
char objtmp[80];
- blocxx::List<AuthorityInformation> infolist;
+ std::list<AuthorityInformation> infolist;
for(i = 0; i < sk_ACCESS_DESCRIPTION_num(ainf); i++)
@@ -1011,7 +1011,7 @@
int i;
POLICYINFO *pinfo;
char obj_tmp[256];
- blocxx::List<CertificatePolicy> policies;
+ std::list<CertificatePolicy> policies;
/* First print out the policy OIDs */
for(i = 0; i < sk_POLICYINFO_num(cps); i++)
@@ -1027,7 +1027,7 @@
POLICYQUALINFO *qualinfo;
int j;
StringList cpsURI;
- blocxx::List<UserNotice> noticeList;
+ std::list<UserNotice> noticeList;
UserNotice un;
char *s;
@@ -1052,7 +1052,7 @@
if(qualinfo->d.usernotice->noticeref)
{
NOTICEREF *ref;
- blocxx::List<blocxx::Int32> numberList;
+ std::list<blocxx::Int32> numberList;
ref = qualinfo->d.usernotice->noticeref;
Modified: limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions_Priv.cpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions_Priv.cpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/X509v3RequestExtensions_Priv.cpp Thu Jun 3 18:38:59 2010
@@ -445,7 +445,7 @@
int j;
GENERAL_NAME *gen;
- blocxx::List<LiteralValue> lvList;
+ std::list<LiteralValue> lvList;
for(j = 0; j < sk_GENERAL_NAME_num(gns); j++)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/PathName.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/PathName.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/PathName.hpp Thu Jun 3 18:38:59 2010
@@ -63,7 +63,7 @@
class PathName
{
public:
- typedef blocxx::List<blocxx::String> List;
+ typedef std::list<blocxx::String> List;
/**
* @brief Create an empty PathName object.
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/PathUtils.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/PathUtils.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/PathUtils.hpp Thu Jun 3 18:38:59 2010
@@ -126,7 +126,7 @@
*
* @return 0 on success, errno on failure.
**/
- int readDir(blocxx::List<blocxx::String> & retlist,
+ int readDir(std::list<blocxx::String> & retlist,
const PathName& path, bool dots);
/**
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueCheck.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueCheck.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ValueCheck.hpp Thu Jun 3 18:38:59 2010
@@ -359,7 +359,7 @@
/**
* List of further checks in the chain.
*/
- blocxx::List<ValueCheck> m_list;
+ std::list<ValueCheck> m_list;
};
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityInfoAccessExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityInfoAccessExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/AuthorityInfoAccessExtension.hpp Thu Jun 3 18:38:59 2010
@@ -188,12 +188,12 @@
* Set a new list of Authority Informations
*/
void
- setAuthorityInformation(const blocxx::List<AuthorityInformation>& infolist);
+ setAuthorityInformation(const std::list<AuthorityInformation>& infolist);
/**
* Return the list with Authority Informations
*/
- blocxx::List<AuthorityInformation>
+ std::list<AuthorityInformation>
getAuthorityInformation() const;
/**
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CA.hpp Thu Jun 3 18:38:59 2010
@@ -619,7 +619,7 @@
*
* @return a list of lists of the available CAs
*/
- static blocxx::List<blocxx::Array<blocxx::String> >
+ static std::list<blocxx::Array<blocxx::String> >
getCATree(const String& repos=REPOSITORY);
/**
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CAConfig.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CAConfig.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CAConfig.hpp Thu Jun 3 18:38:59 2010
@@ -77,7 +77,7 @@
/**
* Return a List of all Keys in Section <b>section</b>.
*/
- blocxx::List<blocxx::String>
+ std::list<blocxx::String>
getKeylist(const String §ion) const;
/**
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLDistributionPointsExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLDistributionPointsExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CRLDistributionPointsExtension.hpp Thu Jun 3 18:38:59 2010
@@ -50,9 +50,9 @@
#endif
void
- setCRLDistributionPoints(blocxx::List<LiteralValue>);
+ setCRLDistributionPoints(std::list<LiteralValue>);
- blocxx::List<LiteralValue>
+ std::list<LiteralValue>
getCRLDistributionPoints() const;
virtual void
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CertificatePoliciesExtension.hpp Thu Jun 3 18:38:59 2010
@@ -59,12 +59,12 @@
void
setOrganizationNotice(const String& org,
- const blocxx::List<blocxx::Int32>& numbers);
+ const std::list<blocxx::Int32>& numbers);
String
getOrganization() const;
- blocxx::List<blocxx::Int32>
+ std::list<blocxx::Int32>
getNoticeNumbers() const;
virtual blocxx::String
@@ -124,9 +124,9 @@
getCpsURI() const;
void
- setUserNoticeList(const blocxx::List<UserNotice>& list);
+ setUserNoticeList(const std::list<UserNotice>& list);
- blocxx::List<UserNotice>
+ std::list<UserNotice>
getUserNoticeList() const;
virtual blocxx::String
@@ -158,13 +158,13 @@
checkCpsURIs(const StringList& cpsURIs) const;
blocxx::StringArray
- checkNoticeList(const blocxx::List<UserNotice>& list) const;
+ checkNoticeList(const std::list<UserNotice>& list) const;
};
class CertificatePoliciesExt : public ExtensionBase {
public:
CertificatePoliciesExt();
- CertificatePoliciesExt(const blocxx::List<CertificatePolicy>& policies);
+ CertificatePoliciesExt(const std::list<CertificatePolicy>& policies);
CertificatePoliciesExt(CAConfig* caConfig, Type type);
CertificatePoliciesExt(const CertificatePoliciesExt& extension);
virtual ~CertificatePoliciesExt();
@@ -183,9 +183,9 @@
isIA5orgEnabled() const;
void
- setPolicies(const blocxx::List<CertificatePolicy>& policies);
+ setPolicies(const std::list<CertificatePolicy>& policies);
- blocxx::List<CertificatePolicy>
+ std::list<CertificatePolicy>
getPolicies() const;
virtual void
@@ -204,7 +204,7 @@
blocxx::COWIntrusiveReference<CertificatePoliciesExtImpl> m_impl;
blocxx::StringArray
- checkPolicies(const blocxx::List<CertificatePolicy>& pl) const;
+ checkPolicies(const std::list<CertificatePolicy>& pl) const;
};
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/CommonData.hpp Thu Jun 3 18:38:59 2010
@@ -34,7 +34,7 @@
namespace CA_MGM_NAMESPACE {
typedef blocxx::String String;
- typedef blocxx::List<String> StringList;
+ typedef std::list<String> StringList;
enum Type {
E_Client_Req, //! Client Request
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/DNObject.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/DNObject.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/DNObject.hpp Thu Jun 3 18:38:59 2010
@@ -71,7 +71,7 @@
public:
DNObject();
DNObject(CAConfig* caConfig, Type type);
- DNObject(const blocxx::List<RDNObject> &dn);
+ DNObject(const std::list<RDNObject> &dn);
DNObject(const DNObject& dn);
virtual ~DNObject();
@@ -81,8 +81,8 @@
#endif
- void setDN(const blocxx::List<RDNObject> &dn);
- blocxx::List<RDNObject> getDN() const;
+ void setDN(const std::list<RDNObject> &dn);
+ std::list<RDNObject> getDN() const;
String getOpenSSLString() const;
@@ -96,7 +96,7 @@
private:
blocxx::StringArray
- checkRDNList(const blocxx::List<RDNObject>& list) const;
+ checkRDNList(const std::list<RDNObject>& list) const;
};
}
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/IssuerAlternativeNameExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/IssuerAlternativeNameExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/IssuerAlternativeNameExtension.hpp Thu Jun 3 18:38:59 2010
@@ -40,7 +40,7 @@
IssuerAlternativeNameExt();
IssuerAlternativeNameExt(bool copyIssuer,
- const blocxx::List<LiteralValue> &alternativeNameList);
+ const std::list<LiteralValue> &alternativeNameList);
IssuerAlternativeNameExt(CAConfig* caConfig, Type type);
@@ -62,9 +62,9 @@
getCopyIssuer() const;
void
- setAlternativeNameList(const blocxx::List<LiteralValue> &alternativeNameList);
+ setAlternativeNameList(const std::list<LiteralValue> &alternativeNameList);
- blocxx::List<LiteralValue>
+ std::list<LiteralValue>
getAlternativeNameList() const;
void
Modified: limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectAlternativeNameExtension.hpp
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectAlternativeNameExtension.hpp (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/limal/ca-mgm/SubjectAlternativeNameExtension.hpp Thu Jun 3 18:38:59 2010
@@ -41,7 +41,7 @@
SubjectAlternativeNameExt(CAConfig* caConfig, Type type);
SubjectAlternativeNameExt(bool copyEmail,
- const blocxx::List<LiteralValue> &alternativeNameList = blocxx::List<LiteralValue>());
+ const std::list<LiteralValue> &alternativeNameList = std::list<LiteralValue>());
SubjectAlternativeNameExt(const SubjectAlternativeNameExt& extension);
@@ -58,12 +58,12 @@
setCopyEmail(bool copyEmail);
void
- setAlternativeNameList(const blocxx::List<LiteralValue> &alternativeNameList = blocxx::List<LiteralValue>());
+ setAlternativeNameList(const std::list<LiteralValue> &alternativeNameList = std::list<LiteralValue>());
bool
getCopyEmail() const;
- blocxx::List<LiteralValue>
+ std::list<LiteralValue>
getAlternativeNameList() const;
virtual void
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CA5.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CA5.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CA5.cc Thu Jun 3 18:38:59 2010
@@ -94,8 +94,8 @@
cout << "============= write back unchanged" << endl;
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ std::list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
if((*dnit).getType() == "countryName")
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CA8.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CA8.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CA8.cc Thu Jun 3 18:38:59 2010
@@ -42,8 +42,8 @@
RequestGenerationData rgd = CA::getRootCARequestDefaults("./TestRepos/");
CertificateIssueData cid = CA::getRootCAIssueDefaults("./TestRepos/");
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ std::list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CAConfig.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CAConfig.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CAConfig.cc Thu Jun 3 18:38:59 2010
@@ -41,7 +41,7 @@
CAConfig *configDump = new CAConfig("openssl.cnf.tmpl.test");
configDump->dump();
- typedef blocxx::List<blocxx::String> StringList;
+ typedef std::list<blocxx::String> StringList;
StringList listKey = config->getKeylist("ca");
cout << "Key for section : ca" << endl;
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CRLTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CRLTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CRLTest.cc Thu Jun 3 18:38:59 2010
@@ -44,7 +44,7 @@
cgd.extensions().authorityKeyIdentifier().setKeyID(AuthorityKeyIdentifierGenerateExt::KeyID_always);
cgd.extensions().authorityKeyIdentifier().setIssuer(AuthorityKeyIdentifierGenerateExt::Issuer_always);
- List<LiteralValue> list;
+ std::list<LiteralValue> list;
list.push_back(LiteralValue("email", "me(a)my-company.com"));
list.push_back(LiteralValue("URI", "http://www.my-company.com/"));
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest.cc Thu Jun 3 18:38:59 2010
@@ -41,8 +41,8 @@
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Client_Req);
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ std::list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest2.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest2.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest2.cc Thu Jun 3 18:38:59 2010
@@ -41,8 +41,8 @@
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ std::list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest3.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest3.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest3.cc Thu Jun 3 18:38:59 2010
@@ -43,8 +43,8 @@
// ------------------------ Set DN --------------------------------
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
@@ -119,7 +119,7 @@
// ------------------------ create alternative extension -----------------------------
- List<LiteralValue> list;
+ list<LiteralValue> list;
list.push_back(LiteralValue("IP", "164.34.35.184"));
list.push_back(LiteralValue("IP", "2001:780:101:a00:211:11ff:fee6:a5af"));
list.push_back(LiteralValue("DNS", "ca.my-company.com"));
@@ -132,7 +132,7 @@
// ---------------- create authority information extension ------------------------
- List<AuthorityInformation> info;
+ std::list<ca_mgm::AuthorityInformation> info;
info.push_back(AuthorityInformation("OCSP",
LiteralValue("URI", "http://www.my-company.com/ocsp.pl")));
info.push_back(AuthorityInformation("caIssuers",
@@ -143,7 +143,7 @@
// ------------------------ create CRL dist point extension -----------------------
- List<LiteralValue> crldist;
+ std::list<ca_mgm::LiteralValue> crldist;
crldist.push_back(LiteralValue("URI", "ldap://ldap.my-company.com/?ou=PKI%2ddc=my-company%2ddc=com"));
CRLDistributionPointsExt crlDistributionPoints;
@@ -151,7 +151,7 @@
// -------------------- create certificate policy extension -----------------------
- blocxx::List<CertificatePolicy> p;
+ std::list<CertificatePolicy> p;
p.push_back(CertificatePolicy("1.12.35.1"));
CertificatePolicy p2;
@@ -162,7 +162,7 @@
slp.push_back("http://www2.my-company.com/");
p2.setCpsURI(slp);
- List<Int32> num;
+ std::list<Int32> num;
num.push_back(1);
num.push_back(5);
num.push_back(8);
@@ -171,7 +171,7 @@
un.setExplicitText("This is the explicite Text");
un.setOrganizationNotice("My Company", num);
- List<UserNotice> unl;
+ std::list<UserNotice> unl;
unl.push_back(un);
p2.setUserNoticeList(unl);
p.push_back(p2);
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest4.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest4.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest4.cc Thu Jun 3 18:38:59 2010
@@ -44,8 +44,8 @@
// ------------------------ Set DN --------------------------------
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ std::list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
@@ -119,7 +119,7 @@
// ------------------------ create alternative extension -----------------------------
- List<LiteralValue> list;
+ std::list<LiteralValue> list;
list.push_back(LiteralValue("IP", "164.34.35.184"));
list.push_back(LiteralValue("DNS", "ca.my-company.com"));
list.push_back(LiteralValue("RID", "1.2.3.4"));
@@ -133,7 +133,7 @@
// ---------------- create authority information extension ------------------------
- List<AuthorityInformation> info;
+ std::list<AuthorityInformation> info;
info.push_back(AuthorityInformation("OCSP",
LiteralValue("URI", "http://www.my-company.com/ocsp.pl")));
info.push_back(AuthorityInformation("caIssuers",
@@ -143,14 +143,14 @@
// ------------------------ create CRL dist point extension -----------------------
- List<LiteralValue> crldist;
+ std::list<LiteralValue> crldist;
crldist.push_back(LiteralValue("URI", "ldap://ldap.my-company.com/?ou=PKI%2ddc=my-company%2ddc=com"));
cid.extensions().crlDistributionPoints().setCRLDistributionPoints(crldist);
// -------------------- create certificate policy extension -----------------------
- blocxx::List<CertificatePolicy> p;
+ std::list<CertificatePolicy> p;
p.push_back(CertificatePolicy("1.12.35.1"));
CertificatePolicy p2;
@@ -161,7 +161,7 @@
slp.push_back("http://www2.my-company.com/");
p2.setCpsURI(slp);
- List<Int32> num;
+ std::list<Int32> num;
num.push_back(1);
num.push_back(5);
num.push_back(8);
@@ -170,7 +170,7 @@
un.setExplicitText("This is the explicite Text");
un.setOrganizationNotice("My Company", num);
- List<UserNotice> unl;
+ std::list<UserNotice> unl;
unl.push_back(un);
p2.setUserNoticeList(unl);
p.push_back(p2);
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest5.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest5.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest5.cc Thu Jun 3 18:38:59 2010
@@ -44,8 +44,8 @@
// ------------------------ Set DN --------------------------------
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ std::list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
@@ -91,7 +91,7 @@
// ------------------------ create alternative extension -----------------------------
- List<LiteralValue> list;
+ std::list<LiteralValue> list;
list.push_back(LiteralValue("DNS", "ca.my-company.com"));
list.push_back(LiteralValue("DNS", "127-55-2-80ca.my-company.com"));
list.push_back(LiteralValue("email", "me(a)my-company.com"));
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest6.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest6.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/CertificateTest6.cc Thu Jun 3 18:38:59 2010
@@ -44,8 +44,8 @@
// ------------------------ Set DN --------------------------------
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ std::list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
@@ -91,7 +91,7 @@
// ------------------------ create alternative extension -----------------------------
- List<LiteralValue> list;
+ std::list<LiteralValue> list;
list.push_back(LiteralValue("DNS", "ca.my-company.com"));
list.push_back(LiteralValue("DNS", "127-55-2-80 ca.my-company.com"));
list.push_back(LiteralValue("email", "me(a)my-company.com"));
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/ListCATreeTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/ListCATreeTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/ListCATreeTest.cc Thu Jun 3 18:38:59 2010
@@ -34,8 +34,8 @@
cout << "=================== start CA Tree List ======================" << endl;
- List<Array<blocxx::String> > tree = CA::getCATree("./TestRepos3/");
- List<Array<blocxx::String> >::const_iterator it_ext;
+ std::list<Array<blocxx::String> > tree = CA::getCATree("./TestRepos3/");
+ std::list<Array<blocxx::String> >::const_iterator it_ext;
for(it_ext = tree.begin(); it_ext != tree.end(); ++it_ext)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RequestTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RequestTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RequestTest.cc Thu Jun 3 18:38:59 2010
@@ -41,8 +41,8 @@
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ std::list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
@@ -84,7 +84,7 @@
rgd.extensions().extendedKeyUsage().setExtendedKeyUsage( sl );
- List<LiteralValue> list;
+ std::list<LiteralValue> list;
list.push_back(LiteralValue("email", "me(a)my-company.com"));
list.push_back(LiteralValue("URI", "http://www.my-company.com/"));
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest.cc Thu Jun 3 18:38:59 2010
@@ -41,8 +41,8 @@
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest2.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest2.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest2.cc Thu Jun 3 18:38:59 2010
@@ -42,8 +42,8 @@
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest3.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest3.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest3.cc Thu Jun 3 18:38:59 2010
@@ -42,8 +42,8 @@
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest4.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest4.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest4.cc Thu Jun 3 18:38:59 2010
@@ -42,8 +42,8 @@
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest5.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest5.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/RevokeTest5.cc Thu Jun 3 18:38:59 2010
@@ -42,8 +42,8 @@
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_Server_Req);
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ std::list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ std::list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/SubCATest.cc
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/SubCATest.cc (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/SubCATest.cc Thu Jun 3 18:38:59 2010
@@ -41,8 +41,8 @@
CA ca("Test_CA1", "system", "./TestRepos/");
RequestGenerationData rgd = ca.getRequestDefaults(E_CA_Req);
- List<RDNObject> dnl = rgd.getSubjectDN().getDN();
- List<RDNObject>::iterator dnit;
+ list<RDNObject> dnl = rgd.getSubjectDN().getDN();
+ list<RDNObject>::iterator dnit;
for(dnit = dnl.begin(); dnit != dnl.end(); ++dnit)
{
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/cam.txt Thu Jun 3 18:38:59 2010
@@ -1,14 +1,14 @@
-b4d4e48e6de644c953290eb2854a6ced-1275578579 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-bc5324c7f5c2a27492fb6795745b596b-1275578580 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1275578585 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1275578588 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-40717a16174dc4d516f6fa7ee8eeb18c-1275578592 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1275578600 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c293624b6a877f401407ce8f8f1f327e-1275578601 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
-b4d4e48e6de644c953290eb2854a6ced-1275578603 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
-c1943ae4b9bd7320fae3e29f217483e3-1275578604 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
-d816690a832b0e52becd255d3a62e975-1275578608 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-9198f6798d9da70d7cbfb67b610633f5-1275578610 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-3e248858337c2b46dc67a0f9389376dd-1275578612 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-bf04fdd95062554800c1556085f47063-1275578614 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-9797ac11af29f94b82c1e5b0499ab5f2-1275578617 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1275583073 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+bc5324c7f5c2a27492fb6795745b596b-1275583074 /C=DE/CN=Test Server Certificate\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1275583080 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1275583083 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+40717a16174dc4d516f6fa7ee8eeb18c-1275583087 /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1275583097 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c293624b6a877f401407ce8f8f1f327e-1275583098 /C=DE/L=Nuremberg/O=SUSE Linux GmbH/OU=IT/CN=SUSE User CA/emailAddress=security-team(a)suse.de
+b4d4e48e6de644c953290eb2854a6ced-1275583099 /C=DE/CN=Test CA\/SUSE Inc.\\Gmbh/emailAddress=suse(a)suse.de
+c1943ae4b9bd7320fae3e29f217483e3-1275583100 /C=DE/CN=Test Request/emailAddress=suse(a)suse.de
+d816690a832b0e52becd255d3a62e975-1275583105 /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+9198f6798d9da70d7cbfb67b610633f5-1275583107 /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+3e248858337c2b46dc67a0f9389376dd-1275583108 /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+bf04fdd95062554800c1556085f47063-1275583111 /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+9797ac11af29f94b82c1e5b0499ab5f2-1275583113 /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA1/index.txt Thu Jun 3 18:38:59 2010
@@ -1,11 +1,11 @@
-V 110603152300Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110603152300Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
-V 110603152303Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110603152306Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-V 110603152310Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
-R 110603152325Z 100603152327Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
-R 110603152328Z 100603152329Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
-R 110603152330Z 100603152331Z,keyTime,20100603170651Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
-R 110603152332Z 100603152333Z,CAkeyTime,20100603170653Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
-R 110603152334Z 100603152336Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
-V 120602152337Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
+V 110603163754Z 01 unknown /C=DE/CN=Test CA/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110603163754Z 02 unknown /C=DE/CN=Test Server Certificate/SUSE Inc.\Gmbh/emailAddress=suse(a)suse.de
+V 110603163758Z 03 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110603163801Z 04 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+V 110603163805Z 05 unknown /C=DE/CN=Full Test Certificate/emailAddress=suse(a)suse.de
+R 110603163822Z 100603163824Z 06 unknown /C=DE/CN=Test Certificate for revocation/emailAddress=suse(a)suse.de
+R 110603163825Z 100603163826Z,holdInstruction,holdInstructionCallIssuer 07 unknown /C=DE/CN=Test Certificate for revocation 2/emailAddress=suse(a)suse.de
+R 110603163827Z 100603163828Z,keyTime,20100603182148Z 08 unknown /C=DE/CN=Test Certificate for revocation 3/emailAddress=suse(a)suse.de
+R 110603163828Z 100603163830Z,CAkeyTime,20100603182150Z 09 unknown /C=DE/CN=Test Certificate for revocation 4/emailAddress=suse(a)suse.de
+R 110603163831Z 100603163832Z,holdInstruction,1.6.21.43 0A unknown /C=DE/CN=Test Certificate for revocation 5 oid test/emailAddress=suse(a)suse.de
+V 120602163833Z 0B unknown /C=DE/CN=Test Sub CA/emailAddress=suse(a)suse.de
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/.rand
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
Binary files - no diff available.
Modified: limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem (original)
+++ limal-branches/mc-devel/limal-ca-mgm/testsuite/TestRepos/Test_CA2/crl/crl.pem Thu Jun 3 18:38:59 2010
@@ -1,7 +1,7 @@
-----BEGIN X509 CRL-----
MIIC+TCCAeECAQEwDQYJKoZIhvcNAQEFBQAwQzELMAkGA1UEBhMCREUxFzAVBgNV
BAMTDlN0YXRpYyBUZXN0IENBMRswGQYJKoZIhvcNAQkBFgxzdXNlQHN1c2UuZGUX
-DTEwMDYwMzE1MjMzOVoXDTEwMDYwNDE1MjMzOVowgfAwEgIBAxcNMDUwODE4MTQx
+DTEwMDYwMzE2MzgzNFoXDTEwMDYwNDE2MzgzNFowgfAwEgIBAxcNMDUwODE4MTQx
MzIzWjAyAgEEFw0wNTA4MTgxNDEzMjVaMB4wCgYDVR0VBAMKAQYwEAYDVR0XBAkG
ByqGSM44AgIwOgIBBRcNMDUwODE4MTQxMzI2WjAmMAoGA1UdFQQDCgEBMBgGA1Ud
GAQRGA8yMDA1MDgxODE1NTY0NlowOgIBBhcNMDUwODE4MTQxMzI4WjAmMAoGA1Ud
@@ -9,10 +9,10 @@
ODE4WjAaMAoGA1UdFQQDCgEGMAwGA1UdFwQFBgMuFSugdzB1MHMGA1UdIwRsMGqA
FDIAwASkKojCPsrVvdhM01KIIH87oUekRTBDMQswCQYDVQQGEwJERTEXMBUGA1UE
AxMOU3RhdGljIFRlc3QgQ0ExGzAZBgkqhkiG9w0BCQEWDHN1c2VAc3VzZS5kZYIJ
-AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQCy23Xc+54EBr6/r++688NIU193
-2UR07U5B/ilig7y0rgm/+OPzB+hbs6UWNM2QZnCTNE1DNmwzEzjfR5rnanBDpNmd
-DKoig+zm72IeBa+n5N3k59pfhGBI2Axhj65lPqfKSiPQePrfm63xp/uIeDV58B+A
-WEYIqAuKGNRnxwOihD1TWDv6Xt/FXL6LfhRSZyRL4edErPTxy10fAMVcNbVu1est
-/6F/9TLHM3wAmw64+RxVMWpW86DDrd6lMj/4vxh/veyYno4D7rvxT+crpGRR8wRm
-U/guWEdU+KZN4sS4N2yEfrbXprO6gHxz53BiXWdYV6oPjWmg3rKVfSA3DV1z
+AI7xzphhj2SdMA0GCSqGSIb3DQEBBQUAA4IBAQChBhX5FmB+d+F5DAppJvaWjRbY
+X0zQK+NzxB1x4SIHje3n+k9G7EzMOiB2hbvpXQnH3Z/V79f6MT8YmvELDIMfoBG/
+FPPYg1GWnsU5vVQdW1AGuafk597lEt78w2Q80Y36bfkbinasFjHFI2xh72mNwovQ
+RmhDPuWCfwU0HAoAT7jqi+DQ380/te3OYVBxCPhEDhji0baU8toaEIyl9Kb1Sz7n
+ksqPqQg+hFdbAw3Ov4gdKyk9+V6cVal1mx+3GILtmeGt8UD1K4VZd3hWXbj04mJp
+ab24bcH1K23xAFomnHD1TI9xUupWY+hPWXLwe7nnTIlQpziipSCKhrdfvnVE
-----END X509 CRL-----
--
To unsubscribe, e-mail: limal-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: limal-commit+help(a)opensuse.org
1
0
r2665 - /limal-branches/mc-devel/limal-ca-mgm/src/Commands.hpp.in
by mcalmer@svn.opensuse.org 03 Jun '10
by mcalmer@svn.opensuse.org 03 Jun '10
03 Jun '10
Author: mcalmer
Date: Thu Jun 3 17:41:05 2010
New Revision: 2665
URL: http://svn.opensuse.org/viewcvs/limal?rev=2665&view=rev
Log:
fix namespace
Modified:
limal-branches/mc-devel/limal-ca-mgm/src/Commands.hpp.in
Modified: limal-branches/mc-devel/limal-ca-mgm/src/Commands.hpp.in
URL: http://svn.opensuse.org/viewcvs/limal/limal-branches/mc-devel/limal-ca-mgm/…
==============================================================================
--- limal-branches/mc-devel/limal-ca-mgm/src/Commands.hpp.in (original)
+++ limal-branches/mc-devel/limal-ca-mgm/src/Commands.hpp.in Thu Jun 3 17:41:05 2010
@@ -25,7 +25,7 @@
#ifndef LIMAL_CA_MGM_COMMANDS_HPP
#define LIMAL_CA_MGM_COMMANDS_HPP
-#include <limal/ca_mgm/config.h>
+#include <limal/ca-mgm/config.h>
#include <blocxx/String.hpp>
namespace CA_MGM_NAMESPACE {
--
To unsubscribe, e-mail: limal-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: limal-commit+help(a)opensuse.org
1
0