< prev index next >

test/javax/security/auth/kerberos/StandardNames.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8035986
  27  * @summary KerberosKey algorithm names are not specified

  28  */
  29 
  30 import sun.security.krb5.EncryptedData;
  31 
  32 import javax.crypto.Cipher;
  33 import javax.security.auth.kerberos.KerberosKey;
  34 import javax.security.auth.kerberos.KerberosPrincipal;
  35 import java.util.Locale;
  36 
  37 public class StandardNames {
  38     static KerberosPrincipal kp = new KerberosPrincipal("user@REALM");
  39     static char[] pass = "secret".toCharArray();
  40     static byte[] keyBytes = new byte[1];
  41 
  42     public static void main(String[] args) throws Exception {
  43         for (EncType e: EncType.values()) {
  44             if (e == EncType.e18) {
  45                 if (Cipher.getMaxAllowedKeyLength("AES") < 256) {
  46                     System.out.println("Skipping aes256-cts-hmac-sha1-96");
  47                     continue;




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8035986
  27  * @summary KerberosKey algorithm names are not specified
  28  * @modules java.security.jgss/sun.security.krb5
  29  */
  30 
  31 import sun.security.krb5.EncryptedData;
  32 
  33 import javax.crypto.Cipher;
  34 import javax.security.auth.kerberos.KerberosKey;
  35 import javax.security.auth.kerberos.KerberosPrincipal;
  36 import java.util.Locale;
  37 
  38 public class StandardNames {
  39     static KerberosPrincipal kp = new KerberosPrincipal("user@REALM");
  40     static char[] pass = "secret".toCharArray();
  41     static byte[] keyBytes = new byte[1];
  42 
  43     public static void main(String[] args) throws Exception {
  44         for (EncType e: EncType.values()) {
  45             if (e == EncType.e18) {
  46                 if (Cipher.getMaxAllowedKeyLength("AES") < 256) {
  47                     System.out.println("Skipping aes256-cts-hmac-sha1-96");
  48                     continue;


< prev index next >