sun.security.action.GetBooleanAction Java Examples

The following examples show how to use sun.security.action.GetBooleanAction. 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: AcceptSecContextToken.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates an AcceptSecContextToken for the context acceptor to send to
 * the context initiator.
 */
public AcceptSecContextToken(Krb5Context context,
                             KrbApReq apReq)
    throws KrbException, IOException, GSSException {

    boolean useSubkey = AccessController.doPrivileged(
            new GetBooleanAction("sun.security.krb5.acceptor.subkey"));

    boolean useSequenceNumber = true;

    EncryptionKey subKey = null;
    if (useSubkey) {
        subKey = new EncryptionKey(apReq.getCreds().getSessionKey());
        context.setKey(Krb5Context.ACCEPTOR_SUBKEY, subKey);
    }
    apRep = new KrbApRep(apReq, useSequenceNumber, subKey);

    context.resetMySequenceNumber(apRep.getSeqNumber().intValue());

    /*
     * Note: The acceptor side context key was set when the
     * InitSecContextToken was received.
     */
}
 
Example #2
Source File: AquaMenuBarUI.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
static boolean getScreenMenuBarProperty() {
    // Do not allow AWT to set the screen menu bar if it's embedded in another UI toolkit
    if (LWCToolkit.isEmbedded()) return false;
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar"))) {
        return true;
    }
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sOldPropertyPrefix + "useScreenMenuBar"))) {
            System.err.println(AquaLookAndFeel.sOldPropertyPrefix +
                    "useScreenMenuBar has been deprecated. Please switch to " +
                    AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar");
            return true;
    }
    return false;
}
 
Example #3
Source File: AcceptSecContextToken.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates an AcceptSecContextToken for the context acceptor to send to
 * the context initiator.
 */
public AcceptSecContextToken(Krb5Context context,
                             KrbApReq apReq)
    throws KrbException, IOException, GSSException {

    boolean useSubkey = AccessController.doPrivileged(
            new GetBooleanAction("sun.security.krb5.acceptor.subkey"));

    boolean useSequenceNumber = true;

    EncryptionKey subKey = null;
    if (useSubkey) {
        subKey = new EncryptionKey(apReq.getCreds().getSessionKey());
        context.setKey(Krb5Context.ACCEPTOR_SUBKEY, subKey);
    }
    apRep = new KrbApRep(apReq, useSequenceNumber, subKey);

    context.resetMySequenceNumber(apRep.getSeqNumber().intValue());

    /*
     * Note: The acceptor side context key was set when the
     * InitSecContextToken was received.
     */
}
 
Example #4
Source File: AquaMenuBarUI.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
static boolean getScreenMenuBarProperty() {
    // Do not allow AWT to set the screen menu bar if it's embedded in another UI toolkit
    if (LWCToolkit.isEmbedded()) return false;
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar"))) {
        return true;
    }
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sOldPropertyPrefix + "useScreenMenuBar"))) {
            System.err.println(AquaLookAndFeel.sOldPropertyPrefix +
                    "useScreenMenuBar has been deprecated. Please switch to " +
                    AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar");
            return true;
    }
    return false;
}
 
Example #5
Source File: AquaMenuBarUI.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public static boolean getScreenMenuBarProperty() {
    // Do not allow AWT to set the screen menu bar if it's embedded in another UI toolkit
    if (LWCToolkit.isEmbedded()) return false;
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar"))) {
        return true;
    }
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sOldPropertyPrefix + "useScreenMenuBar"))) {
            System.err.println(AquaLookAndFeel.sOldPropertyPrefix +
                    "useScreenMenuBar has been deprecated. Please switch to " +
                    AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar");
            return true;
    }
    return false;
}
 
Example #6
Source File: AcceptSecContextToken.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates an AcceptSecContextToken for the context acceptor to send to
 * the context initiator.
 */
public AcceptSecContextToken(Krb5Context context,
                             KrbApReq apReq)
    throws KrbException, IOException, GSSException {

    boolean useSubkey = AccessController.doPrivileged(
            new GetBooleanAction("sun.security.krb5.acceptor.subkey"));

    boolean useSequenceNumber = true;

    EncryptionKey subKey = null;
    if (useSubkey) {
        subKey = new EncryptionKey(apReq.getCreds().getSessionKey());
        context.setKey(Krb5Context.ACCEPTOR_SUBKEY, subKey);
    }
    apRep = new KrbApRep(apReq, useSequenceNumber, subKey);

    context.resetMySequenceNumber(apRep.getSeqNumber().intValue());

    /*
     * Note: The acceptor side context key was set when the
     * InitSecContextToken was received.
     */
}
 
