Activates or deactivates the acceptance of self signed/unsecure SSL certificates

@param {Function} boolActivateUnsecure
boolean value to set desired behaviour
965573
function (boolActivateUnsecure) {
        if (cordova.platformId == 'android')
            cordova.exec(null, null, 'CertificatesPlugin', 'setUntrusted', [boolActivateUnsecure]);
        else
            cordova.exec(null, null, 'CDVCertificate', 'setUntrusted', [boolActivateUnsecure]);
    }
987496
@InterfaceAudience.Public
    public void allowSelfSignedSSLCertificates() {
        // SSLSocketFactory that bypasses certificate verification.
        try {
            setSSLSocketFactory(selfSignedSSLSocketFactory());
        } catch (GeneralSecurityException e) {
            throw new RuntimeException(e);
        }

        // HostnameVerifier that bypasses hotname verification
        setHostnameVerifier(ignoreHostnameVerifier());
    }
1225215
@Override
    public void activate(RuleBlock ruleBlock) {
        if (FuzzyLite.isDebugging()) {
            FuzzyLite.logger().log(Level.FINE, "Activation: {0} {1}",
                    new String[]{getClass().getName(), parameters()});
        }
        TNorm conjunction = ruleBlock.getConjunction();
        SNorm disjunction = ruleBlock.getDisjunction();
        TNorm implication = ruleBlock.getImplication();

        double sumActivationDegrees = 0.0;
        List<Rule> rulesToActivate = new ArrayList<Rule>(ruleBlock.getRules().size());
        for (Rule rule : ruleBlock.getRules()) {
            rule.deactivate();
            if (rule.isLoaded()) {
                double activationDegree = rule.activateWith(conjunction, disjunction);
                rulesToActivate.add(rule);
                sumActivationDegrees += activationDegree;
            }
        }
        for (Rule rule : rulesToActivate) {
            double activationDegree = rule.getActivationDegree() / sumActivationDegrees;
            rule.setActivationDegree(activationDegree);
            rule.trigger(implication);
        }
    }
820539
function(disabled){
      disabled = !!resolveValue(this, this.setDisabled, disabled, 'disabledRA_');

      if (this.disabled !== disabled)
      {
        this.disabled = disabled;

        if (!this.contextDisabled)
          if (disabled)
            this.emit_disable();
          else
            this.emit_enable();

        return true;
      }

      return false;
    }
500684
def use_ssl=(flag)
      flag = (flag ? true : false)
      raise IOError, "use_ssl value changed, but session already started" \
          if started? and @use_ssl != flag
      if flag and not @ssl_context
        @ssl_context = OpenSSL::SSL::SSLContext.new
      end
      @use_ssl = flag
    end
593103
@Activate
    protected synchronized void activate(ComponentContext ctx, Map<String, Object> properties) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Activated: " + properties);
        }

        Set<String> installedFeatures = provisionerService.getInstalledFeatures();
        if (installedFeatures.contains("transportSecurity-1.0")) {
            transportSecurityEnabled = true;
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "transportSecurityEnable installed");
            }
        } else {
            transportSecurityEnabled = false;
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "transportSecurityEnable is not installed");
            }
        }

        super.activate(MY_ALIAS, properties);

        this.componentContext = (ExtComponentContext) ctx;

        processConfig(true);

    }
720041
boolean activatesWith(double activationDegree) {
        //favour if-then-return over switch to avoid new file Threshold$1.class
        if (Comparison.LessThan == this.comparison) {
            return Op.isLt(activationDegree, getValue());
        }
        if (Comparison.LessThanOrEqualTo == this.comparison) {
            return Op.isLE(activationDegree, getValue());
        }
        if (Comparison.EqualTo == this.comparison) {
            return Op.isEq(activationDegree, getValue());
        }
        if (Comparison.NotEqualTo == this.comparison) {
            return !Op.isEq(activationDegree, getValue());
        }
        if (Comparison.GreaterThanOrEqualTo == this.comparison) {
            return Op.isGE(activationDegree, getValue());
        }
        if (Comparison.GreaterThan == this.comparison) {
            return Op.isGt(activationDegree, getValue());
        }
        return false;
    }
