dss | Digital Signature Service : creation, extension and validation of advanced electronic signatures | Cryptography library

 by   esig Java Version: 5.12.1 License: LGPL-2.1

kandi X-RAY | dss Summary

kandi X-RAY | dss Summary

dss is a Java library typically used in Security, Cryptography applications. dss has no bugs, it has no vulnerabilities, it has build file available, it has a Weak Copyleft License and it has high support. You can download it from GitHub.

This is the official repository for project DSS :
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              dss has a highly active ecosystem.
              It has 648 star(s) with 340 fork(s). There are 109 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              dss has no issues reported. There are 8 open pull requests and 0 closed requests.
              It has a positive sentiment in the developer community.
              The latest version of dss is 5.12.1

            kandi-Quality Quality

              dss has 0 bugs and 0 code smells.

            kandi-Security Security

              dss has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              dss code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              dss is licensed under the LGPL-2.1 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              dss releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              dss saves you 1564859 person hours of effort in developing the same functionality from scratch.
              It has 775533 lines of code, 21075 functions and 3650 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed dss and discovered the below as its top functions. This is intended to give you an instant insight into dss implemented functionality, and help decide if they suit your requirements.
            • Retrieves CRL info from an input stream .
            • Extracts the timestamp tokens from the attributes .
            • Assigns the image boundary box to the image bounds
            • Adds a DSS dictionary to the DSSDocument .
            • Wraps the lines with the given metrics .
            • Get the archive timestamp data .
            • Build an Xml certificate from a certificate token .
            • Create signature attributes .
            • Get a list of certificates and AIA URLs .
            • Create an XML Timestamped object from a timestamp reference .
            Get all kandi verified functions for this library.

            dss Key Features

            No Key Features are available at this moment for dss.

            dss Examples and Code Snippets

            No Code Snippets are available at this moment for dss.

            Community Discussions

            QUESTION

            Find duplicate records in a column and update the duplicates to max + 1 (oracle)
            Asked 2022-Feb-17 at 15:39

            I want to find the duplicate values and update the duplicated records with max(col1)+1 leaving the first record as is

            example

            ...

            ANSWER

            Answered 2022-Feb-17 at 15:39

            QUESTION

            Pysftp fails with "Authentication failed" and "Server did not send a server-sig-algs list; defaulting to our first preferred algo ('rsa-sha2-512')"
            Asked 2022-Jan-28 at 09:18

            I have ec2 instance with ubuntu v20.04 and it has python v3.8.10 and pysftp 0.2.9.

            I have generate .pem file from .ppk file using below command

            puttygen sftp_server.ppk -O private-openssh -o sftp_server.pem

            I am able to connect successfully to sftp server using command line-

            ...

            ANSWER

            Answered 2022-Jan-28 at 09:18

            The error comes form underlying Paramiko and is discussed here:
            Paramiko authentication fails with "Agreed upon 'rsa-sha2-512' pubkey algorithm" (and "unsupported public key algorithm: rsa-sha2-512" in sshd log)

            Though pysftp does not expose the disabled_algorithms parameter.

            You better switch to using Paramiko directly. The pysftp is abandoned project. See pysftp vs. Paramiko.

            Source https://stackoverflow.com/questions/70812056

            QUESTION

            Git Bash - ssh connection issue
            Asked 2022-Jan-25 at 07:13

            Environment:

            ...

            ANSWER

            Answered 2022-Jan-25 at 07:13

            Git For Windows 2.33.1 comes with OpenSSH 8.8 which disables RSA signatures using the SHA-1 hash algorithm by default.

            For most users, this change should be invisible and there is no need to replace ssh-rsa keys.
            OpenSSH has supported RFC8332 RSA/SHA-256/512 signatures since release 7.2 and existing ssh-rsa keys will automatically use the stronger algorithm where possible.

            Incompatibility is more likely when connecting to older SSH implementations that have not been upgraded or have not closely tracked improvements in the SSH protocol.

            For these cases, it may be necessary to selectively re-enable RSA/SHA1 to allow connection and/or user authentication via the HostkeyAlgorithms and PubkeyAcceptedAlgorithms options.
            For example, the following stanza in ~/.ssh/config will enable RSA/SHA1 for host and user authentication for a single destination host:

            Source https://stackoverflow.com/questions/69656858

            QUESTION

            Bulk INSERT in Postgres in GO using pgx
            Asked 2022-Jan-23 at 15:04

            I am trying to bulk insert keys in db in go here is the code Key Struct

            ...

            ANSWER

            Answered 2022-Jan-23 at 14:54

            QUESTION

            Paramiko authentication fails with "Agreed upon 'rsa-sha2-512' pubkey algorithm" (and "unsupported public key algorithm: rsa-sha2-512" in sshd log)
            Asked 2022-Jan-13 at 14:49

            I have a Python 3 application running on CentOS Linux 7.7 executing SSH commands against remote hosts. It works properly but today I encountered an odd error executing a command against a "new" remote server (server based on RHEL 6.10):

            encountered RSA key, expected OPENSSH key

            Executing the same command from the system shell (using the same private key of course) works perfectly fine.

            On the remote server I discovered in /var/log/secure that when SSH connection and commands are issued from the source server with Python (using Paramiko) sshd complains about unsupported public key algorithm:

            userauth_pubkey: unsupported public key algorithm: rsa-sha2-512

            Note that target servers with higher RHEL/CentOS like 7.x don't encounter the issue.

            It seems like Paramiko picks/offers the wrong algorithm when negotiating with the remote server when on the contrary SSH shell performs the negotiation properly in the context of this "old" target server. How to get the Python program to work as expected?

            Python code

            ...

            ANSWER

            Answered 2022-Jan-13 at 14:49

            Imo, it's a bug in Paramiko. It does not handle correctly absence of server-sig-algs extension on the server side.

            Try disabling rsa-sha2-* on Paramiko side altogether:

            Source https://stackoverflow.com/questions/70565357

            QUESTION

            Github not recognizing ssh key
            Asked 2022-Jan-01 at 00:19

            I've been using ssh keys with github for a while now. Suddenly i can't push and I'm getting a Permission denied (publickey) error. Here's what I've tried so far:

            • Checked the ssh key is in the correct directory (~/.ssh)
            • Tried reuploading my public key to github (I get a message that the key already exists)
            • Double checked that the output of ssh-add -l -E sha256 on my system agrees with the string in my ssh settings on my github account
            • Followed all the steps in the "Troubleshooting ssh" section of the github docs. (Everything seems gucci)
            • Banged my head against the wall for an hour

            So far nothing has helped. This is my last resort. I'll greatly appreciate any and all suggestions. Here's the output of my ssh -vT git@github.com

            ...

            ANSWER

            Answered 2021-Dec-10 at 04:25

            My answer might not help or sound silly. But in my situation, I'm just deleting the know_hosts file and pull/push again, then everything works as expected.

            Source https://stackoverflow.com/questions/70299599

            QUESTION

            Google App Script that replicates VLOOKUP
            Asked 2021-Dec-17 at 08:40
            Is there an option using Google App Scripts that works like VLOOKUP?

            I am hoping for a solution that will replace the ??? on Spreadsheet 2, with the emails on Spreadsheet 1 on a scheduled bases using the GAS trigger feature.

            Currently I am using formulas, but they are slowing down the performance of my sheets. I don't need them fetching data more than once every 24 hours, hence why I am wanting to use GAS instead with a trigger.

            • IMPORTRANGE & QUERY to import Spreadsheet #1 (ID, Email 1, Email2) to Spreadsheet #2 =QUERY(IMPORTRANGE(spreadsheet_url, A1:E), "SELECT Col1,Col4,Col5 WHERE A Col1 is not null", 1)
            • Then on Spreadsheet #2 using ARRAYFORMULA & VLOOKUP to populate all the emails. =ARRAYFORMULA(VLOOKUP(Sheet1!A2:A,ImportedData!A2:C},{2,3},0)

            Here are what my 2 spreadsheets look like...

            Spreadsheet #1 (Contains ~2 million cells) ID Something Something Email1 Email2 111111 * * Bob@hotmail.com Bob@gmail.com 222222 * * James@gmail.com James@yahoo.com Spreadsheet #2 (Contains ~200k cells) ID Email 1 Email 2 111111 ??? ??? 222222 ??? ??? UPDATE

            I asked a similar question HERE and received an answer.

            The answer was:

            ...

            ANSWER

            Answered 2021-Dec-17 at 08:40

            In your situation, I think that your goal might be able to be achieved by the following 2 modification points in your script.

            From:

            Source https://stackoverflow.com/questions/70389863

            QUESTION

            SunPKCS11 usage against HSM without CKO_CERTIFICATE
            Asked 2021-Dec-01 at 21:50

            My problem concern the usage of an hsm with Java (openjdk 11.0.12). Hsm should be use for signature purpose, by SHA512 RSA algorithm. I could be wrong in a lot of the following sentences, I'm totally newbie with HSM & co, so I apologize in advance.

            For what I've understand there are three kinds of approaches:

            1- Using SUNPKCS11 provider

            2- Using vendor lib (hsm is shipped with a couple of jar, in my case nCipher is shipped with nCipherKM.jar, which should be vendor provider.)

            3- openssl (we have some software in c already doing this, I prefer to avoid)

            The usage of vendor lib it's really easy, at least until the Get info call, which send an Unknown Parameter to HardServer, causing an unmarshable exception. This is difficult to debug, communication protocol isn't documented. Right now I've put this solution aside.

            In any case I prefer the SUNPKCS11 solution, it doesn't work out of the box for me, but it was simple to debug and analyze. And should be a standard.

            In this case i'm using European DSS library to interface with PKCS11Provider, making things a little simpler for me to configure and implement.

            The problem occurs during SunPKCS11 (vanilla) initialization.

            At some point it calls a method "P11Keystore.mapLabels()" that match, according to code and Oracle documentation, all private key handlers (CKA_PRIVATE_KEY) coming from that slot with certificate handlers (CKO_CERTIFICATE), looking for matching between cka_id, in order to build a software in memory keystore with aliases map containing the CKA_LABEL attributes. (Private key is unextractable so access is read only https://docs.oracle.com/javase/8/docs/technotes/guides/security/p11guide.html#KeyStoreRestrictions)

            In signature initialization this private key entry is used to fetch from HSM (by some key attributes that I don't have) the private key handler.

            The problem is that my hsm nCipher doesn't expose any object for CKO_CERTIFICATE, so the match returns 0 result and my software keystore is empty.

            When I try to extract the private key handler from keystore I obtain nothing and I cannot initialize Signature object.

            My predecessor manually wrapped the private key attributes inside a local jks, and rewrote a new provider in order to load certificate from file and not from HSM/PKCS11.

            I dislike this solution, I don't want my application to have configuration depending on HSM certificate.. it's HSM certificate job to handle those keys, not mine.

            Instead, I wrote another provider to fetch and use directly the private key handler, from CKA_PRIVATE_KEY, using a preconfigured CKA_LABEL, bypassing the certificate match. And it works.

            However I dislike this solution too, it means more maintenance costs for a standard protocol, and the jar must be signed each time, which for me is a nuisance.

            I have the feeling that I am approaching the problem from the wrong side, maybe because I'm a noob in the matter.

            Explanation are over, so here my questions: 1- Am I wrong to claim that CKO_CERTIFICATE is a prerequisite for SunPKCS11? 1- Could/Should HSM expose CKO_CERTIFICATE object without malevolent side effects? 2- Is this missing object a limitation of nCipher HSM or, probably, a configuration missing during installation? (It works even without so it's a java prerequisite more than an HSM missing) 3- If the CKO_CERTIFICATE cannot be installed and exposed: Is it ok to implement our own provider to obtain the workaround, or could exist a better way to get it working?

            Sorry for my English, I'm not a native one. Thanks to those who have come to read up to here and who will answer.

            ...

            ANSWER

            Answered 2021-Dec-01 at 21:50

            ..almost a month later..

            I've finished my application, now I know a lot more about the argument, it works with following modes:

            1. Standard SunPKCS11 against a Docker SoftHSM2 image. HSM contains CKO_CERTIFICATE PUBLIC_KEY and PRIVATE_KEY, on the same slot, with same CKA_ID.All works fine and flawless.
            2. Custom PKCS11 extension, I have to copy/paste almost every class from java security package (because is Java 11~17 with sun.* packages), just to alter a couple of lines in Certificate retrieving logic, dropping CKO_CERTIFICTE request and loading it by file (crt/p12).
            3. P12, containing all information, used as mocked version for local use only.

            I've tried to extend Bouncy Castle Fips provider, instead of SunPKCS11, without any luck.

            In the end I think is not possible to accomplish what I need for, the problem is in the server configuration, which is not solvable from a client software. Anyway I'll fix server configuration, adopting the first working case, dropping custom PKCS11 solution, keeping it just for academic purpose.

            Source https://stackoverflow.com/questions/69868447

            QUESTION

            PDF signed by iTextSharp 5 or iText7-dotnet shows valid by iText and Adobe, but not by EU DSS Demo
            Asked 2021-Dec-01 at 13:49

            I PDF signing problems with the latest iTextSharp 5. I know that version is already deprecated, but I must use the older one, because I need to use it in an environment, where no newer than .NET Framework v3.5 is allowed.

            For singing documents, the clients may use software or hardware keys. We already used RSA signatures in our company, but now we have toimplement support for ECDsa keys too. That's why I tried to sign PDF files with iText's PrivateKeySignature class, and calling MakeSignature.SignDetached method.

            When I use RSA key for signing a PDF, and try to verify signature with European Commission's DSS Demonstration App (https://ec.europa.eu/cefdigital/DSS/webapp-demo/validation), it has no issue with the signature, only that it not accepts the certificate issuer as a trusted CA. That's fine, because I use a test key generated by an internal CA for developer use only.

            But if I use ECDSA key for signing a PDF, the DSS Demonstration App says "Signature is not intact.".

            The code I use for signing:

            ...

            ANSWER

            Answered 2021-Dec-01 at 13:49

            Just like @mval mentioned in a comment, iText uses the public key algorithm OID as signature algorithm OID.

            In case of RSA that is ok as here the same OID is specified for a RSA key and for RSASSA (with PKCS#1 v1.5 padding).

            This is not the case for ECDSA, so eSignature DSS complains. Adobe Acrobat (Reader) on the other hand is very lax. It actually ignores the signature algorithm OID field, you could even have an ECDSA signature with the RSA OID in that field and the current Acrobat wouldn't complain.

            To fix this use an IExternalSignatureContainer implementation instead of an IExternalSignature implementation and call MakeSignature.SignExternalContainer instead of MakeSignature.SignDetached. In your IExternalSignatureContainer implementation you can use BouncyCastle or Windows Crypto API classes to create a CMS signature container.

            Other questions related to incorrect signature algorithm OIDs in respect to iText:

            Source https://stackoverflow.com/questions/70170110

            QUESTION

            OpenVPN Client in Kubernetes Pod
            Asked 2021-Nov-27 at 23:30

            I am looking at how to make OpenVPN client work on a pod's container, I explain what I do, but you can skip all my explanation and offer your solution directly, I don't care replacing all the below with your steps if it works, I want to make my container to use a VPN (ExpressVPN for example) in a way that both external and internal networking works.

            I have a docker image that is an OpenVPN Client, it works find with the command:

            ...

            ANSWER

            Answered 2021-Nov-24 at 18:42

            Here is a minimal example of a pod with OpenVPN client. I used kylemanna/openvpn as a server and to generate a basic client config. I only added two routes to the generated config to make it working. See below:

            Source https://stackoverflow.com/questions/70089374

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install dss

            A simple build of the DSS Maven project can be done with the following command:. This installation will run all unit tests present in the modules, which can take more than one hour to do the complete build.
            quick - disables unit tests and java-doc validation, in order to process the build as quick as possible (takes 1-2 minutes). This profile cannot be used for a primary DSS build (see below).
            quick-init - is similar to the quick profile. Disables java-doc validation for all modules and unit tests excluding some modules which have dependencies on their test classes. Can be used for the primary build of DSS.
            slow-tests - executes all tests, including time-consuming unit tests.
            owasp - runs validation of the project and using dependencies according to the National Vulnerability Database (NVD).
            jdk19-plus - executed automatically for JDK version 9 and higher. Provides a support of JDK 8 with newer versions.
            spotless - used to add a licence header into project files.

            Support

            The documentation and samples are available in the dss-cookbook module. SoapUI project and Postman project are also provided to illustrate SOAP/REST calls.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries