Java Code Examples for sun.security.krb5.Checksum#CKSUMTYPE_RSA_MD5

The following examples show how to use sun.security.krb5.Checksum#CKSUMTYPE_RSA_MD5 . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CksumType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns default checksum type.
 */
public static CksumType getInstance() throws KdcErrException {
    // this method provided for Kerberos applications.
    int cksumType = Checksum.CKSUMTYPE_RSA_MD5; // default
    try {
        Config c = Config.getInstance();
        if ((cksumType = (Config.getType(c.get("libdefaults",
                "ap_req_checksum_type")))) == - 1) {
            if ((cksumType = Config.getType(c.get("libdefaults",
                    "checksum_type"))) == -1) {
                cksumType = Checksum.CKSUMTYPE_RSA_MD5; // default
            }
        }
    } catch (KrbException e) {
    }
    return getInstance(cksumType);
}
 
Example 2
Source File: CksumType.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns default checksum type.
 */
public static CksumType getInstance() throws KdcErrException {
    // this method provided for Kerberos applications.
    int cksumType = Checksum.CKSUMTYPE_RSA_MD5; // default
    try {
        Config c = Config.getInstance();
        if ((cksumType = (Config.getType(c.get("libdefaults",
                "ap_req_checksum_type")))) == - 1) {
            if ((cksumType = Config.getType(c.get("libdefaults",
                    "checksum_type"))) == -1) {
                cksumType = Checksum.CKSUMTYPE_RSA_MD5; // default
            }
        }
    } catch (KrbException e) {
    }
    return getInstance(cksumType);
}
 
Example 3
Source File: CksumType.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns default checksum type.
 */
public static CksumType getInstance() throws KdcErrException {
    // this method provided for Kerberos applications.
    int cksumType = Checksum.CKSUMTYPE_RSA_MD5; // default
    try {
        Config c = Config.getInstance();
        if ((cksumType = (Config.getType(c.get("libdefaults",
                "ap_req_checksum_type")))) == - 1) {
            if ((cksumType = Config.getType(c.get("libdefaults",
                    "checksum_type"))) == -1) {
                cksumType = Checksum.CKSUMTYPE_RSA_MD5; // default
            }
        }
    } catch (KrbException e) {
    }
    return getInstance(cksumType);
}
 
Example 4
Source File: CksumType.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns default checksum type.
 */
public static CksumType getInstance() throws KdcErrException {
    // this method provided for Kerberos applications.
    int cksumType = Checksum.CKSUMTYPE_RSA_MD5; // default
    try {
        Config c = Config.getInstance();
        if ((cksumType = (Config.getType(c.get("libdefaults",
                "ap_req_checksum_type")))) == - 1) {
            if ((cksumType = Config.getType(c.get("libdefaults",
                    "checksum_type"))) == -1) {
                cksumType = Checksum.CKSUMTYPE_RSA_MD5; // default
            }
        }
    } catch (KrbException e) {
    }
    return getInstance(cksumType);
}
 