71773
public void setEnableCors( boolean enableCors ) {

		this.logger.fine( "CORS is now " + (enableCors ? "enabled" : "disabled") + ". Updating the REST resource." );
		this.enableCors = enableCors;

		if( this.app != null )
			this.app.enableCors( enableCors );

		if( this.authenticationFilter != null )
			this.authenticationFilter.setEnableCors( enableCors );

		try {
			if( this.jerseyServlet != null )
				this.jerseyServlet.reload();

		} catch( Exception e ) {
			Utils.logException( this.logger, e );
		}
	}
363222
def setActivations(self, value):
        
        #if self.verify and not self.activationSet == 0:
        #    raise LayerError, \
        #          ('Activation flag not reset. Activations may have been set multiple times without any intervening call to propagate().', self.activationSet)
        Numeric.put(self.activation, Numeric.arange(len(self.activation)), value)
        self.activationSet = 1
719862
private static boolean isValidCarrierNode(final boolean sslEnabled, final NodeInfo nodeInfo) {
        if (sslEnabled && nodeInfo.sslServices().containsKey(ServiceType.BINARY)) {
            return true;
        } else if (nodeInfo.services().containsKey(ServiceType.BINARY)) {
            return true;
        }
        return false;
    }
1110414
public function setVerifyPeer($value = FALSE)
    {
        if (!$value) {
            $this->verifyPeer = FALSE;
        } else {
            $this->verifyPeer = TRUE;
        }
    }
801555
@Activate
    protected void activate(BundleContext ctx, Map<String, Object> properties) {

        SibTr.entry(tc, CLASS_NAME + "activate", properties);

        this.properties = properties;
        this.bundleLocation = ctx.getBundle().getLocation();
        populateDestinationPermissions();
        runtimeSecurityService.modifyMessagingServices(this);

        SibTr.exit(tc, CLASS_NAME + "activate");

    }
730267
@Override
    public void activate(RuleBlock ruleBlock) {
        if (FuzzyLite.isDebugging()) {
            FuzzyLite.logger().log(Level.FINE, "Activation: {0} {1}",
                    new String[]{getClass().getName(), parameters()});
        }
        TNorm conjunction = ruleBlock.getConjunction();
        SNorm disjunction = ruleBlock.getDisjunction();
        TNorm implication = ruleBlock.getImplication();

        PriorityQueue<Rule> rulesToActivate = new PriorityQueue<Rule>(
                numberOfRules, new Ascending());

        for (Rule rule : ruleBlock.getRules()) {
            rule.deactivate();

            if (rule.isLoaded()) {
                double activationDegree = rule.activateWith(conjunction, disjunction);
                if (Op.isGt(activationDegree, 0.0)) {
                    rulesToActivate.offer(rule);
                }
            }
        }

        int activated = 0;
        while (!rulesToActivate.isEmpty() && activated++ < numberOfRules) {
            rulesToActivate.poll().trigger(implication);
        }
    }
295790
function(attr, options) {
    options = options ? _.clone(options) : {};
    var val = this.get(attr);
    if(!_.isBoolean(val)) console.error('Tried to toggle non-boolean value ' + attr +'!', this);
    return this.set(attr, !val, options);
  }
551098
synchronized public void setWantClientAuth(boolean flag) {
        doClientAuth = (flag ?
            SSLEngineImpl.clauth_requested : SSLEngineImpl.clauth_none);

        if ((handshaker != null) &&
                (handshaker instanceof ServerHandshaker) &&
                !handshaker.activated()) {
            ((ServerHandshaker) handshaker).setClientAuth(doClientAuth);
        }
    }
1041401
function() {
        if (OpenLayers.Control.prototype.activate.apply(this, arguments)) {
            this.map.addLayer(this.gratLayer);
            this.map.events.register('moveend', this, this.update);     
            this.update();
            return true;            
        } else {
            return false;
        }
    }
516987
def server_side_activation=(activation)
      raise JSS::InvalidDataError, 'Activation must be a Time' unless activation.is_a? Time
      @server_side_limitations[:activation] = activation
      @need_to_update = true
    end