• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ebourg / jsign / #372

26 May 2025 06:45AM UTC coverage: 83.194%. Remained the same
#372

push

ebourg
Missing quotes around the name of the SunPKCS11 configuration

0 of 1 new or added line in 1 file covered. (0.0%)

4861 of 5843 relevant lines covered (83.19%)

0.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/jsign-crypto/src/main/java/net/jsign/PKCS11Configuration.java
1
/*
2
 * Copyright 2025 Emmanuel Bourg
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package net.jsign;
18

19
import java.io.File;
20

21
/**
22
 * Configuration for a SunPKCS11 provider.
23
 *
24
 * @since 7.2
25
 */
26
class PKCS11Configuration {
×
27

28
    private String name;
29
    private File library;
30
    private long slot = -1;
×
31

32
    PKCS11Configuration name(String name) {
33
        this.name = name;
×
34
        return this;
×
35
    }
36

37
    PKCS11Configuration library(File library) {
38
        this.library = library;
×
39
        return this;
×
40
    }
41

42
    PKCS11Configuration slot(long slot) {
43
        this.slot = slot;
×
44
        return this;
×
45
    }
46

47
    public String toString() {
NEW
48
        String configuration = "--name=\"" + name + "\"\n";
×
49
        configuration += "library = \"" + library.getAbsolutePath().replace("\\", "\\\\") + "\"\n";
×
50
        if (slot >= 0) {
×
51
            configuration += "slot=" + slot;
×
52
        }
53
        return configuration;
×
54
    }
55
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc