Skip to content

Commit

Permalink
Update libdigidocpp
Browse files Browse the repository at this point in the history
  • Loading branch information
martenrebane committed Jan 23, 2024
1 parent 6b8a735 commit bd1fb2a
Show file tree
Hide file tree
Showing 642 changed files with 123,739 additions and 14,363 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
<!--<param name="proxy.user" lock="false"></param>-->
<!--<param name="proxy.pass" lock="false"></param>-->

<!--OCSP request signing options-->
<!--<param name="pkcs12.cert" lock="false"></param>-->
<!--<param name="pkcs12.pass" lock="false"></param>-->
<!--<param name="pkcs12.disable" lock="false">false</param>-->

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

Expand All @@ -41,5 +36,5 @@
<!--<param name="ocsp.tm.profile" lock="false">1.3.6.1.4.1.10015.4.1.2</param>-->

<!--OCSP responder URL-->
<!--<ocsp issuer="ESTEID-SK 2015">http://ocsp.sk.ee</ocsp>-->
<!--<ocsp issuer="ISSUER NAME">http://ocsp.issuer.com</ocsp>-->
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ class DIGIDOCPP_EXPORT Conf
virtual std::string TSUrl() const;
virtual std::string verifyServiceUri() const;

virtual std::string PKCS12Cert() const;
virtual std::string PKCS12Pass() const;
virtual bool PKCS12Disable() 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ 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:
Expand All @@ -66,6 +71,7 @@ class DIGIDOCPP_EXPORT Container
static std::unique_ptr<Container> createPtr(const std::string &path);
DIGIDOCPP_DEPRECATED static Container* open(const std::string &path);
static std::unique_ptr<Container> openPtr(const std::string &path);
static std::unique_ptr<Container> openPtr(const std::string &path, digidoc::ContainerOpenCB *cb);
template<class T>
static void addContainerImplementation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ class DIGIDOCPP_EXPORT XmlConf: public Conf
std::string TSUrl() const override;
std::string verifyServiceUri() const override;

std::string PKCS12Cert() const override;
std::string PKCS12Pass() const override;
bool PKCS12Disable() 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;
Expand All @@ -64,9 +64,9 @@ class DIGIDOCPP_EXPORT XmlConf: public Conf
virtual void setProxyUser( const std::string &user );
virtual void setProxyPass( const std::string &pass );
virtual void setProxyTunnelSSL( bool enable );
virtual void setPKCS12Cert( const std::string &cert );
virtual void setPKCS12Pass( const std::string &pass );
virtual void setPKCS12Disable( bool disable );
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 );
Expand Down Expand Up @@ -110,9 +110,9 @@ class DIGIDOCPP_EXPORT XmlConfV2: public ConfV2
X509Cert verifyServiceCert() const override;
std::string verifyServiceUri() const override;

std::string PKCS12Cert() const override;
std::string PKCS12Pass() const override;
bool PKCS12Disable() 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;
Expand All @@ -124,9 +124,9 @@ class DIGIDOCPP_EXPORT XmlConfV2: public ConfV2
virtual void setProxyUser( const std::string &user );
virtual void setProxyPass( const std::string &pass );
virtual void setProxyTunnelSSL( bool enable );
virtual void setPKCS12Cert( const std::string &cert );
virtual void setPKCS12Pass( const std::string &pass );
virtual void setPKCS12Disable( bool disable );
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 );
Expand Down Expand Up @@ -166,9 +166,9 @@ class DIGIDOCPP_EXPORT XmlConfV3: public ConfV3
X509Cert verifyServiceCert() const override;
std::string verifyServiceUri() const override;

std::string PKCS12Cert() const override;
std::string PKCS12Pass() const override;
bool PKCS12Disable() 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;
Expand All @@ -180,9 +180,9 @@ class DIGIDOCPP_EXPORT XmlConfV3: public ConfV3
virtual void setProxyUser( const std::string &user );
virtual void setProxyPass( const std::string &pass );
virtual void setProxyTunnelSSL( bool enable );
virtual void setPKCS12Cert( const std::string &cert );
virtual void setPKCS12Pass( const std::string &pass );
virtual void setPKCS12Disable( bool disable );
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 );
Expand Down Expand Up @@ -223,9 +223,9 @@ class DIGIDOCPP_EXPORT XmlConfV4: public ConfV4
std::vector<X509Cert> verifyServiceCerts() const override;
std::string verifyServiceUri() const override;