Example #7
Source File: AquaMenuBarUI.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
static boolean getScreenMenuBarProperty() {
    // Do not allow AWT to set the screen menu bar if it's embedded in another UI toolkit
    if (LWCToolkit.isEmbedded()) return false;
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar"))) {
        return true;
    }
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sOldPropertyPrefix + "useScreenMenuBar"))) {
            System.err.println(AquaLookAndFeel.sOldPropertyPrefix +
                    "useScreenMenuBar has been deprecated. Please switch to " +
                    AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar");
            return true;
    }
    return false;
}
 
Example #8
Source File: AquaMenuBarUI.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
static boolean getScreenMenuBarProperty() {
    // Do not allow AWT to set the screen menu bar if it's embedded in another UI toolkit
    if (LWCToolkit.isEmbedded()) return false;
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar"))) {
        return true;
    }
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sOldPropertyPrefix + "useScreenMenuBar"))) {
            System.err.println(AquaLookAndFeel.sOldPropertyPrefix +
                    "useScreenMenuBar has been deprecated. Please switch to " +
                    AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar");
            return true;
    }
    return false;
}
 
Example #9
Source File: AcceptSecContextToken.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates an AcceptSecContextToken for the context acceptor to send to
 * the context initiator.
 */
public AcceptSecContextToken(Krb5Context context,
                             KrbApReq apReq)
    throws KrbException, IOException, GSSException {

    boolean useSubkey = AccessController.doPrivileged(
            new GetBooleanAction("sun.security.krb5.acceptor.subkey"));

    boolean useSequenceNumber = true;

    EncryptionKey subKey = null;
    if (useSubkey) {
        subKey = new EncryptionKey(apReq.getCreds().getSessionKey());
        context.setKey(Krb5Context.ACCEPTOR_SUBKEY, subKey);
    }
    apRep = new KrbApRep(apReq, useSequenceNumber, subKey);

    context.resetMySequenceNumber(apRep.getSeqNumber().intValue());

    /*
     * Note: The acceptor side context key was set when the
     * InitSecContextToken was received.
     */
}
 
Example #10
Source File: AquaMenuBarUI.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
static boolean getScreenMenuBarProperty() {
    // Do not allow AWT to set the screen menu bar if it's embedded in another UI toolkit
    if (LWCToolkit.isEmbedded()) return false;
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar"))) {
        return true;
    }
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sOldPropertyPrefix + "useScreenMenuBar"))) {
            System.err.println(AquaLookAndFeel.sOldPropertyPrefix +
                    "useScreenMenuBar has been deprecated. Please switch to " +
                    AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar");
            return true;
    }
    return false;
}
 
Example #11
Source File: AcceptSecContextToken.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates an AcceptSecContextToken for the context acceptor to send to
 * the context initiator.
 */
public AcceptSecContextToken(Krb5Context context,
                             KrbApReq apReq)
    throws KrbException, IOException, GSSException {

    boolean useSubkey = AccessController.doPrivileged(
            new GetBooleanAction("sun.security.krb5.acceptor.subkey"));

    boolean useSequenceNumber = true;

    EncryptionKey subKey = null;
    if (useSubkey) {
        subKey = new EncryptionKey(apReq.getCreds().getSessionKey());
        context.setKey(Krb5Context.ACCEPTOR_SUBKEY, subKey);
    }
    apRep = new KrbApRep(apReq, useSequenceNumber, subKey);

    context.resetMySequenceNumber(apRep.getSeqNumber().intValue());

    /*
     * Note: The acceptor side context key was set when the
     * InitSecContextToken was received.
     */
}
 
Example #12
Source File: AquaMenuBarUI.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
static boolean getScreenMenuBarProperty() {
    // Do not allow AWT to set the screen menu bar if it's embedded in another UI toolkit
    if (LWCToolkit.isEmbedded()) return false;
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar"))) {
        return true;
    }
    if (AccessController.doPrivileged(
            new GetBooleanAction(AquaLookAndFeel.sOldPropertyPrefix + "useScreenMenuBar"))) {
            System.err.println(AquaLookAndFeel.sOldPropertyPrefix +
                    "useScreenMenuBar has been deprecated. Please switch to " +
                    AquaLookAndFeel.sPropertyPrefix + "useScreenMenuBar");
            return true;
    }
    return false;
}
 
Example #13
Source File: AcceptSecContextToken.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates an AcceptSecContextToken for the context acceptor to send to
 * the context initiator.
 */
public AcceptSecContextToken(Krb5Context context,
                             KrbApReq apReq)
    throws KrbException, IOException, GSSException {

    boolean useSubkey = AccessController.doPrivileged(
            new GetBooleanAction("sun.security.krb5.acceptor.subkey"));

    boolean useSequenceNumber = true;

    EncryptionKey subKey = null;
    if (useSubkey) {
        subKey = new EncryptionKey(apReq.getCreds().getSessionKey());
        context.setKey(Krb5Context.ACCEPTOR_SUBKEY, subKey);
    }
    apRep = new KrbApRep(apReq, useSequenceNumber, subKey);

    context.resetMySequenceNumber(apRep.getSeqNumber().intValue());

    /*
     * Note: The acceptor side context key was set when the
     * InitSecContextToken was received.
     */
}
 
Example #14
Source File: SunToolkit.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableMixing" property. Default
 * value is {@code false}.
 */
public synchronized static boolean getSunAwtDisableMixing() {
    if (sunAwtDisableMixing == null) {
        sunAwtDisableMixing = AccessController.doPrivileged(
                                  new GetBooleanAction("sun.awt.disableMixing"));
    }
    return sunAwtDisableMixing.booleanValue();
}
 
Example #15
Source File: SunToolkit.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableMixing" property. Default
 * value is {@code false}.
 */
public synchronized static boolean getSunAwtDisableMixing() {
    if (sunAwtDisableMixing == null) {
        sunAwtDisableMixing = AccessController.doPrivileged(
                                  new GetBooleanAction("sun.awt.disableMixing"));
    }
    return sunAwtDisableMixing.booleanValue();
}
 
Example #16
Source File: XEmbedCanvasPeer.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
void canvasFocusLost(FocusEvent e) {
    if (isXEmbedActive() && !e.isTemporary()) {
        xembedLog.fine("Forwarding FOCUS_LOST");
        int num = 0;
        if (AccessController.doPrivileged(new GetBooleanAction("sun.awt.xembed.testing"))) {
            Component opp = e.getOppositeComponent();
            try {
                num = Integer.parseInt(opp.getName());
            } catch (NumberFormatException nfe) {
            }
        }
        xembed.sendMessage(xembed.handle, XEMBED_FOCUS_OUT, num, 0, 0);
    }
}
 
Example #17
Source File: XToolkit.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableGtkFileDialogs" property. Default
 * value is {@code false}.
 */
public synchronized static boolean getSunAwtDisableGtkFileDialogs() {
    if (sunAwtDisableGtkFileDialogs == null) {
        sunAwtDisableGtkFileDialogs = AccessController.doPrivileged(
                                          new GetBooleanAction("sun.awt.disableGtkFileDialogs"));
    }
    return sunAwtDisableGtkFileDialogs.booleanValue();
}
 
Example #18
Source File: LWCToolkit.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableCALayers" property. Default
 * value is {@code false}.
 */
public static synchronized boolean getSunAwtDisableCALayers() {
    if (sunAwtDisableCALayers == null) {
        sunAwtDisableCALayers = AccessController.doPrivileged(
            new GetBooleanAction("sun.awt.disableCALayers"));
    }
    return sunAwtDisableCALayers;
}
 
Example #19
Source File: LWCToolkit.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableCALayers" property. Default
 * value is {@code false}.
 */
public static synchronized boolean getSunAwtDisableCALayers() {
    if (sunAwtDisableCALayers == null) {
        sunAwtDisableCALayers = AccessController.doPrivileged(
            new GetBooleanAction("sun.awt.disableCALayers"));
    }
    return sunAwtDisableCALayers;
}
 
Example #20
Source File: SunToolkit.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableMixing" property. Default
 * value is {@code false}.
 */
public synchronized static boolean getSunAwtDisableMixing() {
    if (sunAwtDisableMixing == null) {
        sunAwtDisableMixing = AccessController.doPrivileged(
                                  new GetBooleanAction("sun.awt.disableMixing"));
    }
    return sunAwtDisableMixing.booleanValue();
}
 
Example #21
Source File: XToolkit.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.X11.checkSTRUT" property. Default value is
 * {@code false}.
 */
private static boolean checkSTRUT() {
    if (checkSTRUT == null) {
        checkSTRUT = AccessController.doPrivileged(
                new GetBooleanAction("sun.awt.X11.checkSTRUT"));
    }
    return checkSTRUT;
}
 