Example 5
Source File: RsaMd5CksumType.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public int cksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 6
Source File: RsaMd5CksumType.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
public int cksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 7
Source File: RsaMd5CksumType.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public int cksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 8
Source File: RsaMd5CksumType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public int cksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 9
Source File: RsaMd5CksumType.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public int cksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 10
Source File: CksumType.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
public static CksumType getInstance(int cksumTypeConst)
    throws KdcErrException {
    CksumType cksumType = null;
    String cksumTypeName = null;
    switch (cksumTypeConst) {
    case Checksum.CKSUMTYPE_CRC32:
        cksumType = new Crc32CksumType();
        cksumTypeName = "sun.security.krb5.internal.crypto.Crc32CksumType";
        break;
    case Checksum.CKSUMTYPE_DES_MAC:
        cksumType = new DesMacCksumType();
        cksumTypeName = "sun.security.krb5.internal.crypto.DesMacCksumType";
        break;
    case Checksum.CKSUMTYPE_DES_MAC_K:
        cksumType = new DesMacKCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.DesMacKCksumType";
        break;
    case Checksum.CKSUMTYPE_RSA_MD5:
        cksumType = new RsaMd5CksumType();
        cksumTypeName = "sun.security.krb5.internal.crypto.RsaMd5CksumType";
        break;
    case Checksum.CKSUMTYPE_RSA_MD5_DES:
        cksumType = new RsaMd5DesCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.RsaMd5DesCksumType";
        break;

    case Checksum.CKSUMTYPE_HMAC_SHA1_DES3_KD:
        cksumType = new HmacSha1Des3KdCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacSha1Des3KdCksumType";
        break;

    case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES128:
        cksumType = new HmacSha1Aes128CksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacSha1Aes128CksumType";
        break;
    case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256:
        cksumType = new HmacSha1Aes256CksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacSha1Aes256CksumType";
        break;

    case Checksum.CKSUMTYPE_HMAC_MD5_ARCFOUR:
        cksumType = new HmacMd5ArcFourCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacMd5ArcFourCksumType";
        break;

        // currently we don't support MD4.
    case Checksum.CKSUMTYPE_RSA_MD4_DES_K:
        // cksumType = new RsaMd4DesKCksumType();
        // cksumTypeName =
        //          "sun.security.krb5.internal.crypto.RsaMd4DesKCksumType";
    case Checksum.CKSUMTYPE_RSA_MD4:
        // cksumType = new RsaMd4CksumType();
        // linux box support rsamd4, how to solve conflict?
        // cksumTypeName =
        //          "sun.security.krb5.internal.crypto.RsaMd4CksumType";
    case Checksum.CKSUMTYPE_RSA_MD4_DES:
        // cksumType = new RsaMd4DesCksumType();
        // cksumTypeName =
        //          "sun.security.krb5.internal.crypto.RsaMd4DesCksumType";

    default:
        throw new KdcErrException(Krb5.KDC_ERR_SUMTYPE_NOSUPP);
    }
    if (DEBUG) {
        System.out.println(">>> CksumType: " + cksumTypeName);
    }
    return cksumType;
}
 
Example 11
Source File: CksumType.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public static CksumType getInstance(int cksumTypeConst)
    throws KdcErrException {
    CksumType cksumType = null;
    String cksumTypeName = null;
    switch (cksumTypeConst) {
    case Checksum.CKSUMTYPE_CRC32:
        cksumType = new Crc32CksumType();
        cksumTypeName = "sun.security.krb5.internal.crypto.Crc32CksumType";
        break;
    case Checksum.CKSUMTYPE_DES_MAC:
        cksumType = new DesMacCksumType();
        cksumTypeName = "sun.security.krb5.internal.crypto.DesMacCksumType";
        break;
    case Checksum.CKSUMTYPE_DES_MAC_K:
        cksumType = new DesMacKCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.DesMacKCksumType";
        break;
    case Checksum.CKSUMTYPE_RSA_MD5:
        cksumType = new RsaMd5CksumType();
        cksumTypeName = "sun.security.krb5.internal.crypto.RsaMd5CksumType";
        break;
    case Checksum.CKSUMTYPE_RSA_MD5_DES:
        cksumType = new RsaMd5DesCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.RsaMd5DesCksumType";
        break;

    case Checksum.CKSUMTYPE_HMAC_SHA1_DES3_KD:
        cksumType = new HmacSha1Des3KdCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacSha1Des3KdCksumType";
        break;

    case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES128:
        cksumType = new HmacSha1Aes128CksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacSha1Aes128CksumType";
        break;

    case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256:
        cksumType = new HmacSha1Aes256CksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacSha1Aes256CksumType";
        break;

    case Checksum.CKSUMTYPE_HMAC_MD5_ARCFOUR:
        cksumType = new HmacMd5ArcFourCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacMd5ArcFourCksumType";
        break;

        // currently we don't support MD4.
    case Checksum.CKSUMTYPE_RSA_MD4_DES_K:
        // cksumType = new RsaMd4DesKCksumType();
        // cksumTypeName =
        //          "sun.security.krb5.internal.crypto.RsaMd4DesKCksumType";
    case Checksum.CKSUMTYPE_RSA_MD4:
        // cksumType = new RsaMd4CksumType();
        // linux box support rsamd4, how to solve conflict?
        // cksumTypeName =
        //          "sun.security.krb5.internal.crypto.RsaMd4CksumType";
    case Checksum.CKSUMTYPE_RSA_MD4_DES:
        // cksumType = new RsaMd4DesCksumType();
        // cksumTypeName =
        //          "sun.security.krb5.internal.crypto.RsaMd4DesCksumType";

    default:
        throw new KdcErrException(Krb5.KDC_ERR_SUMTYPE_NOSUPP);
    }
    if (DEBUG) {
        System.out.println(">>> CksumType: " + cksumTypeName);
    }
    return cksumType;
}
 
