Skip to content

Commit

Permalink
Updated libdigidocpp
Browse files Browse the repository at this point in the history
  • Loading branch information
martenrebane committed Oct 11, 2024
1 parent 1a7264e commit 1c483f7
Show file tree
Hide file tree
Showing 34 changed files with 94 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extern "C" {
*/
# define OPENSSL_VERSION_MAJOR 3
# define OPENSSL_VERSION_MINOR 0
# define OPENSSL_VERSION_PATCH 13
# define OPENSSL_VERSION_PATCH 15

/*
* Additional version information
Expand Down Expand Up @@ -74,21 +74,21 @@ extern "C" {
* longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and
* OPENSSL_VERSION_BUILD_METADATA_STR appended.
*/
# define OPENSSL_VERSION_STR "3.0.13"
# define OPENSSL_FULL_VERSION_STR "3.0.13"
# define OPENSSL_VERSION_STR "3.0.15"
# define OPENSSL_FULL_VERSION_STR "3.0.15"

/*
* SECTION 3: ADDITIONAL METADATA
*
* These strings are defined separately to allow them to be parsable.
*/
# define OPENSSL_RELEASE_DATE "30 Jan 2024"
# define OPENSSL_RELEASE_DATE "3 Sep 2024"

/*
* SECTION 4: BACKWARD COMPATIBILITY
*/

# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.13 30 Jan 2024"
# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.15 3 Sep 2024"

/* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */
# ifdef OPENSSL_VERSION_PRE_RELEASE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down Expand Up @@ -283,10 +283,12 @@
# define SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK 1086
# define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071
# define SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080
# define SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL 1120
# define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100
# define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070
# define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022
# define SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048
# define SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY 1115
# define SSL_R_TLSV1_ALERT_USER_CANCELLED 1090
# define SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE 1114
# define SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE 1113
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
* Copyright 2005 Nokia. All rights reserved.
*
Expand Down Expand Up @@ -210,6 +210,8 @@ extern "C" {
# define TLSEXT_max_fragment_length_1024 2
# define TLSEXT_max_fragment_length_2048 3
# define TLSEXT_max_fragment_length_4096 4
/* OpenSSL value for unset maximum fragment length extension */
# define TLSEXT_max_fragment_length_UNSPECIFIED 255

int SSL_CTX_set_tlsext_max_fragment_length(SSL_CTX *ctx, uint8_t mode);
int SSL_set_tlsext_max_fragment_length(SSL *ssl, uint8_t mode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ namespace digidoc
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;
Exception(Exception &&other) noexcept;
virtual ~Exception();
Exception &operator=(const Exception &other);
Exception &operator=(Exception &&other) DIGIDOCPP_NOEXCEPT;
Exception &operator=(Exception &&other) noexcept;

std::string file() const;
int line() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
#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)
Expand All @@ -45,7 +40,6 @@
#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)
Expand All @@ -61,5 +55,5 @@
#define DISABLE_COPY(Class) \
Class(const Class &) = delete; \
Class &operator=(const Class &) = delete; \
Class(Class &&) DIGIDOCPP_NOEXCEPT = delete; \
Class &operator=(Class &&) DIGIDOCPP_NOEXCEPT = delete
Class(Class &&) noexcept = delete; \
Class &operator=(Class &&) noexcept = delete
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace digidoc
{
class Signer;
class X509Cert;
class DIGIDOCPP_EXPORT Signature
{
Expand Down Expand Up @@ -73,7 +74,7 @@ namespace digidoc
virtual void validate() const = 0;
virtual std::vector<unsigned char> dataToSign() const = 0;
virtual void setSignatureValue(const std::vector<unsigned char> &signatureValue) = 0;
virtual void extendSignatureProfile(const std::string &profile);
DIGIDOCPP_DEPRECATED virtual void extendSignatureProfile(const std::string &profile);

// Xades properties
virtual std::string policy() const;
Expand Down Expand Up @@ -110,6 +111,9 @@ namespace digidoc
// Other
virtual std::vector<unsigned char> messageImprint() const;

// DSig properties
virtual void extendSignatureProfile(Signer *signer);

protected:
Signature();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ namespace digidoc
virtual std::vector<unsigned char> sign(const std::string &method, const std::vector<unsigned char> &digest) const = 0;
virtual std::string method() const;
std::string profile() const;
std::string userAgent() const;
bool usingENProfile() const;

std::string city() const;
Expand All @@ -46,6 +47,7 @@ namespace digidoc
std::vector<std::string> signerRoles() const;
void setMethod(const std::string &method);
void setProfile(const std::string &profile);
void setUserAgent(const std::string &userAgent);
void setENProfile(bool enable);
void setSignatureProductionPlace(const std::string &city, const std::string &stateOrProvince,
const std::string &postalCode, const std::string &countryName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "../Exports.h"

#include <initializer_list>
#include <memory>
#include <string>
#include <vector>
Expand Down Expand Up @@ -80,8 +81,10 @@ namespace digidoc
explicit X509Cert(X509 *cert = nullptr);
explicit X509Cert(const unsigned char *bytes, size_t size, Format format = Der);
explicit X509Cert(const std::vector<unsigned char> &bytes, Format format = Der);
inline explicit X509Cert(std::initializer_list<unsigned char> bytes, Format format = Der)
: X509Cert(bytes.begin(), bytes.size(), format) {}
explicit X509Cert(const std::string &path, Format format = Pem);
X509Cert(X509Cert &&other) DIGIDOCPP_NOEXCEPT;
X509Cert(X509Cert &&other) noexcept;
X509Cert(const X509Cert &other);
~X509Cert();

Expand All @@ -97,15 +100,15 @@ namespace digidoc
X509* handle() const;
operator std::vector<unsigned char>() const;
X509Cert& operator=(const X509Cert &other);
X509Cert& operator=(X509Cert &&other) DIGIDOCPP_NOEXCEPT;
X509Cert& operator=(X509Cert &&other) 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;
static std::string toOID(ASN1_OBJECT *obj);
template<typename Func>
std::string toString(Func func, const std::string &obj) const;
std::shared_ptr<X509> cert;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.18.0</string>
<string>4.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1422</string>
<string>1430</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>MinimumOSVersion</key>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!--<param name="proxy.pass" lock="false"></param>-->

<!--Time-stamping service settings-->
<!--<param name="ts.url" lock="false">http://dd-at.ria.ee/tsa</param>-->
<!--<param name="ts.url" lock="false">https://eid-dd.ria.ee/ts</param>-->

<!--TSL settings-->
<!--<param name="tsl.autoupdate" lock="false">true</param>-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsig="urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0">
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
<xs:import namespace="http://uri.etsi.org/01903/v1.3.2#" schemaLocation="XAdES01903v132-201601.xsd"/>
<xs:import namespace="http://uri.etsi.org/01903/v1.4.1#" schemaLocation="XAdES01903v141-201601.xsd"/>
<xs:element name="document-signatures">
<xs:complexType>
<xs:sequence>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="manifest-attlist">
<xs:attribute name="version" use="required" form="qualified">
<xs:attribute name="version" form="qualified"><!-- use="required" removed to keep backward compatibility -->
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="1.2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ EncapsulatedPKIDataType and containers for time-stamp tokens -->
<!-- End UnsignedProperties-->
<!-- Start SignedSignatureProperties-->
<!-- Definition changed: added new optional children for EN -->
<!--Relaxed (not completly valid) definition of type SignedSignatureProperties:
elements of the type can be given in any order (all vs any) -->
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
<xsd:complexType name="SignedSignaturePropertiesType">
<xsd:sequence>
<xsd:all>
<xsd:element ref="SigningTime" minOccurs="0"/>
<xsd:element ref="SigningCertificate" minOccurs="0"/>
<xsd:element ref="SigningCertificateV2" minOccurs="0"/>
Expand All @@ -165,8 +167,8 @@ EncapsulatedPKIDataType and containers for time-stamp tokens -->
<xsd:element ref="SignatureProductionPlaceV2" minOccurs="0"/>
<xsd:element ref="SignerRole" minOccurs="0"/>
<xsd:element ref="SignerRoleV2" minOccurs="0"/>
<xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<!--xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/-->
</xsd:all>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<!-- End SignedSignatureProperties-->
Expand Down Expand Up @@ -342,14 +344,16 @@ EncapsulatedPKIDataType and containers for time-stamp tokens -->
</xsd:complexType>
<!-- End CommitmentTypeIndication -->
<!-- Start SignatureProductionPlace -->
<!--Relaxed (not completly valid) definition of type SignatureProductionPlaceType:
elements of the type can be given in any order (all vs any) -->
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
<xsd:complexType name="SignatureProductionPlaceType">
<xsd:sequence>
<xsd:all>
<xsd:element name="City" type="xsd:string" minOccurs="0"/>
<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:all>
</xsd:complexType>
<!-- End SignatureProductionPlace -->
<!-- Start SignatureProductionPlaceV2 and SignatureProductionPlaceV2Type -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
attributeFormDefault="unqualified">
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#"
schemaLocation="xmldsig-core-schema.xsd"/>
<xsd:import namespace="http://uri.etsi.org/01903/v1.3.2#"
schemaLocation="XAdES01903v132-201601.xsd"/>
<xsd:import namespace="http://uri.etsi.org/01903/v1.4.1#"
schemaLocation="XAdES01903v141-201601.xsd"/>
<xsd:element name="ASiCManifest" type="ASiCManifestType">
<xsd:annotation>
<xsd:documentation>Schema for ASiCManifest – See ETSI EN 319 162</xsd:documentation>
Expand Down
Binary file not shown.
Binary file modified MoppLib/MoppLib/libdigidocpp/libdigidocpp.iphoneos/lib/libssl.a
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extern "C" {
*/
# define OPENSSL_VERSION_MAJOR 3
# define OPENSSL_VERSION_MINOR 0
# define OPENSSL_VERSION_PATCH 13
# define OPENSSL_VERSION_PATCH 15

/*
* Additional version information
Expand Down Expand Up @@ -74,21 +74,21 @@ extern "C" {
* longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and
* OPENSSL_VERSION_BUILD_METADATA_STR appended.
*/
# define OPENSSL_VERSION_STR "3.0.13"
# define OPENSSL_FULL_VERSION_STR "3.0.13"
# define OPENSSL_VERSION_STR "3.0.15"
# define OPENSSL_FULL_VERSION_STR "3.0.15"

/*
* SECTION 3: ADDITIONAL METADATA
*
* These strings are defined separately to allow them to be parsable.
*/
# define OPENSSL_RELEASE_DATE "30 Jan 2024"
# define OPENSSL_RELEASE_DATE "3 Sep 2024"

/*
* SECTION 4: BACKWARD COMPATIBILITY
*/

# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.13 30 Jan 2024"
# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.15 3 Sep 2024"

/* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */
# ifdef OPENSSL_VERSION_PRE_RELEASE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down Expand Up @@ -283,10 +283,12 @@
# define SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK 1086
# define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071
# define SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080
# define SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL 1120
# define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100
# define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070
# define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022
# define SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048
# define SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY 1115
# define SSL_R_TLSV1_ALERT_USER_CANCELLED 1090
# define SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE 1114
# define SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE 1113
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
* Copyright 2005 Nokia. All rights reserved.
*
Expand Down Expand Up @@ -210,6 +210,8 @@ extern "C" {
# define TLSEXT_max_fragment_length_1024 2
# define TLSEXT_max_fragment_length_2048 3
# define TLSEXT_max_fragment_length_4096 4
/* OpenSSL value for unset maximum fragment length extension */
# define TLSEXT_max_fragment_length_UNSPECIFIED 255

int SSL_CTX_set_tlsext_max_fragment_length(SSL_CTX *ctx, uint8_t mode);
int SSL_set_tlsext_max_fragment_length(SSL *ssl, uint8_t mode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ namespace digidoc
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;
Exception(Exception &&other) noexcept;
virtual ~Exception();
Exception &operator=(const Exception &other);
Exception &operator=(Exception &&other) DIGIDOCPP_NOEXCEPT;
Exception &operator=(Exception &&other) noexcept;

std::string file() const;
int line() const;
Expand Down
Loading

0 comments on commit 1c483f7

Please sign in to comment.