std::string PKCS12Cert() const override;
std::string PKCS12Pass() const override;
bool PKCS12Disable() 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;
Expand All @@ -237,9 +237,9 @@ class DIGIDOCPP_EXPORT XmlConfV4: public ConfV4
virtual void setProxyUser( const std::string &user );
virtual void setProxyPass( const std::string &pass );
virtual void setProxyTunnelSSL( bool enable );
virtual void setPKCS12Cert( const std::string &cert );
virtual void setPKCS12Pass( const std::string &pass );
virtual void setPKCS12Disable( bool disable );
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 );
Expand Down Expand Up @@ -281,9 +281,9 @@ class DIGIDOCPP_EXPORT XmlConfV5: public ConfV5
std::vector<X509Cert> verifyServiceCerts() const override;
std::string verifyServiceUri() const override;

std::string PKCS12Cert() const override;
std::string PKCS12Pass() const override;
bool PKCS12Disable() 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;
Expand All @@ -295,9 +295,9 @@ class DIGIDOCPP_EXPORT XmlConfV5: public ConfV5
virtual void setProxyUser( const std::string &user );
virtual void setProxyPass( const std::string &pass );
virtual void setProxyTunnelSSL( bool enable );
virtual void setPKCS12Cert( const std::string &cert );
virtual void setPKCS12Pass( const std::string &pass );
virtual void setPKCS12Disable( bool disable );
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 );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
/*
* Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* 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
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/

#ifndef HEADER_AES_H
# define HEADER_AES_H
#ifndef OPENSSL_AES_H
# define OPENSSL_AES_H
# pragma once

# include <openssl/macros.h>
# ifndef OPENSSL_NO_DEPRECATED_3_0
# define HEADER_AES_H
# endif

# include <openssl/opensslconf.h>

Expand All @@ -17,72 +23,85 @@
extern "C" {
# endif

# define AES_ENCRYPT 1
# define AES_DECRYPT 0

/*
* Because array size can't be a const in C, the following two are macros.
* Both sizes are in bytes.
*/
# define AES_MAXNR 14
# define AES_BLOCK_SIZE 16

# ifndef OPENSSL_NO_DEPRECATED_3_0

# define AES_ENCRYPT 1
# define AES_DECRYPT 0

# define AES_MAXNR 14


/* This should be a hidden type, but EVP requires that the size be known */
struct aes_key_st {
# ifdef AES_LONG
# ifdef AES_LONG
unsigned long rd_key[4 * (AES_MAXNR + 1)];
# else
# else
unsigned int rd_key[4 * (AES_MAXNR + 1)];
# endif
# endif
int rounds;
};
typedef struct aes_key_st AES_KEY;

const char *AES_options(void);

# endif
# ifndef OPENSSL_NO_DEPRECATED_3_0
OSSL_DEPRECATEDIN_3_0 const char *AES_options(void);
OSSL_DEPRECATEDIN_3_0
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
OSSL_DEPRECATEDIN_3_0
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);

OSSL_DEPRECATEDIN_3_0
void AES_encrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key);
OSSL_DEPRECATEDIN_3_0
void AES_decrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key);

OSSL_DEPRECATEDIN_3_0
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key, const int enc);
OSSL_DEPRECATEDIN_3_0
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, const int enc);
OSSL_DEPRECATEDIN_3_0
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
OSSL_DEPRECATEDIN_3_0
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
OSSL_DEPRECATEDIN_3_0
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
OSSL_DEPRECATEDIN_3_0
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num);

/* NB: the IV is _two_ blocks long */
OSSL_DEPRECATEDIN_3_0
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, const int enc);
/* NB: the IV is _four_ blocks long */
OSSL_DEPRECATEDIN_3_0
void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
const AES_KEY *key2, const unsigned char *ivec,
const int enc);

size_t length, const AES_KEY *key, const AES_KEY *key2,
const unsigned char *ivec, const int enc);
OSSL_DEPRECATEDIN_3_0
int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
unsigned char *out,
const unsigned char *in, unsigned int inlen);
unsigned char *out, const unsigned char *in,
unsigned int inlen);
OSSL_DEPRECATEDIN_3_0
int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
unsigned char *out,
const unsigned char *in, unsigned int inlen);
unsigned char *out, const unsigned char *in,
unsigned int inlen);
# endif


# ifdef __cplusplus
Expand Down
Loading

0 comments on commit bd1fb2a

Please sign in to comment.