Java Code Examples for sun.security.krb5.internal.Krb5#PA_REQ_ENC_PA_REP

The following examples show how to use sun.security.krb5.internal.Krb5#PA_REQ_ENC_PA_REP . 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: KrbAsReqBuilder.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Build a KrbAsReq object from all info fed above. Normally this method
 * will be called twice: initial AS-REQ and second with pakey
 * @param key null (initial AS-REQ) or pakey (with preauth)
 * @return the KrbAsReq object
 * @throws KrbException
 * @throws IOException
 */
private KrbAsReq build(EncryptionKey key, ReferralsState referralsState)
        throws KrbException, IOException {
    PAData[] extraPAs = null;
    int[] eTypes;
    if (password != null) {
        eTypes = EType.getDefaults("default_tkt_enctypes");
    } else {
        EncryptionKey[] ks = Krb5Util.keysFromJavaxKeyTab(ktab, cname);
        eTypes = EType.getDefaults("default_tkt_enctypes",
                ks);
        for (EncryptionKey k: ks) k.destroy();
    }
    options = (options == null) ? new KDCOptions() : options;
    if (referralsState.isEnabled()) {
        options.set(KDCOptions.CANONICALIZE, true);
        extraPAs = new PAData[]{ new PAData(Krb5.PA_REQ_ENC_PA_REP,
                new byte[]{}) };
    } else {
        options.set(KDCOptions.CANONICALIZE, false);
    }
    return new KrbAsReq(key,
        options,
        refCname,
        sname,
        from,
        till,
        rtime,
        eTypes,
        addresses,
        extraPAs);
}
 
Example 2
Source File: KrbAsReqBuilder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Build a KrbAsReq object from all info fed above. Normally this method
 * will be called twice: initial AS-REQ and second with pakey
 * @param key null (initial AS-REQ) or pakey (with preauth)
 * @return the KrbAsReq object
 * @throws KrbException
 * @throws IOException
 */
private KrbAsReq build(EncryptionKey key, ReferralsState referralsState)
        throws KrbException, IOException {
    PAData[] extraPAs = null;
    int[] eTypes;
    if (password != null) {
        eTypes = EType.getDefaults("default_tkt_enctypes");
    } else {
        EncryptionKey[] ks = Krb5Util.keysFromJavaxKeyTab(ktab, cname);
        eTypes = EType.getDefaults("default_tkt_enctypes",
                ks);
        for (EncryptionKey k: ks) k.destroy();
    }
    options = (options == null) ? new KDCOptions() : options;
    if (referralsState.isEnabled()) {
        options.set(KDCOptions.CANONICALIZE, true);
        extraPAs = new PAData[]{ new PAData(Krb5.PA_REQ_ENC_PA_REP,
                new byte[]{}) };
    } else {
        options.set(KDCOptions.CANONICALIZE, false);
    }
    return new KrbAsReq(key,
        options,
        refCname,
        sname,
        from,
        till,
        rtime,
        eTypes,
        addresses,
        extraPAs);
}
 
Example 3
Source File: KrbAsReqBuilder.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Build a KrbAsReq object from all info fed above. Normally this method
 * will be called twice: initial AS-REQ and second with pakey
 * @param key null (initial AS-REQ) or pakey (with preauth)
 * @return the KrbAsReq object
 * @throws KrbException
 * @throws IOException
 */
private KrbAsReq build(EncryptionKey key, ReferralsState referralsState)
        throws KrbException, IOException {
    PAData[] extraPAs = null;
    int[] eTypes;
    if (password != null) {
        eTypes = EType.getDefaults("default_tkt_enctypes");
    } else {
        EncryptionKey[] ks = Krb5Util.keysFromJavaxKeyTab(ktab, cname);
        eTypes = EType.getDefaults("default_tkt_enctypes",
                ks);
        for (EncryptionKey k: ks) k.destroy();
    }
    options = (options == null) ? new KDCOptions() : options;
    if (referralsState.isEnabled()) {
        options.set(KDCOptions.CANONICALIZE, true);
        extraPAs = new PAData[]{ new PAData(Krb5.PA_REQ_ENC_PA_REP,
                new byte[]{}) };
    } else {
        options.set(KDCOptions.CANONICALIZE, false);
    }
    return new KrbAsReq(key,
        options,
        refCname,
        sname,
        from,
        till,
        rtime,
        eTypes,
        addresses,
        extraPAs);
}
 
Example 4
Source File: KrbAsReqBuilder.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Build a KrbAsReq object from all info fed above. Normally this method
 * will be called twice: initial AS-REQ and second with pakey
 * @param key null (initial AS-REQ) or pakey (with preauth)
 * @return the KrbAsReq object
 * @throws KrbException
 * @throws IOException
 */
private KrbAsReq build(EncryptionKey key, ReferralsState referralsState)
        throws KrbException, IOException {
    PAData[] extraPAs = null;
    int[] eTypes;
    if (password != null) {
        eTypes = EType.getDefaults("default_tkt_enctypes");
    } else {
        EncryptionKey[] ks = Krb5Util.keysFromJavaxKeyTab(ktab, cname);
        eTypes = EType.getDefaults("default_tkt_enctypes",
                ks);
        for (EncryptionKey k: ks) k.destroy();
    }
    options = (options == null) ? new KDCOptions() : options;
    if (referralsState.isEnabled()) {
        options.set(KDCOptions.CANONICALIZE, true);
        extraPAs = new PAData[]{ new PAData(Krb5.PA_REQ_ENC_PA_REP,
                new byte[]{}) };
    } else {
        options.set(KDCOptions.CANONICALIZE, false);
    }
    return new KrbAsReq(key,
        options,
        refCname,
        sname,
        from,
        till,
        rtime,
        eTypes,
        addresses,
        extraPAs);
}