[jboss-cvs] JBossAS SVN: r108975 - projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 28 14:19:25 EDT 2010
Author: anil.saldhana at jboss.com
Date: 2010-10-28 14:19:25 -0400 (Thu, 28 Oct 2010)
New Revision: 108975
Removed:
projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/DistinguishedPrincipalCallback.java
Modified:
projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/PrivateKeyCallback.java
projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/SecretKeyCallback.java
Log:
JBEE-39: jaspi sig changes
Deleted: projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/DistinguishedPrincipalCallback.java
===================================================================
--- projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/DistinguishedPrincipalCallback.java 2010-10-28 18:05:57 UTC (rev 108974)
+++ projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/DistinguishedPrincipalCallback.java 2010-10-28 18:19:25 UTC (rev 108975)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package javax.security.auth.message.callback;
-
-import java.security.Principal;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-
-//$Id$
-
-/**
- * Callback for setting the containers caller (or Remote user) principal.
- * @author <a href="mailto:Anil.Saldhana at jboss.org">Anil Saldhana</a>
- * @author Charlie Lai, Ron Monzillo (Javadoc for JSR-196)
- * @since May 11, 2006
- * @version $Revision$
- */
-public class DistinguishedPrincipalCallback implements Callback
-{
- private Subject subject = null;
- private Principal principal = null;
-
- /**
- * Create a new DistinguishedPrincipalCallback.
- *
- * @param subject the Subject in which the container will distinguish the principal
- * @param principal the Principal that will be distinguished.
- */
- public DistinguishedPrincipalCallback(Subject subject,Principal principal)
- {
- this.subject = subject;
- this.principal = principal;
- }
-
- /**
- * Get the principal.
- * @return the principal.
- */
- public Principal getPrincipal()
- {
- return principal;
- }
-
- /**
- * Get the Subject.
- * @return the subject.
- */
- public Subject getSubject()
- {
- return subject;
- }
-}
Modified: projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/PrivateKeyCallback.java
===================================================================
--- projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/PrivateKeyCallback.java 2010-10-28 18:05:57 UTC (rev 108974)
+++ projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/PrivateKeyCallback.java 2010-10-28 18:19:25 UTC (rev 108975)
@@ -80,7 +80,7 @@
/**
* <p>Request type for private keys that are identified via an issuer/serial number.</p>
*/
- public static class IssuerSerialNumRequest
+ public static class IssuerSerialNumRequest implements Request
{
private X500Principal issuer;
private java.math.BigInteger serialNumber;
@@ -110,7 +110,7 @@
* Get the serial number.
* @return the issuer, or null.
*/
- public BigInteger getSerialNumber()
+ public BigInteger getSerialNum()
{
return serialNumber;
}
@@ -118,7 +118,7 @@
/**
* <p>Request type for private keys that are identified via a SubjectKeyID</p>
*/
- public static class SubjectKeyIDRequest
+ public static class SubjectKeyIDRequest implements Request
{
private byte[] subjectKeyID;
@@ -147,6 +147,46 @@
return subjectKeyID;
}
}
+
+ /**
+ * Request type for private keys that are identified using a certificate digest or thumbprint.
+ */
+ public static class DigestRequest
+ {
+ private byte[] theDigest;
+ private String theAlgorithm;
+
+ /**
+ *<p>
+ * Constructs a DigestRequest with a digest value and algorithm identifier.
+ *</p>
+ *
+ * <p>
+ * The digest of the certificate whose private key is returned must match the provided digest.
+ * The certificate digest is computed by applying the specified algorithm to the bytes of the
+ * certificate. For example: MessageDigest.getInstance(algorithm).digest(cert.getEncoded()) .
+ * The corresponding certificate chain for the private key is also returned. If the digest or
+ * algorithm parameters are null, the handler of the callback relies on its own defaults.
+ * </p>
+ **/
+ public DigestRequest( byte[] digest, String algorithm )
+ {
+ theDigest = digest;
+ theAlgorithm = algorithm;
+ }
+
+ public byte[] getDigest()
+ {
+ return theDigest;
+ }
+
+ public java.lang.String getAlgorithm()
+ {
+ return theAlgorithm;
+ }
+
+
+ }
//Private Variables
private Request request = null;
Modified: projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/SecretKeyCallback.java
===================================================================
--- projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/SecretKeyCallback.java 2010-10-28 18:05:57 UTC (rev 108974)
+++ projects/specs/trunk/jboss-jaspi-api_1.0_spec/src/main/java/javax/security/auth/message/callback/SecretKeyCallback.java 2010-10-28 18:19:25 UTC (rev 108975)
@@ -71,4 +71,28 @@
return alias;
}
}
+
+
+ private Request request;
+ private javax.crypto.SecretKey key;
+
+ public SecretKeyCallback(SecretKeyCallback.Request request)
+ {
+ this.request = request;
+ }
+
+ public Request getRequest()
+ {
+ return request;
+ }
+
+ public void setKey(javax.crypto.SecretKey key)
+ {
+ this.key = key;
+ }
+
+ public javax.crypto.SecretKey getKey()
+ {
+ return key;
+ }
}
More information about the jboss-cvs-commits
mailing list