Example 12
Source File: RsaMd5CksumType.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public int cksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 13
Source File: CksumType.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public static CksumType getInstance(int cksumTypeConst)
    throws KdcErrException {
    CksumType cksumType = null;
    String cksumTypeName = null;
    switch (cksumTypeConst) {
    case Checksum.CKSUMTYPE_CRC32:
        cksumType = new Crc32CksumType();
        cksumTypeName = "sun.security.krb5.internal.crypto.Crc32CksumType";
        break;
    case Checksum.CKSUMTYPE_DES_MAC:
        cksumType = new DesMacCksumType();
        cksumTypeName = "sun.security.krb5.internal.crypto.DesMacCksumType";
        break;
    case Checksum.CKSUMTYPE_DES_MAC_K:
        cksumType = new DesMacKCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.DesMacKCksumType";
        break;
    case Checksum.CKSUMTYPE_RSA_MD5:
        cksumType = new RsaMd5CksumType();
        cksumTypeName = "sun.security.krb5.internal.crypto.RsaMd5CksumType";
        break;
    case Checksum.CKSUMTYPE_RSA_MD5_DES:
        cksumType = new RsaMd5DesCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.RsaMd5DesCksumType";
        break;

    case Checksum.CKSUMTYPE_HMAC_SHA1_DES3_KD:
        cksumType = new HmacSha1Des3KdCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacSha1Des3KdCksumType";
        break;

    case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES128:
        cksumType = new HmacSha1Aes128CksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacSha1Aes128CksumType";
        break;
    case Checksum.CKSUMTYPE_HMAC_SHA1_96_AES256:
        cksumType = new HmacSha1Aes256CksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacSha1Aes256CksumType";
        break;

    case Checksum.CKSUMTYPE_HMAC_MD5_ARCFOUR:
        cksumType = new HmacMd5ArcFourCksumType();
        cksumTypeName =
            "sun.security.krb5.internal.crypto.HmacMd5ArcFourCksumType";
        break;

        // currently we don't support MD4.
    case Checksum.CKSUMTYPE_RSA_MD4_DES_K:
        // cksumType = new RsaMd4DesKCksumType();
        // cksumTypeName =
        //          "sun.security.krb5.internal.crypto.RsaMd4DesKCksumType";
    case Checksum.CKSUMTYPE_RSA_MD4:
        // cksumType = new RsaMd4CksumType();
        // linux box support rsamd4, how to solve conflict?
        // cksumTypeName =
        //          "sun.security.krb5.internal.crypto.RsaMd4CksumType";
    case Checksum.CKSUMTYPE_RSA_MD4_DES:
        // cksumType = new RsaMd4DesCksumType();
        // cksumTypeName =
        //          "sun.security.krb5.internal.crypto.RsaMd4DesCksumType";

    default:
        throw new KdcErrException(Krb5.KDC_ERR_SUMTYPE_NOSUPP);
    }
    if (DEBUG) {
        System.out.println(">>> CksumType: " + cksumTypeName);
    }
    return cksumType;
}
 
Example 14
Source File: RsaMd5CksumType.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public int cksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 15
Source File: DesCbcCrcEType.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public int checksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 16
Source File: RsaMd5CksumType.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public int cksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 17
Source File: DesCbcMd5EType.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public int checksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 18
Source File: DesCbcMd5EType.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public int checksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 19
Source File: DesCbcCrcEType.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public int checksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}
 
Example 20
Source File: RsaMd5CksumType.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public int cksumType() {
    return Checksum.CKSUMTYPE_RSA_MD5;
}