Skip to content

Commit

Permalink
Merge pull request #147 from ymartin59/JENKINS-31192
Browse files Browse the repository at this point in the history
[JENKINS-31192] HTTPS + PKCS12 Certificate in CPU infinite loop
  • Loading branch information
recena committed Nov 11, 2015
2 parents 3141a09 + 86e18b3 commit ae4ae64
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
7 changes: 1 addition & 6 deletions pom.xml
Expand Up @@ -91,12 +91,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.tmatesoft.svnkit</groupId>
<artifactId>svnkit</artifactId>
<version>1.8.6</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>trilead-ssh2</artifactId>
<version>build217-jenkins-7</version>
<version>1.8.11</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down
Expand Up @@ -454,9 +454,10 @@ public SVNCertificateAuthenticationBuilder(CertificateCredentials c) {

public List<SVNAuthentication> build(String kind, SVNURL url) {
if (ISVNAuthenticationManager.SSL.equals(kind)) {
SVNSSLAuthentication authentication =
new SVNSSLAuthentication(String.valueOf(certificateFile), Scrambler.descramble(password), false, url, false);
authentication.setCertificatePath("dummy"); // TODO: remove this JENKINS-19175 workaround
SVNSSLAuthentication authentication = SVNSSLAuthentication.newInstance(
certificateFile,
Scrambler.descramble(password).toCharArray(),
false, url, false);
return Collections.<SVNAuthentication>singletonList(
authentication);
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/hudson/scm/SubversionSCM.java
Expand Up @@ -1993,10 +1993,10 @@ public SslClientCertificateCredential(File certificate, String password) throws
public SVNAuthentication createSVNAuthentication(String kind) {
if(kind.equals(ISVNAuthenticationManager.SSL))
try {
SVNSSLAuthentication authentication = new SVNSSLAuthentication(
String.valueOf(Base64.decode(certificate.getPlainText().toCharArray())),
Scrambler.descramble(Secret.toString(password)), false, null, false);
authentication.setCertificatePath("dummy"); // TODO: remove this JENKINS-19175 workaround
SVNSSLAuthentication authentication = SVNSSLAuthentication.newInstance(
Base64.decode(certificate.getPlainText().toCharArray()),
Scrambler.descramble(Secret.toString(password)).toCharArray(),
false, null, false);
return authentication;
} catch (IOException e) {
throw new Error(e); // can't happen
Expand Down

0 comments on commit ae4ae64

Please sign in to comment.