Loading cadc-cdp-server/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ sourceCompatibility = 1.7 group = 'org.opencadc' version = '1.1' version = '1.1.1' dependencies { compile 'log4j:log4j:1.+' Loading cadc-cdp-server/src/main/java/org/astrogrid/security/delegation/Delegations.java +13 −3 Original line number Diff line number Diff line package org.astrogrid.security.delegation; import ca.nrc.cadc.auth.X509CertificateChain; import java.io.IOException; import java.io.Writer; import java.security.GeneralSecurityException; Loading Loading @@ -60,7 +61,7 @@ public abstract class Delegations */ public String hash(X500Principal principal) { return Integer.toString(principal.hashCode()); return X509CertificateChain.genHashKey(principal); } /** Loading @@ -69,7 +70,9 @@ public abstract class Delegations * a key pair and a CSR are generated and stored; the certificate * property is set to null. * * @param identity * @return The hash of the distinguished name. * @throws java.security.GeneralSecurityException */ public abstract String initializeIdentity(String identity) throws GeneralSecurityException; Loading @@ -83,6 +86,7 @@ public abstract class Delegations * @param principal * The distinguished name on which to base the identity. * @return The hash key corresponding to the distinguished name. * @throws java.security.GeneralSecurityException */ public abstract String initializeIdentity(X500Principal principal) throws GeneralSecurityException; Loading @@ -104,8 +108,12 @@ public abstract class Delegations * Stores a certificate for the given identity. Any previous * certificate is overwritten. This operation is thread-safe against * concurrent reading of the certificate. * @param hashKey * @param certificates * @throws java.security.InvalidKeyException */ public abstract void setCertificates(String hashKey, X509Certificate[] certificates) throws InvalidKeyException; public abstract void setCertificates(String hashKey, X509Certificate[] certificates) throws InvalidKeyException; public abstract Object[] getPrincipals(); Loading @@ -125,6 +133,7 @@ public abstract class Delegations * * @param hashKey * The hash key identifying the user. * @return */ public abstract boolean hasCertificate(String hashKey); Loading @@ -135,6 +144,7 @@ public abstract class Delegations * The hash key identifying the user. * @param out * The destination for the certificate. * @throws java.io.IOException */ public abstract void writeCertificate(String hashKey, Writer out) throws IOException; Loading Loading
cadc-cdp-server/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ sourceCompatibility = 1.7 group = 'org.opencadc' version = '1.1' version = '1.1.1' dependencies { compile 'log4j:log4j:1.+' Loading
cadc-cdp-server/src/main/java/org/astrogrid/security/delegation/Delegations.java +13 −3 Original line number Diff line number Diff line package org.astrogrid.security.delegation; import ca.nrc.cadc.auth.X509CertificateChain; import java.io.IOException; import java.io.Writer; import java.security.GeneralSecurityException; Loading Loading @@ -60,7 +61,7 @@ public abstract class Delegations */ public String hash(X500Principal principal) { return Integer.toString(principal.hashCode()); return X509CertificateChain.genHashKey(principal); } /** Loading @@ -69,7 +70,9 @@ public abstract class Delegations * a key pair and a CSR are generated and stored; the certificate * property is set to null. * * @param identity * @return The hash of the distinguished name. * @throws java.security.GeneralSecurityException */ public abstract String initializeIdentity(String identity) throws GeneralSecurityException; Loading @@ -83,6 +86,7 @@ public abstract class Delegations * @param principal * The distinguished name on which to base the identity. * @return The hash key corresponding to the distinguished name. * @throws java.security.GeneralSecurityException */ public abstract String initializeIdentity(X500Principal principal) throws GeneralSecurityException; Loading @@ -104,8 +108,12 @@ public abstract class Delegations * Stores a certificate for the given identity. Any previous * certificate is overwritten. This operation is thread-safe against * concurrent reading of the certificate. * @param hashKey * @param certificates * @throws java.security.InvalidKeyException */ public abstract void setCertificates(String hashKey, X509Certificate[] certificates) throws InvalidKeyException; public abstract void setCertificates(String hashKey, X509Certificate[] certificates) throws InvalidKeyException; public abstract Object[] getPrincipals(); Loading @@ -125,6 +133,7 @@ public abstract class Delegations * * @param hashKey * The hash key identifying the user. * @return */ public abstract boolean hasCertificate(String hashKey); Loading @@ -135,6 +144,7 @@ public abstract class Delegations * The hash key identifying the user. * @param out * The destination for the certificate. * @throws java.io.IOException */ public abstract void writeCertificate(String hashKey, Writer out) throws IOException; Loading