Example #22
Source File: XEmbedCanvasPeer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
void canvasFocusLost(FocusEvent e) {
    if (isXEmbedActive() && !e.isTemporary()) {
        xembedLog.fine("Forwarding FOCUS_LOST");
        int num = 0;
        if (AccessController.doPrivileged(new GetBooleanAction("sun.awt.xembed.testing"))) {
            Component opp = e.getOppositeComponent();
            try {
                num = Integer.parseInt(opp.getName());
            } catch (NumberFormatException nfe) {
            }
        }
        xembed.sendMessage(xembed.handle, XEMBED_FOCUS_OUT, num, 0, 0);
    }
}
 
Example #23
Source File: LWCToolkit.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableCALayers" property. Default
 * value is {@code false}.
 */
public static synchronized boolean getSunAwtDisableCALayers() {
    if (sunAwtDisableCALayers == null) {
        sunAwtDisableCALayers = AccessController.doPrivileged(
            new GetBooleanAction("sun.awt.disableCALayers"));
    }
    return sunAwtDisableCALayers;
}
 
Example #24
Source File: SunToolkit.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableMixing" property. Default
 * value is {@code false}.
 */
public synchronized static boolean getSunAwtDisableMixing() {
    if (sunAwtDisableMixing == null) {
        sunAwtDisableMixing = AccessController.doPrivileged(
                                  new GetBooleanAction("sun.awt.disableMixing"));
    }
    return sunAwtDisableMixing.booleanValue();
}
 
Example #25
Source File: LWCToolkit.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableCALayers" property. Default
 * value is {@code false}.
 */
public static synchronized boolean getSunAwtDisableCALayers() {
    if (sunAwtDisableCALayers == null) {
        sunAwtDisableCALayers = AccessController.doPrivileged(
            new GetBooleanAction("sun.awt.disableCALayers"));
    }
    return sunAwtDisableCALayers;
}
 
Example #26
Source File: SunToolkit.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableMixing" property. Default
 * value is {@code false}.
 */
public synchronized static boolean getSunAwtDisableMixing() {
    if (sunAwtDisableMixing == null) {
        sunAwtDisableMixing = AccessController.doPrivileged(
                                  new GetBooleanAction("sun.awt.disableMixing"));
    }
    return sunAwtDisableMixing.booleanValue();
}
 
Example #27
Source File: LWCToolkit.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableCALayers" property. Default
 * value is {@code false}.
 */
public static synchronized boolean getSunAwtDisableCALayers() {
    if (sunAwtDisableCALayers == null) {
        sunAwtDisableCALayers = AccessController.doPrivileged(
            new GetBooleanAction("sun.awt.disableCALayers"));
    }
    return sunAwtDisableCALayers;
}
 
Example #28
Source File: XEmbedCanvasPeer.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
void canvasFocusLost(FocusEvent e) {
    if (isXEmbedActive() && !e.isTemporary()) {
        xembedLog.fine("Forwarding FOCUS_LOST");
        int num = 0;
        if (AccessController.doPrivileged(new GetBooleanAction("sun.awt.xembed.testing"))) {
            Component opp = e.getOppositeComponent();
            try {
                num = Integer.parseInt(opp.getName());
            } catch (NumberFormatException nfe) {
            }
        }
        xembed.sendMessage(xembed.handle, XEMBED_FOCUS_OUT, num, 0, 0);
    }
}
 
Example #29
Source File: XToolkit.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableGtkFileDialogs" property. Default
 * value is {@code false}.
 */
public synchronized static boolean getSunAwtDisableGtkFileDialogs() {
    if (sunAwtDisableGtkFileDialogs == null) {
        sunAwtDisableGtkFileDialogs = AccessController.doPrivileged(
                                          new GetBooleanAction("sun.awt.disableGtkFileDialogs"));
    }
    return sunAwtDisableGtkFileDialogs.booleanValue();
}
 
Example #30
Source File: XToolkit.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns the value of "sun.awt.disableGtkFileDialogs" property. Default
 * value is {@code false}.
 */
public synchronized static boolean getSunAwtDisableGtkFileDialogs() {
    if (sunAwtDisableGtkFileDialogs == null) {
        sunAwtDisableGtkFileDialogs = AccessController.doPrivileged(
                                          new GetBooleanAction("sun.awt.disableGtkFileDialogs"));
    }
    return sunAwtDisableGtkFileDialogs.booleanValue();
}