diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Conf.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Conf.h new file mode 100644 index 000000000..0463c58f0 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Conf.h @@ -0,0 +1,131 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Exports.h" + +#include +#include +#include + +namespace digidoc +{ +class X509Cert; +class DIGIDOCPP_EXPORT Conf +{ +public: + Conf(); + virtual ~Conf(); + static void init(Conf *conf); + static Conf* instance(); + + virtual int logLevel() const; + virtual std::string logFile() const; + DIGIDOCPP_DEPRECATED virtual std::string libdigidocConf() const; + DIGIDOCPP_DEPRECATED virtual std::string certsPath() const; + virtual std::string xsdPath() const; + virtual std::string PKCS11Driver() const; + + virtual std::string proxyHost() const; + virtual std::string proxyPort() const; + virtual std::string proxyUser() const; + virtual std::string proxyPass() const; + virtual bool proxyForceSSL() const; + virtual bool proxyTunnelSSL() const; + + virtual std::string digestUri() const; + virtual std::string signatureDigestUri() const; + virtual std::string ocsp(const std::string &issuer) const; + virtual std::string TSUrl() const; + virtual std::string verifyServiceUri() const; + + DIGIDOCPP_DEPRECATED virtual std::string PKCS12Cert() const; + DIGIDOCPP_DEPRECATED virtual std::string PKCS12Pass() const; + DIGIDOCPP_DEPRECATED virtual bool PKCS12Disable() const; + + virtual bool TSLAllowExpired() const; + virtual bool TSLAutoUpdate() const; + virtual std::string TSLCache() const; + virtual std::vector TSLCerts() const; + virtual bool TSLOnlineDigest() const; + virtual int TSLTimeOut() const; + virtual std::string TSLUrl() const; + +private: + DISABLE_COPY(Conf); + + static Conf *INSTANCE; +}; + +class DIGIDOCPP_EXPORT ConfV2: public Conf +{ +public: + ConfV2(); + ~ConfV2() override; + static ConfV2* instance(); + + virtual X509Cert verifyServiceCert() const; + +private: + DISABLE_COPY(ConfV2); +}; + +class DIGIDOCPP_EXPORT ConfV3: public ConfV2 +{ +public: + ConfV3(); + ~ConfV3() override; + static ConfV3* instance(); + + virtual std::set OCSPTMProfiles() const; + +private: + DISABLE_COPY(ConfV3); +}; + +class DIGIDOCPP_EXPORT ConfV4: public ConfV3 +{ +public: + ConfV4(); + ~ConfV4() override; + static ConfV4* instance(); + + virtual std::vector verifyServiceCerts() const; + +private: + DISABLE_COPY(ConfV4); +}; + +class DIGIDOCPP_EXPORT ConfV5: public ConfV4 +{ +public: + ConfV5(); + ~ConfV5() override; + static ConfV5* instance(); + + virtual std::vector TSCerts() const; + +private: + DISABLE_COPY(ConfV5); +}; + +using ConfCurrent = ConfV5; +#define CONF(method) (ConfCurrent::instance() ? ConfCurrent::instance()->method() : ConfCurrent().method()) +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Container.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Container.h new file mode 100644 index 000000000..92655e978 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Container.h @@ -0,0 +1,86 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Exports.h" + +#include +#include +#include + +namespace digidoc +{ +class DataFile; +class Exception; +class Signature; +class Signer; +using initCallBack = void (*)(const Exception *e); + +DIGIDOCPP_EXPORT std::string appInfo(); +DIGIDOCPP_EXPORT void initialize(const std::string &appInfo = "libdigidocpp", initCallBack callBack = nullptr); +DIGIDOCPP_EXPORT void initialize(const std::string &appInfo, const std::string &userAgent, initCallBack callBack = nullptr); +DIGIDOCPP_EXPORT void terminate(); +DIGIDOCPP_EXPORT std::string userAgent(); +DIGIDOCPP_EXPORT std::string version(); + +struct ContainerOpenCB { + virtual ~ContainerOpenCB() = default; + virtual bool validateOnline() const { return true; } +}; + +class DIGIDOCPP_EXPORT Container +{ +public: + virtual ~Container(); + + virtual void save(const std::string &path = "") = 0; + virtual std::string mediaType() const = 0; + + virtual void addDataFile(const std::string &path, const std::string &mediaType) = 0; + DIGIDOCPP_DEPRECATED virtual void addDataFile(std::istream *is, const std::string &fileName, const std::string &mediaType); + virtual std::vector dataFiles() const = 0; + virtual void removeDataFile(unsigned int index) = 0; + + void addAdESSignature(const std::vector &signature); + virtual void addAdESSignature(std::istream &signature) = 0; + virtual Signature* prepareSignature(Signer *signer) = 0; + virtual std::vector signatures() const = 0; + virtual void removeSignature(unsigned int index) = 0; + virtual Signature* sign(Signer *signer) = 0; + + virtual void addDataFile(std::unique_ptr is, const std::string &fileName, const std::string &mediaType); + + DIGIDOCPP_DEPRECATED static Container* create(const std::string &path); + static std::unique_ptr createPtr(const std::string &path); + DIGIDOCPP_DEPRECATED static Container* open(const std::string &path); + static std::unique_ptr openPtr(const std::string &path); + static std::unique_ptr openPtr(const std::string &path, digidoc::ContainerOpenCB *cb); + template + static void addContainerImplementation(); + +protected: + Container(); + unsigned int newSignatureId() const; + +private: + DISABLE_COPY(Container); +}; + +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/DataFile.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/DataFile.h new file mode 100644 index 000000000..38e4bde09 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/DataFile.h @@ -0,0 +1,49 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Exports.h" + +#include +#include + +namespace digidoc +{ + class DIGIDOCPP_EXPORT DataFile + { + + public: + virtual ~DataFile(); + virtual std::string id() const = 0; + virtual std::string fileName() const = 0; + virtual unsigned long fileSize() const = 0; + virtual std::string mediaType() const = 0; + + virtual std::vector calcDigest(const std::string &method) const = 0; + virtual void saveAs(std::ostream &os) const = 0; + virtual void saveAs(const std::string& path) const = 0; + + protected: + DataFile(); + + private: + DISABLE_COPY(DataFile); + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Exception.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Exception.h new file mode 100644 index 000000000..1f0d42a7a --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Exception.h @@ -0,0 +1,98 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Exports.h" + +#include +#include + +namespace digidoc +{ + class DIGIDOCPP_EXPORT Exception + { + public: + /** + * Exception code + */ + enum ExceptionCode { + General = 0, + NetworkError = 20, + HostNotFound = 101, + InvalidUrl = 102, + //Verification errors + CertificateIssuerMissing = 10, + CertificateRevoked = 5, + CertificateUnknown = 6, + OCSPBeforeTimeStamp = 19, + OCSPResponderMissing = 8, + OCSPCertMissing = 9, + OCSPTimeSlot = 7, + OCSPRequestUnauthorized = 11, + TSForbidden = 21, + TSTooManyRequests = 18, + //Pin exceptions + PINCanceled = 2, + PINFailed = 4, + PINIncorrect = 1, + PINLocked = 3, + //Warnings + ReferenceDigestWeak = 12, + SignatureDigestWeak = 13, + DataFileNameSpaceWarning = 14, + IssuerNameSpaceWarning = 15, + ProducedATLateWarning = 16, + MimeTypeWarning = 17, + //DDoc error codes + DDocError = 512 //DIGIDOCPP_DEPRECATED + }; + using Causes = std::vector; + + Exception(const std::string& file, int line, const std::string& msg); + Exception(const std::string& file, int line, const std::string& msg, const Exception& cause); + Exception(const Exception &other); + Exception(Exception &&other) DIGIDOCPP_NOEXCEPT; + virtual ~Exception(); + Exception &operator=(const Exception &other); + Exception &operator=(Exception &&other) DIGIDOCPP_NOEXCEPT; + + std::string file() const; + int line() const; + ExceptionCode code() const; + std::string msg() const; + Causes causes() const; + void addCause(const Exception& cause); + void setCode( ExceptionCode Code ); + + static void addWarningIgnore(ExceptionCode code); + static void setWarningIgnoreList(const std::vector &list); + static bool hasWarningIgnore(ExceptionCode code); + + private: + std::string m_file; + std::string m_msg; + int m_line; + Causes m_causes; + ExceptionCode m_code; + + static std::vector ignores; + }; + +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Exports.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Exports.h new file mode 100644 index 000000000..c337f9e5c --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Exports.h @@ -0,0 +1,65 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#ifdef WIN32 + #include + #ifdef digidocpp_EXPORTS + #define DIGIDOCPP_EXPORT __declspec(dllexport) + #else + #define DIGIDOCPP_EXPORT __declspec(dllimport) + #endif + #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + #define DIGIDOCPP_DEPRECATED __declspec(deprecated) + #else + #define DIGIDOCPP_DEPRECATED + #endif + #if _MSC_VER >= 1900 + #define DIGIDOCPP_NOEXCEPT noexcept + #else + #define DIGIDOCPP_NOEXCEPT + #endif + #define DIGIDOCPP_WARNING_PUSH __pragma(warning(push)) + #define DIGIDOCPP_WARNING_POP __pragma(warning(pop)) + #define DIGIDOCPP_WARNING_DISABLE_CLANG(text) + #define DIGIDOCPP_WARNING_DISABLE_GCC(text) + #define DIGIDOCPP_WARNING_DISABLE_MSVC(number) __pragma(warning(disable: number)) + #pragma warning( disable: 4251 ) // shut up std::vector warnings +#else + #define DIGIDOCPP_EXPORT __attribute__ ((visibility("default"))) + #define DIGIDOCPP_DEPRECATED __attribute__ ((__deprecated__)) + #define DIGIDOCPP_NOEXCEPT noexcept + #define DIGIDOCPP_DO_PRAGMA(text) _Pragma(#text) + #define DIGIDOCPP_WARNING_PUSH DIGIDOCPP_DO_PRAGMA(GCC diagnostic push) + #define DIGIDOCPP_WARNING_POP DIGIDOCPP_DO_PRAGMA(GCC diagnostic pop) + #if __clang__ + #define DIGIDOCPP_WARNING_DISABLE_CLANG(text) DIGIDOCPP_DO_PRAGMA(clang diagnostic ignored text) + #else + #define DIGIDOCPP_WARNING_DISABLE_CLANG(text) + #endif + #define DIGIDOCPP_WARNING_DISABLE_GCC(text) DIGIDOCPP_DO_PRAGMA(GCC diagnostic ignored text) + #define DIGIDOCPP_WARNING_DISABLE_MSVC(text) +#endif + +#define DISABLE_COPY(Class) \ + Class(const Class &) = delete; \ + Class &operator=(const Class &) = delete; \ + Class(Class &&) DIGIDOCPP_NOEXCEPT = delete; \ + Class &operator=(Class &&) DIGIDOCPP_NOEXCEPT = delete diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Signature.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Signature.h new file mode 100644 index 000000000..c078e1e04 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/Signature.h @@ -0,0 +1,119 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Exception.h" + +#include +#include + +namespace digidoc +{ + class X509Cert; + class DIGIDOCPP_EXPORT Signature + { + public: + class DIGIDOCPP_EXPORT Validator + { + public: + enum Status + { + Valid, + Warning, + NonQSCD, + Test, //DIGIDOCPP_DEPRECATED + Invalid, + Unknown + }; + + Validator(const Signature *s); + ~Validator(); + + std::string diagnostics() const; + Status status() const; + std::vector warnings() const; + + private: + DISABLE_COPY(Validator); + + void parseException(const Exception &e); + + struct Private; + Private *d; + }; + + static const std::string POLv1; + static const std::string POLv2; + + virtual ~Signature(); + + // DSig properties + virtual std::string id() const = 0; + virtual std::string claimedSigningTime() const = 0; + virtual std::string trustedSigningTime() const = 0; + virtual X509Cert signingCertificate() const = 0; + virtual std::string signatureMethod() const = 0; + virtual void validate() const = 0; + virtual std::vector dataToSign() const = 0; + virtual void setSignatureValue(const std::vector &signatureValue) = 0; + virtual void extendSignatureProfile(const std::string &profile); + + // Xades properties + virtual std::string policy() const; + virtual std::string SPUri() const; + virtual std::string profile() const = 0; + virtual std::string city() const; + virtual std::string stateOrProvince() const; + virtual std::string postalCode() const; + virtual std::string countryName() const; + virtual std::vector signerRoles() const; + + //TM profile properties + virtual std::string OCSPProducedAt() const; + virtual X509Cert OCSPCertificate() const; + DIGIDOCPP_DEPRECATED virtual std::vector OCSPNonce() const; + + //TS profile properties + virtual X509Cert TimeStampCertificate() const; + virtual std::string TimeStampTime() const; + + //TSA profile properties + virtual X509Cert ArchiveTimeStampCertificate() const; + virtual std::string ArchiveTimeStampTime() const; + + // Xades properties + virtual std::string streetAddress() const; + + // Other + virtual std::string signedBy() const; + + // DSig properties + virtual void validate(const std::string &policy) const; + + // Other + virtual std::vector messageImprint() const; + + protected: + Signature(); + + private: + DISABLE_COPY(Signature); + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/XmlConf.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/XmlConf.h new file mode 100644 index 000000000..2aa554281 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/XmlConf.h @@ -0,0 +1,315 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Conf.h" + +#include + +namespace digidoc +{ + +class DIGIDOCPP_EXPORT XmlConf: public Conf +{ +public: + explicit XmlConf(const std::string &path = "", const std::string &schema = ""); + ~XmlConf() override; + static XmlConf* instance(); + + int logLevel() const override; + std::string logFile() const override; + std::string PKCS11Driver() const override; + + std::string proxyHost() const override; + std::string proxyPort() const override; + std::string proxyUser() const override; + std::string proxyPass() const override; + bool proxyForceSSL() const override; + bool proxyTunnelSSL() const override; + + std::string digestUri() const override; + std::string signatureDigestUri() const override; + std::string ocsp(const std::string &issuer) const override; + std::string TSUrl() const override; + std::string verifyServiceUri() const override; + + DIGIDOCPP_DEPRECATED std::string PKCS12Cert() const override; + DIGIDOCPP_DEPRECATED std::string PKCS12Pass() const override; + DIGIDOCPP_DEPRECATED bool PKCS12Disable() const override; + + bool TSLAutoUpdate() const override; + std::string TSLCache() const override; + bool TSLOnlineDigest() const override; + int TSLTimeOut() const override; + + virtual void setProxyHost( const std::string &host ); + virtual void setProxyPort( const std::string &port ); + virtual void setProxyUser( const std::string &user ); + virtual void setProxyPass( const std::string &pass ); + virtual void setProxyTunnelSSL( bool enable ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Cert( const std::string &cert ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Pass( const std::string &pass ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Disable( bool disable ); + + virtual void setTSLOnlineDigest( bool enable ); + virtual void setTSLTimeOut( int timeOut ); + + virtual void setTSUrl(const std::string &url); + virtual void setVerifyServiceUri(const std::string &url); + +private: + DISABLE_COPY(XmlConf); + + class Private; + std::unique_ptr d; + friend class XmlConfV2; + friend class XmlConfV3; + friend class XmlConfV4; + friend class XmlConfV5; +}; + +class DIGIDOCPP_EXPORT XmlConfV2: public ConfV2 +{ +public: + explicit XmlConfV2(const std::string &path = "", const std::string &schema = ""); + ~XmlConfV2() override; + static XmlConfV2* instance(); + + int logLevel() const override; + std::string logFile() const override; + std::string PKCS11Driver() const override; + + std::string proxyHost() const override; + std::string proxyPort() const override; + std::string proxyUser() const override; + std::string proxyPass() const override; + bool proxyForceSSL() const override; + bool proxyTunnelSSL() const override; + + std::string digestUri() const override; + std::string signatureDigestUri() const override; + std::string ocsp(const std::string &issuer) const override; + std::string TSUrl() const override; + X509Cert verifyServiceCert() const override; + std::string verifyServiceUri() const override; + + DIGIDOCPP_DEPRECATED std::string PKCS12Cert() const override; + DIGIDOCPP_DEPRECATED std::string PKCS12Pass() const override; + DIGIDOCPP_DEPRECATED bool PKCS12Disable() const override; + + bool TSLAutoUpdate() const override; + std::string TSLCache() const override; + bool TSLOnlineDigest() const override; + int TSLTimeOut() const override; + + virtual void setProxyHost( const std::string &host ); + virtual void setProxyPort( const std::string &port ); + virtual void setProxyUser( const std::string &user ); + virtual void setProxyPass( const std::string &pass ); + virtual void setProxyTunnelSSL( bool enable ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Cert( const std::string &cert ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Pass( const std::string &pass ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Disable( bool disable ); + + virtual void setTSLOnlineDigest( bool enable ); + virtual void setTSLTimeOut( int timeOut ); + + virtual void setTSUrl(const std::string &url); + virtual void setVerifyServiceUri(const std::string &url); + +private: + DISABLE_COPY(XmlConfV2); + + std::unique_ptr d; +}; + +class DIGIDOCPP_EXPORT XmlConfV3: public ConfV3 +{ +public: + explicit XmlConfV3(const std::string &path = {}, const std::string &schema = {}); + ~XmlConfV3() override; + static XmlConfV3* instance(); + + int logLevel() const override; + std::string logFile() const override; + std::string PKCS11Driver() const override; + + std::string proxyHost() const override; + std::string proxyPort() const override; + std::string proxyUser() const override; + std::string proxyPass() const override; + bool proxyForceSSL() const override; + bool proxyTunnelSSL() const override; + + std::string digestUri() const override; + std::string signatureDigestUri() const override; + std::string ocsp(const std::string &issuer) const override; + std::set OCSPTMProfiles() const override; + std::string TSUrl() const override; + X509Cert verifyServiceCert() const override; + std::string verifyServiceUri() const override; + + DIGIDOCPP_DEPRECATED std::string PKCS12Cert() const override; + DIGIDOCPP_DEPRECATED std::string PKCS12Pass() const override; + DIGIDOCPP_DEPRECATED bool PKCS12Disable() const override; + + bool TSLAutoUpdate() const override; + std::string TSLCache() const override; + bool TSLOnlineDigest() const override; + int TSLTimeOut() const override; + + virtual void setProxyHost( const std::string &host ); + virtual void setProxyPort( const std::string &port ); + virtual void setProxyUser( const std::string &user ); + virtual void setProxyPass( const std::string &pass ); + virtual void setProxyTunnelSSL( bool enable ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Cert( const std::string &cert ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Pass( const std::string &pass ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Disable( bool disable ); + + virtual void setTSLOnlineDigest( bool enable ); + virtual void setTSLTimeOut( int timeOut ); + + virtual void setTSUrl(const std::string &url); + virtual void setVerifyServiceUri(const std::string &url); + +private: + DISABLE_COPY(XmlConfV3); + + std::unique_ptr d; +}; + +class DIGIDOCPP_EXPORT XmlConfV4: public ConfV4 +{ +public: + explicit XmlConfV4(const std::string &path = {}, const std::string &schema = {}); + ~XmlConfV4() override; + static XmlConfV4* instance(); + + int logLevel() const override; + std::string logFile() const override; + std::string PKCS11Driver() const override; + + std::string proxyHost() const override; + std::string proxyPort() const override; + std::string proxyUser() const override; + std::string proxyPass() const override; + bool proxyForceSSL() const override; + bool proxyTunnelSSL() const override; + + std::string digestUri() const override; + std::string signatureDigestUri() const override; + std::string ocsp(const std::string &issuer) const override; + std::set OCSPTMProfiles() const override; + std::string TSUrl() const override; + X509Cert verifyServiceCert() const override; + std::vector verifyServiceCerts() const override; + std::string verifyServiceUri() const override; + + DIGIDOCPP_DEPRECATED std::string PKCS12Cert() const override; + DIGIDOCPP_DEPRECATED std::string PKCS12Pass() const override; + DIGIDOCPP_DEPRECATED bool PKCS12Disable() const override; + + bool TSLAutoUpdate() const override; + std::string TSLCache() const override; + bool TSLOnlineDigest() const override; + int TSLTimeOut() const override; + + virtual void setProxyHost( const std::string &host ); + virtual void setProxyPort( const std::string &port ); + virtual void setProxyUser( const std::string &user ); + virtual void setProxyPass( const std::string &pass ); + virtual void setProxyTunnelSSL( bool enable ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Cert( const std::string &cert ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Pass( const std::string &pass ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Disable( bool disable ); + + virtual void setTSLOnlineDigest( bool enable ); + virtual void setTSLTimeOut( int timeOut ); + + virtual void setTSUrl(const std::string &url); + virtual void setVerifyServiceUri(const std::string &url); + +private: + DISABLE_COPY(XmlConfV4); + + std::unique_ptr d; +}; + +class DIGIDOCPP_EXPORT XmlConfV5: public ConfV5 +{ +public: + explicit XmlConfV5(const std::string &path = {}, const std::string &schema = {}); + ~XmlConfV5() override; + static XmlConfV5* instance(); + + int logLevel() const override; + std::string logFile() const override; + std::string PKCS11Driver() const override; + + std::string proxyHost() const override; + std::string proxyPort() const override; + std::string proxyUser() const override; + std::string proxyPass() const override; + bool proxyForceSSL() const override; + bool proxyTunnelSSL() const override; + + std::string digestUri() const override; + std::string signatureDigestUri() const override; + std::string ocsp(const std::string &issuer) const override; + std::set OCSPTMProfiles() const override; + std::vector TSCerts() const override; + std::string TSUrl() const override; + X509Cert verifyServiceCert() const override; + std::vector verifyServiceCerts() const override; + std::string verifyServiceUri() const override; + + DIGIDOCPP_DEPRECATED std::string PKCS12Cert() const override; + DIGIDOCPP_DEPRECATED std::string PKCS12Pass() const override; + DIGIDOCPP_DEPRECATED bool PKCS12Disable() const override; + + bool TSLAutoUpdate() const override; + std::string TSLCache() const override; + bool TSLOnlineDigest() const override; + int TSLTimeOut() const override; + + virtual void setProxyHost( const std::string &host ); + virtual void setProxyPort( const std::string &port ); + virtual void setProxyUser( const std::string &user ); + virtual void setProxyPass( const std::string &pass ); + virtual void setProxyTunnelSSL( bool enable ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Cert( const std::string &cert ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Pass( const std::string &pass ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Disable( bool disable ); + + virtual void setTSLOnlineDigest( bool enable ); + virtual void setTSLTimeOut( int timeOut ); + + virtual void setTSUrl(const std::string &url); + virtual void setVerifyServiceUri(const std::string &url); + +private: + DISABLE_COPY(XmlConfV5); + + std::unique_ptr d; +}; + +using XmlConfCurrent = XmlConfV5; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/PKCS11Signer.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/PKCS11Signer.h new file mode 100644 index 000000000..2445af9f6 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/PKCS11Signer.h @@ -0,0 +1,47 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Signer.h" + +namespace digidoc +{ + class DIGIDOCPP_EXPORT PKCS11Signer : public Signer + { + + public: + PKCS11Signer(const std::string& driver = ""); + ~PKCS11Signer() override; + + X509Cert cert() const override; + std::string method() const override; + std::vector sign(const std::string &method, const std::vector &digest) const override; + void setPin(const std::string &pin); + + protected: + virtual std::string pin(const X509Cert &certificate) const; + virtual X509Cert selectSigningCertificate(const std::vector &certificates) const; + + private: + DISABLE_COPY(PKCS11Signer); + class Private; + std::unique_ptr d; + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/PKCS12Signer.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/PKCS12Signer.h new file mode 100644 index 000000000..847b9ad3c --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/PKCS12Signer.h @@ -0,0 +1,41 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Signer.h" + +namespace digidoc +{ + class DIGIDOCPP_EXPORT PKCS12Signer : public Signer + { + + public: + PKCS12Signer(const std::string &path, const std::string &pass); + ~PKCS12Signer() override; + + X509Cert cert() const override; + std::vector sign(const std::string &method, const std::vector &digest) const override; + + private: + DISABLE_COPY(PKCS12Signer); + class Private; + std::unique_ptr d; + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/Signer.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/Signer.h new file mode 100644 index 000000000..539c78581 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/Signer.h @@ -0,0 +1,64 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "../Exception.h" + +#include + +namespace digidoc +{ + class X509Cert; + class DIGIDOCPP_EXPORT Signer + { + + public: + virtual ~Signer(); + + virtual X509Cert cert() const = 0; + virtual std::vector sign(const std::string &method, const std::vector &digest) const = 0; + virtual std::string method() const; + std::string profile() const; + bool usingENProfile() const; + + std::string city() const; + std::string streetAddress() const; + std::string stateOrProvince() const; + std::string postalCode() const; + std::string countryName() const; + std::vector signerRoles() const; + void setMethod(const std::string &method); + void setProfile(const std::string &profile); + void setENProfile(bool enable); + void setSignatureProductionPlace(const std::string &city, const std::string &stateOrProvince, + const std::string &postalCode, const std::string &countryName); + void setSignatureProductionPlaceV2(const std::string &city, const std::string &streetAddress, + const std::string &stateOrProvince, const std::string &postalCode, const std::string &countryName); + void setSignerRoles(const std::vector& signerRoles); + + protected: + Signer(); + + private: + DISABLE_COPY(Signer); + class Private; + std::unique_ptr d; + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/X509Cert.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/X509Cert.h new file mode 100644 index 000000000..ef7875d94 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Headers/crypto/X509Cert.h @@ -0,0 +1,113 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "../Exports.h" + +#include +#include +#include + +using ASN1_OBJECT = struct asn1_object_st; +using X509 = struct x509_st; + +namespace digidoc +{ + class DIGIDOCPP_EXPORT X509Cert + { + + public: + enum Format + { + Der, + Pem + }; + + enum KeyUsage + { + DigitalSignature = 0, + NonRepudiation, + KeyEncipherment, + DataEncipherment, + KeyAgreement, + KeyCertificateSign, + CRLSign, + EncipherOnly, + DecipherOnly + }; + + static const std::string QC_COMPLIANT; + static const std::string QC_SSCD; + static const std::string QC_QCP; + static const std::string QC_QCT; + + static const std::string QC_SYNTAX1; + static const std::string QC_SYNTAX2; + + static const std::string QCS_NATURAL; + static const std::string QCS_LEGAL; + + static const std::string QCT_ESIGN; + static const std::string QCT_ESEAL; + static const std::string QCT_WEB; + + static const std::string QCP_PUBLIC_WITH_SSCD; + static const std::string QCP_PUBLIC; + + static const std::string QCP_NATURAL; + static const std::string QCP_LEGAL; + static const std::string QCP_NATURAL_QSCD; + static const std::string QCP_LEGAL_QSCD; + static const std::string QCP_WEB; + + explicit X509Cert(X509 *cert = nullptr); + explicit X509Cert(const unsigned char *bytes, size_t size, Format format = Der); + explicit X509Cert(const std::vector &bytes, Format format = Der); + explicit X509Cert(const std::string &path, Format format = Pem); + X509Cert(X509Cert &&other) DIGIDOCPP_NOEXCEPT; + X509Cert(const X509Cert &other); + ~X509Cert(); + + std::string serial() const; + std::string issuerName(const std::string &obj = std::string()) const; + std::string subjectName(const std::string &obj = std::string()) const; + std::vector keyUsage() const; + std::vector certificatePolicies() const; + std::vector qcStatements() const; + bool isCA() const; + bool isValid(time_t *t = nullptr) const; + + X509* handle() const; + operator std::vector() const; + X509Cert& operator=(const X509Cert &other); + X509Cert& operator=(X509Cert &&other) DIGIDOCPP_NOEXCEPT; + operator bool() const; + bool operator !() const; + bool operator ==(X509 *other) const; + bool operator ==(const X509Cert &other) const; + bool operator !=(const X509Cert &other) const; + + private: + std::string toOID(ASN1_OBJECT *obj) const; + template + std::string toString(Func func, const std::string &obj) const; + std::shared_ptr cert; + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Info.plist b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Info.plist new file mode 100644 index 000000000..0b8c7ede1 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + digidocpp + CFBundleIconFile + + CFBundleIdentifier + ee.ria.digidocpp + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.17.0 + CFBundleSignature + ???? + CFBundleVersion + 1419 + CSResourcesFileMapped + + MinimumOSVersion + 13.0 + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/digidocpp b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/digidocpp new file mode 100755 index 000000000..1b6792b1b Binary files /dev/null and b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/digidocpp differ diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/digidocpp.conf b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/digidocpp.conf new file mode 100644 index 000000000..bdce2188c --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/digidocpp.conf @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/OpenDocument_dsig.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/OpenDocument_dsig.xsd new file mode 100644 index 000000000..1effc4eaa --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/OpenDocument_dsig.xsd @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/OpenDocument_manifest.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/OpenDocument_manifest.xsd new file mode 100644 index 000000000..f07e18ce5 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/OpenDocument_manifest.xsd @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/OpenDocument_manifest_v1_2.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/OpenDocument_manifest_v1_2.xsd new file mode 100644 index 000000000..9e5e86374 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/OpenDocument_manifest_v1_2.xsd @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/XAdES01903v132-201601-relaxed.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/XAdES01903v132-201601-relaxed.xsd new file mode 100644 index 000000000..c6d65a49c --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/XAdES01903v132-201601-relaxed.xsd @@ -0,0 +1,536 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/XAdES01903v132-201601.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/XAdES01903v132-201601.xsd new file mode 100644 index 000000000..0e446dc0e --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/XAdES01903v132-201601.xsd @@ -0,0 +1,532 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/XAdES01903v141-201601.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/XAdES01903v141-201601.xsd new file mode 100644 index 000000000..6606c00e5 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/XAdES01903v141-201601.xsd @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/conf.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/conf.xsd new file mode 100644 index 000000000..9f24fbe2d --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/conf.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/en_31916201v010101.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/en_31916201v010101.xsd new file mode 100644 index 000000000..1e88f1a8e --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/en_31916201v010101.xsd @@ -0,0 +1,65 @@ + + + + + + Schema for ASiCManifest – See ETSI EN 319 162 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Schema for parallel detached XAdES Signatures + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/ts_119612v020101_additionaltypes_xsd.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/ts_119612v020101_additionaltypes_xsd.xsd new file mode 100644 index 000000000..5df405d70 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/ts_119612v020101_additionaltypes_xsd.xsd @@ -0,0 +1,43 @@ + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.13 Pointers to other TSLs + +X509CertificateLocation element was specified in TS 102 231 v3.1.2 clause B.4.3 The ServiceDigitalIdentityType. It is now deprecated and is not used + +PublicKeyLocation element was specified in TS 102 231 v3.1.2 clause B.4.3 The ServiceDigitalIdentityType. It is now deprecated and is not used + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.2.3 OtherCriteria, bullet 1) ExtendedKeyUsage + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.3 TakenOverBy Extension + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.2.3 OtherCriteria, bullet 2) CertSubjectDNAttribute + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/ts_119612v020101_sie_xsd.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/ts_119612v020101_sie_xsd.xsd new file mode 100644 index 000000000..440b006c6 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/ts_119612v020101_sie_xsd.xsd @@ -0,0 +1,92 @@ + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2 Qualifications Extension + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.1 QualificationElement + + + + + + + + + + Please first try to use the CriteriaList before doing the OtherCriteria extension point. + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.2 CriteriaList + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.3 Qualifier + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.2.2 PolicySet + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.2.1 KeyUsage + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/ts_119612v020201_201601xsd.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/ts_119612v020201_201601xsd.xsd new file mode 100644 index 000000000..ca8192b33 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/ts_119612v020201_201601xsd.xsd @@ -0,0 +1,457 @@ + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.1.4 Language support + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.1.4 Language support + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.5 Scheme operator address + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.5.1 Scheme operator postal address + + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.5.2 Scheme operator electronic address + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.17 Scheme extensions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.1.4 Language support + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.18 Trust Service Provider List + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3 Scheme information + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.3 TSL type + + Specified in TS 119 612 v2.1.1 clause 5.3.4 Scheme operator name + + Specified in TS 119 612 v2.1.1 clause 5.3.6 Scheme name + + Specified in TS 119 612 v2.1.1 clause 5.3.7 Scheme information URI + + + + Specified in TS 119 612 v2.1.1 clause 5.3.9 Scheme type/community/rules + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.10 Scheme territory + + + Specified in TS 119 612 v2.1.1 clause 5.3.11 TSL policy/legal notice + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.15 Next update + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.13 Pointers to other TSLs + + + + + + + + + + + + + + + + + + pecified in TS 119 612 v2.1.1 clause 5.3.13 Pointers to other TSLs item b) from Format + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.13 Pointers to other TSLs item c) from Format + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.16 Distribution points + + + Specified in TS 119 612 v2.1.1 clause 5.3.18 Trust Service Provider List + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.4 TSP information + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.4.6 TSP Services (list of services) + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5 Service information + + + + + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.4 Service current status + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.7 Service supply points + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.1 Service type identifier + + + Specified in TS 119 612 v2.1.1 clause 5.5.3 Service digital identity + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.10 Service history + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.6 Service history instance + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.4 expiredCertsRevocationInfo Extension + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.1 additionalServiceInformation Extension + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/xml.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/xml.xsd new file mode 100644 index 000000000..3f4e85417 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/xml.xsd @@ -0,0 +1,117 @@ + + + + + + + See http://www.w3.org/XML/1998/namespace.html and + http://www.w3.org/TR/REC-xml for information about this namespace. + + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + + Note that local names in this namespace are intended to be defined + only by the World Wide Web Consortium or its subgroups. The + following names are currently defined in this namespace and should + not be used with conflicting semantics by any Working Group, + specification, or document instance: + + base (as an attribute name): denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification. + + lang (as an attribute name): denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification. + + space (as an attribute name): denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification. + + Father (in any context at all): denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + + In appreciation for his vision, leadership and dedication + the W3C XML Plenary on this 10th day of February, 2000 + reserves for Jon Bosak in perpetuity the XML name + xml:Father + + + + + This schema defines attributes and an attribute group + suitable for use by + schemas wishing to allow xml:base, xml:lang or xml:space attributes + on elements they define. + + To enable this, such a schema must import this schema + for the XML namespace, e.g. as follows: + <schema . . .> + . . . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/03/xml.xsd"/> + + Subsequently, qualified reference to any of the attributes + or the group defined below will have the desired effect, e.g. + + <type . . .> + . . . + <attributeGroup ref="xml:specialAttrs"/> + + will define a type which will schema-validate an instance + element with any of those attributes + + + + In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + http://www.w3.org/2001/03/xml.xsd. + At the date of issue it can also be found at + http://www.w3.org/2001/xml.xsd. + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML Schema + itself. In other words, if the XML Schema namespace changes, the version + of this document at + http://www.w3.org/2001/xml.xsd will change + accordingly; the version at + http://www.w3.org/2001/03/xml.xsd will not change. + + + + + + In due course, we should install the relevant ISO 2- and 3-letter + codes as the enumerated possible values . . . + + + + + + + + + + + + + + + See http://www.w3.org/TR/xmlbase/ for + information about this attribute. + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/xmldsig-core-schema.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/xmldsig-core-schema.xsd new file mode 100644 index 000000000..535d564e3 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/digidocpp.framework/schema/xmldsig-core-schema.xsd @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp.a b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp.a index b0260fbb6..a79a6a395 100644 Binary files a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp.a and b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp.a differ diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp_priv.a b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp_priv.a index 44ea75694..50f4cdc04 100644 Binary files a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp_priv.a and b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp_priv.a differ diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp_util.a b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp_util.a index ef6121bf5..2dafd039c 100644 Binary files a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp_util.a and b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libdigidocpp_util.a differ diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libminizip.a b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libminizip.a index 4875171a5..9639fb0c2 100644 Binary files a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libminizip.a and b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libminizip.a differ diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Conf.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Conf.h new file mode 100644 index 000000000..0463c58f0 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Conf.h @@ -0,0 +1,131 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Exports.h" + +#include +#include +#include + +namespace digidoc +{ +class X509Cert; +class DIGIDOCPP_EXPORT Conf +{ +public: + Conf(); + virtual ~Conf(); + static void init(Conf *conf); + static Conf* instance(); + + virtual int logLevel() const; + virtual std::string logFile() const; + DIGIDOCPP_DEPRECATED virtual std::string libdigidocConf() const; + DIGIDOCPP_DEPRECATED virtual std::string certsPath() const; + virtual std::string xsdPath() const; + virtual std::string PKCS11Driver() const; + + virtual std::string proxyHost() const; + virtual std::string proxyPort() const; + virtual std::string proxyUser() const; + virtual std::string proxyPass() const; + virtual bool proxyForceSSL() const; + virtual bool proxyTunnelSSL() const; + + virtual std::string digestUri() const; + virtual std::string signatureDigestUri() const; + virtual std::string ocsp(const std::string &issuer) const; + virtual std::string TSUrl() const; + virtual std::string verifyServiceUri() const; + + DIGIDOCPP_DEPRECATED virtual std::string PKCS12Cert() const; + DIGIDOCPP_DEPRECATED virtual std::string PKCS12Pass() const; + DIGIDOCPP_DEPRECATED virtual bool PKCS12Disable() const; + + virtual bool TSLAllowExpired() const; + virtual bool TSLAutoUpdate() const; + virtual std::string TSLCache() const; + virtual std::vector TSLCerts() const; + virtual bool TSLOnlineDigest() const; + virtual int TSLTimeOut() const; + virtual std::string TSLUrl() const; + +private: + DISABLE_COPY(Conf); + + static Conf *INSTANCE; +}; + +class DIGIDOCPP_EXPORT ConfV2: public Conf +{ +public: + ConfV2(); + ~ConfV2() override; + static ConfV2* instance(); + + virtual X509Cert verifyServiceCert() const; + +private: + DISABLE_COPY(ConfV2); +}; + +class DIGIDOCPP_EXPORT ConfV3: public ConfV2 +{ +public: + ConfV3(); + ~ConfV3() override; + static ConfV3* instance(); + + virtual std::set OCSPTMProfiles() const; + +private: + DISABLE_COPY(ConfV3); +}; + +class DIGIDOCPP_EXPORT ConfV4: public ConfV3 +{ +public: + ConfV4(); + ~ConfV4() override; + static ConfV4* instance(); + + virtual std::vector verifyServiceCerts() const; + +private: + DISABLE_COPY(ConfV4); +}; + +class DIGIDOCPP_EXPORT ConfV5: public ConfV4 +{ +public: + ConfV5(); + ~ConfV5() override; + static ConfV5* instance(); + + virtual std::vector TSCerts() const; + +private: + DISABLE_COPY(ConfV5); +}; + +using ConfCurrent = ConfV5; +#define CONF(method) (ConfCurrent::instance() ? ConfCurrent::instance()->method() : ConfCurrent().method()) +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Container.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Container.h new file mode 100644 index 000000000..92655e978 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Container.h @@ -0,0 +1,86 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Exports.h" + +#include +#include +#include + +namespace digidoc +{ +class DataFile; +class Exception; +class Signature; +class Signer; +using initCallBack = void (*)(const Exception *e); + +DIGIDOCPP_EXPORT std::string appInfo(); +DIGIDOCPP_EXPORT void initialize(const std::string &appInfo = "libdigidocpp", initCallBack callBack = nullptr); +DIGIDOCPP_EXPORT void initialize(const std::string &appInfo, const std::string &userAgent, initCallBack callBack = nullptr); +DIGIDOCPP_EXPORT void terminate(); +DIGIDOCPP_EXPORT std::string userAgent(); +DIGIDOCPP_EXPORT std::string version(); + +struct ContainerOpenCB { + virtual ~ContainerOpenCB() = default; + virtual bool validateOnline() const { return true; } +}; + +class DIGIDOCPP_EXPORT Container +{ +public: + virtual ~Container(); + + virtual void save(const std::string &path = "") = 0; + virtual std::string mediaType() const = 0; + + virtual void addDataFile(const std::string &path, const std::string &mediaType) = 0; + DIGIDOCPP_DEPRECATED virtual void addDataFile(std::istream *is, const std::string &fileName, const std::string &mediaType); + virtual std::vector dataFiles() const = 0; + virtual void removeDataFile(unsigned int index) = 0; + + void addAdESSignature(const std::vector &signature); + virtual void addAdESSignature(std::istream &signature) = 0; + virtual Signature* prepareSignature(Signer *signer) = 0; + virtual std::vector signatures() const = 0; + virtual void removeSignature(unsigned int index) = 0; + virtual Signature* sign(Signer *signer) = 0; + + virtual void addDataFile(std::unique_ptr is, const std::string &fileName, const std::string &mediaType); + + DIGIDOCPP_DEPRECATED static Container* create(const std::string &path); + static std::unique_ptr createPtr(const std::string &path); + DIGIDOCPP_DEPRECATED static Container* open(const std::string &path); + static std::unique_ptr openPtr(const std::string &path); + static std::unique_ptr openPtr(const std::string &path, digidoc::ContainerOpenCB *cb); + template + static void addContainerImplementation(); + +protected: + Container(); + unsigned int newSignatureId() const; + +private: + DISABLE_COPY(Container); +}; + +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/DataFile.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/DataFile.h new file mode 100644 index 000000000..38e4bde09 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/DataFile.h @@ -0,0 +1,49 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Exports.h" + +#include +#include + +namespace digidoc +{ + class DIGIDOCPP_EXPORT DataFile + { + + public: + virtual ~DataFile(); + virtual std::string id() const = 0; + virtual std::string fileName() const = 0; + virtual unsigned long fileSize() const = 0; + virtual std::string mediaType() const = 0; + + virtual std::vector calcDigest(const std::string &method) const = 0; + virtual void saveAs(std::ostream &os) const = 0; + virtual void saveAs(const std::string& path) const = 0; + + protected: + DataFile(); + + private: + DISABLE_COPY(DataFile); + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Exception.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Exception.h new file mode 100644 index 000000000..1f0d42a7a --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Exception.h @@ -0,0 +1,98 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Exports.h" + +#include +#include + +namespace digidoc +{ + class DIGIDOCPP_EXPORT Exception + { + public: + /** + * Exception code + */ + enum ExceptionCode { + General = 0, + NetworkError = 20, + HostNotFound = 101, + InvalidUrl = 102, + //Verification errors + CertificateIssuerMissing = 10, + CertificateRevoked = 5, + CertificateUnknown = 6, + OCSPBeforeTimeStamp = 19, + OCSPResponderMissing = 8, + OCSPCertMissing = 9, + OCSPTimeSlot = 7, + OCSPRequestUnauthorized = 11, + TSForbidden = 21, + TSTooManyRequests = 18, + //Pin exceptions + PINCanceled = 2, + PINFailed = 4, + PINIncorrect = 1, + PINLocked = 3, + //Warnings + ReferenceDigestWeak = 12, + SignatureDigestWeak = 13, + DataFileNameSpaceWarning = 14, + IssuerNameSpaceWarning = 15, + ProducedATLateWarning = 16, + MimeTypeWarning = 17, + //DDoc error codes + DDocError = 512 //DIGIDOCPP_DEPRECATED + }; + using Causes = std::vector; + + Exception(const std::string& file, int line, const std::string& msg); + Exception(const std::string& file, int line, const std::string& msg, const Exception& cause); + Exception(const Exception &other); + Exception(Exception &&other) DIGIDOCPP_NOEXCEPT; + virtual ~Exception(); + Exception &operator=(const Exception &other); + Exception &operator=(Exception &&other) DIGIDOCPP_NOEXCEPT; + + std::string file() const; + int line() const; + ExceptionCode code() const; + std::string msg() const; + Causes causes() const; + void addCause(const Exception& cause); + void setCode( ExceptionCode Code ); + + static void addWarningIgnore(ExceptionCode code); + static void setWarningIgnoreList(const std::vector &list); + static bool hasWarningIgnore(ExceptionCode code); + + private: + std::string m_file; + std::string m_msg; + int m_line; + Causes m_causes; + ExceptionCode m_code; + + static std::vector ignores; + }; + +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Exports.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Exports.h new file mode 100644 index 000000000..c337f9e5c --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Exports.h @@ -0,0 +1,65 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#ifdef WIN32 + #include + #ifdef digidocpp_EXPORTS + #define DIGIDOCPP_EXPORT __declspec(dllexport) + #else + #define DIGIDOCPP_EXPORT __declspec(dllimport) + #endif + #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + #define DIGIDOCPP_DEPRECATED __declspec(deprecated) + #else + #define DIGIDOCPP_DEPRECATED + #endif + #if _MSC_VER >= 1900 + #define DIGIDOCPP_NOEXCEPT noexcept + #else + #define DIGIDOCPP_NOEXCEPT + #endif + #define DIGIDOCPP_WARNING_PUSH __pragma(warning(push)) + #define DIGIDOCPP_WARNING_POP __pragma(warning(pop)) + #define DIGIDOCPP_WARNING_DISABLE_CLANG(text) + #define DIGIDOCPP_WARNING_DISABLE_GCC(text) + #define DIGIDOCPP_WARNING_DISABLE_MSVC(number) __pragma(warning(disable: number)) + #pragma warning( disable: 4251 ) // shut up std::vector warnings +#else + #define DIGIDOCPP_EXPORT __attribute__ ((visibility("default"))) + #define DIGIDOCPP_DEPRECATED __attribute__ ((__deprecated__)) + #define DIGIDOCPP_NOEXCEPT noexcept + #define DIGIDOCPP_DO_PRAGMA(text) _Pragma(#text) + #define DIGIDOCPP_WARNING_PUSH DIGIDOCPP_DO_PRAGMA(GCC diagnostic push) + #define DIGIDOCPP_WARNING_POP DIGIDOCPP_DO_PRAGMA(GCC diagnostic pop) + #if __clang__ + #define DIGIDOCPP_WARNING_DISABLE_CLANG(text) DIGIDOCPP_DO_PRAGMA(clang diagnostic ignored text) + #else + #define DIGIDOCPP_WARNING_DISABLE_CLANG(text) + #endif + #define DIGIDOCPP_WARNING_DISABLE_GCC(text) DIGIDOCPP_DO_PRAGMA(GCC diagnostic ignored text) + #define DIGIDOCPP_WARNING_DISABLE_MSVC(text) +#endif + +#define DISABLE_COPY(Class) \ + Class(const Class &) = delete; \ + Class &operator=(const Class &) = delete; \ + Class(Class &&) DIGIDOCPP_NOEXCEPT = delete; \ + Class &operator=(Class &&) DIGIDOCPP_NOEXCEPT = delete diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Signature.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Signature.h new file mode 100644 index 000000000..c078e1e04 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/Signature.h @@ -0,0 +1,119 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Exception.h" + +#include +#include + +namespace digidoc +{ + class X509Cert; + class DIGIDOCPP_EXPORT Signature + { + public: + class DIGIDOCPP_EXPORT Validator + { + public: + enum Status + { + Valid, + Warning, + NonQSCD, + Test, //DIGIDOCPP_DEPRECATED + Invalid, + Unknown + }; + + Validator(const Signature *s); + ~Validator(); + + std::string diagnostics() const; + Status status() const; + std::vector warnings() const; + + private: + DISABLE_COPY(Validator); + + void parseException(const Exception &e); + + struct Private; + Private *d; + }; + + static const std::string POLv1; + static const std::string POLv2; + + virtual ~Signature(); + + // DSig properties + virtual std::string id() const = 0; + virtual std::string claimedSigningTime() const = 0; + virtual std::string trustedSigningTime() const = 0; + virtual X509Cert signingCertificate() const = 0; + virtual std::string signatureMethod() const = 0; + virtual void validate() const = 0; + virtual std::vector dataToSign() const = 0; + virtual void setSignatureValue(const std::vector &signatureValue) = 0; + virtual void extendSignatureProfile(const std::string &profile); + + // Xades properties + virtual std::string policy() const; + virtual std::string SPUri() const; + virtual std::string profile() const = 0; + virtual std::string city() const; + virtual std::string stateOrProvince() const; + virtual std::string postalCode() const; + virtual std::string countryName() const; + virtual std::vector signerRoles() const; + + //TM profile properties + virtual std::string OCSPProducedAt() const; + virtual X509Cert OCSPCertificate() const; + DIGIDOCPP_DEPRECATED virtual std::vector OCSPNonce() const; + + //TS profile properties + virtual X509Cert TimeStampCertificate() const; + virtual std::string TimeStampTime() const; + + //TSA profile properties + virtual X509Cert ArchiveTimeStampCertificate() const; + virtual std::string ArchiveTimeStampTime() const; + + // Xades properties + virtual std::string streetAddress() const; + + // Other + virtual std::string signedBy() const; + + // DSig properties + virtual void validate(const std::string &policy) const; + + // Other + virtual std::vector messageImprint() const; + + protected: + Signature(); + + private: + DISABLE_COPY(Signature); + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/XmlConf.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/XmlConf.h new file mode 100644 index 000000000..2aa554281 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/XmlConf.h @@ -0,0 +1,315 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Conf.h" + +#include + +namespace digidoc +{ + +class DIGIDOCPP_EXPORT XmlConf: public Conf +{ +public: + explicit XmlConf(const std::string &path = "", const std::string &schema = ""); + ~XmlConf() override; + static XmlConf* instance(); + + int logLevel() const override; + std::string logFile() const override; + std::string PKCS11Driver() const override; + + std::string proxyHost() const override; + std::string proxyPort() const override; + std::string proxyUser() const override; + std::string proxyPass() const override; + bool proxyForceSSL() const override; + bool proxyTunnelSSL() const override; + + std::string digestUri() const override; + std::string signatureDigestUri() const override; + std::string ocsp(const std::string &issuer) const override; + std::string TSUrl() const override; + std::string verifyServiceUri() const override; + + DIGIDOCPP_DEPRECATED std::string PKCS12Cert() const override; + DIGIDOCPP_DEPRECATED std::string PKCS12Pass() const override; + DIGIDOCPP_DEPRECATED bool PKCS12Disable() const override; + + bool TSLAutoUpdate() const override; + std::string TSLCache() const override; + bool TSLOnlineDigest() const override; + int TSLTimeOut() const override; + + virtual void setProxyHost( const std::string &host ); + virtual void setProxyPort( const std::string &port ); + virtual void setProxyUser( const std::string &user ); + virtual void setProxyPass( const std::string &pass ); + virtual void setProxyTunnelSSL( bool enable ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Cert( const std::string &cert ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Pass( const std::string &pass ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Disable( bool disable ); + + virtual void setTSLOnlineDigest( bool enable ); + virtual void setTSLTimeOut( int timeOut ); + + virtual void setTSUrl(const std::string &url); + virtual void setVerifyServiceUri(const std::string &url); + +private: + DISABLE_COPY(XmlConf); + + class Private; + std::unique_ptr d; + friend class XmlConfV2; + friend class XmlConfV3; + friend class XmlConfV4; + friend class XmlConfV5; +}; + +class DIGIDOCPP_EXPORT XmlConfV2: public ConfV2 +{ +public: + explicit XmlConfV2(const std::string &path = "", const std::string &schema = ""); + ~XmlConfV2() override; + static XmlConfV2* instance(); + + int logLevel() const override; + std::string logFile() const override; + std::string PKCS11Driver() const override; + + std::string proxyHost() const override; + std::string proxyPort() const override; + std::string proxyUser() const override; + std::string proxyPass() const override; + bool proxyForceSSL() const override; + bool proxyTunnelSSL() const override; + + std::string digestUri() const override; + std::string signatureDigestUri() const override; + std::string ocsp(const std::string &issuer) const override; + std::string TSUrl() const override; + X509Cert verifyServiceCert() const override; + std::string verifyServiceUri() const override; + + DIGIDOCPP_DEPRECATED std::string PKCS12Cert() const override; + DIGIDOCPP_DEPRECATED std::string PKCS12Pass() const override; + DIGIDOCPP_DEPRECATED bool PKCS12Disable() const override; + + bool TSLAutoUpdate() const override; + std::string TSLCache() const override; + bool TSLOnlineDigest() const override; + int TSLTimeOut() const override; + + virtual void setProxyHost( const std::string &host ); + virtual void setProxyPort( const std::string &port ); + virtual void setProxyUser( const std::string &user ); + virtual void setProxyPass( const std::string &pass ); + virtual void setProxyTunnelSSL( bool enable ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Cert( const std::string &cert ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Pass( const std::string &pass ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Disable( bool disable ); + + virtual void setTSLOnlineDigest( bool enable ); + virtual void setTSLTimeOut( int timeOut ); + + virtual void setTSUrl(const std::string &url); + virtual void setVerifyServiceUri(const std::string &url); + +private: + DISABLE_COPY(XmlConfV2); + + std::unique_ptr d; +}; + +class DIGIDOCPP_EXPORT XmlConfV3: public ConfV3 +{ +public: + explicit XmlConfV3(const std::string &path = {}, const std::string &schema = {}); + ~XmlConfV3() override; + static XmlConfV3* instance(); + + int logLevel() const override; + std::string logFile() const override; + std::string PKCS11Driver() const override; + + std::string proxyHost() const override; + std::string proxyPort() const override; + std::string proxyUser() const override; + std::string proxyPass() const override; + bool proxyForceSSL() const override; + bool proxyTunnelSSL() const override; + + std::string digestUri() const override; + std::string signatureDigestUri() const override; + std::string ocsp(const std::string &issuer) const override; + std::set OCSPTMProfiles() const override; + std::string TSUrl() const override; + X509Cert verifyServiceCert() const override; + std::string verifyServiceUri() const override; + + DIGIDOCPP_DEPRECATED std::string PKCS12Cert() const override; + DIGIDOCPP_DEPRECATED std::string PKCS12Pass() const override; + DIGIDOCPP_DEPRECATED bool PKCS12Disable() const override; + + bool TSLAutoUpdate() const override; + std::string TSLCache() const override; + bool TSLOnlineDigest() const override; + int TSLTimeOut() const override; + + virtual void setProxyHost( const std::string &host ); + virtual void setProxyPort( const std::string &port ); + virtual void setProxyUser( const std::string &user ); + virtual void setProxyPass( const std::string &pass ); + virtual void setProxyTunnelSSL( bool enable ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Cert( const std::string &cert ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Pass( const std::string &pass ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Disable( bool disable ); + + virtual void setTSLOnlineDigest( bool enable ); + virtual void setTSLTimeOut( int timeOut ); + + virtual void setTSUrl(const std::string &url); + virtual void setVerifyServiceUri(const std::string &url); + +private: + DISABLE_COPY(XmlConfV3); + + std::unique_ptr d; +}; + +class DIGIDOCPP_EXPORT XmlConfV4: public ConfV4 +{ +public: + explicit XmlConfV4(const std::string &path = {}, const std::string &schema = {}); + ~XmlConfV4() override; + static XmlConfV4* instance(); + + int logLevel() const override; + std::string logFile() const override; + std::string PKCS11Driver() const override; + + std::string proxyHost() const override; + std::string proxyPort() const override; + std::string proxyUser() const override; + std::string proxyPass() const override; + bool proxyForceSSL() const override; + bool proxyTunnelSSL() const override; + + std::string digestUri() const override; + std::string signatureDigestUri() const override; + std::string ocsp(const std::string &issuer) const override; + std::set OCSPTMProfiles() const override; + std::string TSUrl() const override; + X509Cert verifyServiceCert() const override; + std::vector verifyServiceCerts() const override; + std::string verifyServiceUri() const override; + + DIGIDOCPP_DEPRECATED std::string PKCS12Cert() const override; + DIGIDOCPP_DEPRECATED std::string PKCS12Pass() const override; + DIGIDOCPP_DEPRECATED bool PKCS12Disable() const override; + + bool TSLAutoUpdate() const override; + std::string TSLCache() const override; + bool TSLOnlineDigest() const override; + int TSLTimeOut() const override; + + virtual void setProxyHost( const std::string &host ); + virtual void setProxyPort( const std::string &port ); + virtual void setProxyUser( const std::string &user ); + virtual void setProxyPass( const std::string &pass ); + virtual void setProxyTunnelSSL( bool enable ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Cert( const std::string &cert ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Pass( const std::string &pass ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Disable( bool disable ); + + virtual void setTSLOnlineDigest( bool enable ); + virtual void setTSLTimeOut( int timeOut ); + + virtual void setTSUrl(const std::string &url); + virtual void setVerifyServiceUri(const std::string &url); + +private: + DISABLE_COPY(XmlConfV4); + + std::unique_ptr d; +}; + +class DIGIDOCPP_EXPORT XmlConfV5: public ConfV5 +{ +public: + explicit XmlConfV5(const std::string &path = {}, const std::string &schema = {}); + ~XmlConfV5() override; + static XmlConfV5* instance(); + + int logLevel() const override; + std::string logFile() const override; + std::string PKCS11Driver() const override; + + std::string proxyHost() const override; + std::string proxyPort() const override; + std::string proxyUser() const override; + std::string proxyPass() const override; + bool proxyForceSSL() const override; + bool proxyTunnelSSL() const override; + + std::string digestUri() const override; + std::string signatureDigestUri() const override; + std::string ocsp(const std::string &issuer) const override; + std::set OCSPTMProfiles() const override; + std::vector TSCerts() const override; + std::string TSUrl() const override; + X509Cert verifyServiceCert() const override; + std::vector verifyServiceCerts() const override; + std::string verifyServiceUri() const override; + + DIGIDOCPP_DEPRECATED std::string PKCS12Cert() const override; + DIGIDOCPP_DEPRECATED std::string PKCS12Pass() const override; + DIGIDOCPP_DEPRECATED bool PKCS12Disable() const override; + + bool TSLAutoUpdate() const override; + std::string TSLCache() const override; + bool TSLOnlineDigest() const override; + int TSLTimeOut() const override; + + virtual void setProxyHost( const std::string &host ); + virtual void setProxyPort( const std::string &port ); + virtual void setProxyUser( const std::string &user ); + virtual void setProxyPass( const std::string &pass ); + virtual void setProxyTunnelSSL( bool enable ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Cert( const std::string &cert ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Pass( const std::string &pass ); + DIGIDOCPP_DEPRECATED virtual void setPKCS12Disable( bool disable ); + + virtual void setTSLOnlineDigest( bool enable ); + virtual void setTSLTimeOut( int timeOut ); + + virtual void setTSUrl(const std::string &url); + virtual void setVerifyServiceUri(const std::string &url); + +private: + DISABLE_COPY(XmlConfV5); + + std::unique_ptr d; +}; + +using XmlConfCurrent = XmlConfV5; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/PKCS11Signer.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/PKCS11Signer.h new file mode 100644 index 000000000..2445af9f6 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/PKCS11Signer.h @@ -0,0 +1,47 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Signer.h" + +namespace digidoc +{ + class DIGIDOCPP_EXPORT PKCS11Signer : public Signer + { + + public: + PKCS11Signer(const std::string& driver = ""); + ~PKCS11Signer() override; + + X509Cert cert() const override; + std::string method() const override; + std::vector sign(const std::string &method, const std::vector &digest) const override; + void setPin(const std::string &pin); + + protected: + virtual std::string pin(const X509Cert &certificate) const; + virtual X509Cert selectSigningCertificate(const std::vector &certificates) const; + + private: + DISABLE_COPY(PKCS11Signer); + class Private; + std::unique_ptr d; + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/PKCS12Signer.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/PKCS12Signer.h new file mode 100644 index 000000000..847b9ad3c --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/PKCS12Signer.h @@ -0,0 +1,41 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "Signer.h" + +namespace digidoc +{ + class DIGIDOCPP_EXPORT PKCS12Signer : public Signer + { + + public: + PKCS12Signer(const std::string &path, const std::string &pass); + ~PKCS12Signer() override; + + X509Cert cert() const override; + std::vector sign(const std::string &method, const std::vector &digest) const override; + + private: + DISABLE_COPY(PKCS12Signer); + class Private; + std::unique_ptr d; + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/Signer.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/Signer.h new file mode 100644 index 000000000..539c78581 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/Signer.h @@ -0,0 +1,64 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "../Exception.h" + +#include + +namespace digidoc +{ + class X509Cert; + class DIGIDOCPP_EXPORT Signer + { + + public: + virtual ~Signer(); + + virtual X509Cert cert() const = 0; + virtual std::vector sign(const std::string &method, const std::vector &digest) const = 0; + virtual std::string method() const; + std::string profile() const; + bool usingENProfile() const; + + std::string city() const; + std::string streetAddress() const; + std::string stateOrProvince() const; + std::string postalCode() const; + std::string countryName() const; + std::vector signerRoles() const; + void setMethod(const std::string &method); + void setProfile(const std::string &profile); + void setENProfile(bool enable); + void setSignatureProductionPlace(const std::string &city, const std::string &stateOrProvince, + const std::string &postalCode, const std::string &countryName); + void setSignatureProductionPlaceV2(const std::string &city, const std::string &streetAddress, + const std::string &stateOrProvince, const std::string &postalCode, const std::string &countryName); + void setSignerRoles(const std::vector& signerRoles); + + protected: + Signer(); + + private: + DISABLE_COPY(Signer); + class Private; + std::unique_ptr d; + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/X509Cert.h b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/X509Cert.h new file mode 100644 index 000000000..ef7875d94 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Headers/crypto/X509Cert.h @@ -0,0 +1,113 @@ +/* + * libdigidocpp + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#pragma once + +#include "../Exports.h" + +#include +#include +#include + +using ASN1_OBJECT = struct asn1_object_st; +using X509 = struct x509_st; + +namespace digidoc +{ + class DIGIDOCPP_EXPORT X509Cert + { + + public: + enum Format + { + Der, + Pem + }; + + enum KeyUsage + { + DigitalSignature = 0, + NonRepudiation, + KeyEncipherment, + DataEncipherment, + KeyAgreement, + KeyCertificateSign, + CRLSign, + EncipherOnly, + DecipherOnly + }; + + static const std::string QC_COMPLIANT; + static const std::string QC_SSCD; + static const std::string QC_QCP; + static const std::string QC_QCT; + + static const std::string QC_SYNTAX1; + static const std::string QC_SYNTAX2; + + static const std::string QCS_NATURAL; + static const std::string QCS_LEGAL; + + static const std::string QCT_ESIGN; + static const std::string QCT_ESEAL; + static const std::string QCT_WEB; + + static const std::string QCP_PUBLIC_WITH_SSCD; + static const std::string QCP_PUBLIC; + + static const std::string QCP_NATURAL; + static const std::string QCP_LEGAL; + static const std::string QCP_NATURAL_QSCD; + static const std::string QCP_LEGAL_QSCD; + static const std::string QCP_WEB; + + explicit X509Cert(X509 *cert = nullptr); + explicit X509Cert(const unsigned char *bytes, size_t size, Format format = Der); + explicit X509Cert(const std::vector &bytes, Format format = Der); + explicit X509Cert(const std::string &path, Format format = Pem); + X509Cert(X509Cert &&other) DIGIDOCPP_NOEXCEPT; + X509Cert(const X509Cert &other); + ~X509Cert(); + + std::string serial() const; + std::string issuerName(const std::string &obj = std::string()) const; + std::string subjectName(const std::string &obj = std::string()) const; + std::vector keyUsage() const; + std::vector certificatePolicies() const; + std::vector qcStatements() const; + bool isCA() const; + bool isValid(time_t *t = nullptr) const; + + X509* handle() const; + operator std::vector() const; + X509Cert& operator=(const X509Cert &other); + X509Cert& operator=(X509Cert &&other) DIGIDOCPP_NOEXCEPT; + operator bool() const; + bool operator !() const; + bool operator ==(X509 *other) const; + bool operator ==(const X509Cert &other) const; + bool operator !=(const X509Cert &other) const; + + private: + std::string toOID(ASN1_OBJECT *obj) const; + template + std::string toString(Func func, const std::string &obj) const; + std::shared_ptr cert; + }; +} diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Info.plist b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Info.plist new file mode 100644 index 000000000..0b8c7ede1 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + digidocpp + CFBundleIconFile + + CFBundleIdentifier + ee.ria.digidocpp + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.17.0 + CFBundleSignature + ???? + CFBundleVersion + 1419 + CSResourcesFileMapped + + MinimumOSVersion + 13.0 + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/digidocpp b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/digidocpp new file mode 100755 index 000000000..d768dca72 Binary files /dev/null and b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/digidocpp differ diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/digidocpp.conf b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/digidocpp.conf new file mode 100644 index 000000000..bdce2188c --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/digidocpp.conf @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/OpenDocument_dsig.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/OpenDocument_dsig.xsd new file mode 100644 index 000000000..1effc4eaa --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/OpenDocument_dsig.xsd @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/OpenDocument_manifest.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/OpenDocument_manifest.xsd new file mode 100644 index 000000000..f07e18ce5 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/OpenDocument_manifest.xsd @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/OpenDocument_manifest_v1_2.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/OpenDocument_manifest_v1_2.xsd new file mode 100644 index 000000000..9e5e86374 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/OpenDocument_manifest_v1_2.xsd @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/XAdES01903v132-201601-relaxed.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/XAdES01903v132-201601-relaxed.xsd new file mode 100644 index 000000000..c6d65a49c --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/XAdES01903v132-201601-relaxed.xsd @@ -0,0 +1,536 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/XAdES01903v132-201601.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/XAdES01903v132-201601.xsd new file mode 100644 index 000000000..0e446dc0e --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/XAdES01903v132-201601.xsd @@ -0,0 +1,532 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/XAdES01903v141-201601.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/XAdES01903v141-201601.xsd new file mode 100644 index 000000000..6606c00e5 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/XAdES01903v141-201601.xsd @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/conf.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/conf.xsd new file mode 100644 index 000000000..9f24fbe2d --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/conf.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/en_31916201v010101.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/en_31916201v010101.xsd new file mode 100644 index 000000000..1e88f1a8e --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/en_31916201v010101.xsd @@ -0,0 +1,65 @@ + + + + + + Schema for ASiCManifest – See ETSI EN 319 162 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Schema for parallel detached XAdES Signatures + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/ts_119612v020101_additionaltypes_xsd.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/ts_119612v020101_additionaltypes_xsd.xsd new file mode 100644 index 000000000..5df405d70 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/ts_119612v020101_additionaltypes_xsd.xsd @@ -0,0 +1,43 @@ + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.13 Pointers to other TSLs + +X509CertificateLocation element was specified in TS 102 231 v3.1.2 clause B.4.3 The ServiceDigitalIdentityType. It is now deprecated and is not used + +PublicKeyLocation element was specified in TS 102 231 v3.1.2 clause B.4.3 The ServiceDigitalIdentityType. It is now deprecated and is not used + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.2.3 OtherCriteria, bullet 1) ExtendedKeyUsage + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.3 TakenOverBy Extension + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.2.3 OtherCriteria, bullet 2) CertSubjectDNAttribute + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/ts_119612v020101_sie_xsd.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/ts_119612v020101_sie_xsd.xsd new file mode 100644 index 000000000..440b006c6 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/ts_119612v020101_sie_xsd.xsd @@ -0,0 +1,92 @@ + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2 Qualifications Extension + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.1 QualificationElement + + + + + + + + + + Please first try to use the CriteriaList before doing the OtherCriteria extension point. + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.2 CriteriaList + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.3 Qualifier + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.2.2 PolicySet + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.2.2.1 KeyUsage + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/ts_119612v020201_201601xsd.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/ts_119612v020201_201601xsd.xsd new file mode 100644 index 000000000..ca8192b33 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/ts_119612v020201_201601xsd.xsd @@ -0,0 +1,457 @@ + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.1.4 Language support + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.1.4 Language support + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.5 Scheme operator address + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.5.1 Scheme operator postal address + + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.5.2 Scheme operator electronic address + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.17 Scheme extensions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.1.4 Language support + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.18 Trust Service Provider List + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3 Scheme information + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.3 TSL type + + Specified in TS 119 612 v2.1.1 clause 5.3.4 Scheme operator name + + Specified in TS 119 612 v2.1.1 clause 5.3.6 Scheme name + + Specified in TS 119 612 v2.1.1 clause 5.3.7 Scheme information URI + + + + Specified in TS 119 612 v2.1.1 clause 5.3.9 Scheme type/community/rules + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.10 Scheme territory + + + Specified in TS 119 612 v2.1.1 clause 5.3.11 TSL policy/legal notice + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.15 Next update + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.13 Pointers to other TSLs + + + + + + + + + + + + + + + + + + pecified in TS 119 612 v2.1.1 clause 5.3.13 Pointers to other TSLs item b) from Format + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.13 Pointers to other TSLs item c) from Format + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.3.16 Distribution points + + + Specified in TS 119 612 v2.1.1 clause 5.3.18 Trust Service Provider List + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.4 TSP information + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.4.6 TSP Services (list of services) + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5 Service information + + + + + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.4 Service current status + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.7 Service supply points + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.1 Service type identifier + + + Specified in TS 119 612 v2.1.1 clause 5.5.3 Service digital identity + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.10 Service history + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.6 Service history instance + + + + + + + + + + + + + + + + + + + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.4 expiredCertsRevocationInfo Extension + + + Specified in TS 119 612 v2.1.1 clause 5.5.9.1 additionalServiceInformation Extension + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/xml.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/xml.xsd new file mode 100644 index 000000000..3f4e85417 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/xml.xsd @@ -0,0 +1,117 @@ + + + + + + + See http://www.w3.org/XML/1998/namespace.html and + http://www.w3.org/TR/REC-xml for information about this namespace. + + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + + Note that local names in this namespace are intended to be defined + only by the World Wide Web Consortium or its subgroups. The + following names are currently defined in this namespace and should + not be used with conflicting semantics by any Working Group, + specification, or document instance: + + base (as an attribute name): denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification. + + lang (as an attribute name): denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification. + + space (as an attribute name): denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification. + + Father (in any context at all): denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + + In appreciation for his vision, leadership and dedication + the W3C XML Plenary on this 10th day of February, 2000 + reserves for Jon Bosak in perpetuity the XML name + xml:Father + + + + + This schema defines attributes and an attribute group + suitable for use by + schemas wishing to allow xml:base, xml:lang or xml:space attributes + on elements they define. + + To enable this, such a schema must import this schema + for the XML namespace, e.g. as follows: + <schema . . .> + . . . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/03/xml.xsd"/> + + Subsequently, qualified reference to any of the attributes + or the group defined below will have the desired effect, e.g. + + <type . . .> + . . . + <attributeGroup ref="xml:specialAttrs"/> + + will define a type which will schema-validate an instance + element with any of those attributes + + + + In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + http://www.w3.org/2001/03/xml.xsd. + At the date of issue it can also be found at + http://www.w3.org/2001/xml.xsd. + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML Schema + itself. In other words, if the XML Schema namespace changes, the version + of this document at + http://www.w3.org/2001/xml.xsd will change + accordingly; the version at + http://www.w3.org/2001/03/xml.xsd will not change. + + + + + + In due course, we should install the relevant ISO 2- and 3-letter + codes as the enumerated possible values . . . + + + + + + + + + + + + + + + See http://www.w3.org/TR/xmlbase/ for + information about this attribute. + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/xmldsig-core-schema.xsd b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/xmldsig-core-schema.xsd new file mode 100644 index 000000000..535d564e3 --- /dev/null +++ b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/digidocpp.framework/schema/xmldsig-core-schema.xsd @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp.a b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp.a index 8c1045091..18f1ea98f 100644 Binary files a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp.a and b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp.a differ diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp_priv.a b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp_priv.a index d296c51b5..6e82404ee 100644 Binary files a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp_priv.a and b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp_priv.a differ diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp_util.a b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp_util.a index 50b7c12f5..989748e51 100644 Binary files a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp_util.a and b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libdigidocpp_util.a differ diff --git a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libminizip.a b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libminizip.a index 7b9d2f33e..c2175bd7f 100644 Binary files a/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libminizip.a and b/MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphonesimulator/lib/libminizip.a differ