removes the ALPN extensions from the server hello
@param source
@return
@throws SSLException
972793
static byte[] removeAlpnExtensionsFromServerHello(ByteBuffer source, final AtomicReference<String> selectedAlpnProtocol)
            throws SSLException {
        ByteArrayOutputStream out = new ByteArrayOutputStream();

        try {

            exploreHandshake(source, source.remaining(), selectedAlpnProtocol, out);
            //we need to adjust the record length;
            int serverHelloLength = out.size() - 4;
            byte[] data = out.toByteArray();

            //now we need to adjust the handshake frame length
            data[1] = (byte) ((serverHelloLength >> 16) & 0xFF);
            data[2] = (byte) ((serverHelloLength >> 8) & 0xFF);
            data[3] = (byte) (serverHelloLength & 0xFF);
            return data;
        } catch (AlpnProcessingException e) {
            return null;
        }
    }
364787
public static base_response unset(nitro_service client, sslfips resource, String[] args) throws Exception{
		sslfips unsetresource = new sslfips();
		return unsetresource.unset_resource(client,args);
	}
1072885
public static void clearSSLContextCache() {
        if (sslContextCacheJAVAX != null && sslContextCacheJAVAX.size() > 0) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "Clearing standard javax.net.ssl.SSLContext cache.");
            sslContextCacheJAVAX.clear();
        }
    }
1150323
synchronized public void closeInbound() throws SSLException {
        /*
         * Currently closes the outbound side as well.  The IETF TLS
         * working group has expressed the opinion that 1/2 open
         * connections are not allowed by the spec.  May change
         * someday in the future.
         */
        if ((debug != null) && Debug.isOn("ssl")) {
            System.out.println(threadName() + ", called closeInbound()");
        }

        /*
         * No need to throw an Exception if we haven't even started yet.
         */
        if ((connectionState != cs_START) && !recvCN) {
            recvCN = true;  // Only receive the Exception once
            fatal(Alerts.alert_internal_error,
                "Inbound closed before receiving peer's close_notify: " +
                "possible truncation attack?");
        } else {
            /*
             * Currently, this is a no-op, but in case we change
             * the close inbound code later.
             */
            closeInboundInternal();
        }
    }
102051
def remove_source(self, source):
        
        geocode_service = self._get_service_by_name(source[0])
        self._sources.remove(geocode_service(**source[1]))
171222
public void cleanup() {
        synchronized (_sslMap) {
            for (SslRelayOdo relay : _sslMap.values()) {
                if (relay.getHttpServer() != null && relay.isStarted()) {
                    relay.getHttpServer().removeListener(relay);
                }
            }

            sslRelays.clear();
        }
    }
270927
public static base_responses delete(nitro_service client, String ciphergroupname[]) throws Exception {
		base_responses result = null;
		if (ciphergroupname != null && ciphergroupname.length > 0) {
			sslcipher deleteresources[] = new sslcipher[ciphergroupname.length];
			for (int i=0;i<ciphergroupname.length;i++){
				deleteresources[i] = new sslcipher();
				deleteresources[i].ciphergroupname = ciphergroupname[i];
			}
			result = delete_bulk_request(client, deleteresources);
		}
		return result;
	}
634413
@Deprecated
    public B sslContext(
            SessionProtocol protocol,
            File keyCertChainFile, File keyFile, @Nullable String keyPassword) throws SSLException {

        if (requireNonNull(protocol, "protocol") != SessionProtocol.HTTPS) {
            throw new IllegalArgumentException("unsupported protocol: " + protocol);
        }

        return tls(keyCertChainFile, keyFile, keyPassword);
    }
269199
public void removeExtension(Extension extension) {
        extensionList.remove(extension);
        extensionsMap.remove(extension.getClass());

        ExtensionHook hook = extensionHooks.remove(extension);
        if (hook == null) {
            logger.error("ExtensionHook not found for: " + extension.getClass().getCanonicalName());
            return;
        }

        unloadOptions(hook);

        unhookProxies(hook);

        removePersistentConnectionListener(hook);

        removeProxyListener(hook);

        removeOverrideMessageProxyListener(hook);

        removeConnectRequestProxyListener(hook);

        removeSiteMapListener(hook);

        for (ContextDataFactory contextDataFactory : hook.getContextDataFactories()) {
            try {
                model.removeContextDataFactory(contextDataFactory);
            } catch (Exception e) {
                logger.error("Error while removing a ContextDataFactory from " + extension.getClass().getCanonicalName(), e);
            }
        }

        for (ApiImplementor apiImplementor : hook.getApiImplementors()) {
            try {
                API.getInstance().removeApiImplementor(apiImplementor);
            } catch (Exception e) {
                logger.error("Error while removing an ApiImplementor from " + extension.getClass().getCanonicalName(), e);
            }
        }

        for (HttpSenderListener httpSenderListener : hook.getHttpSenderListeners()) {
            try {
                HttpSender.removeListener(httpSenderListener);
            } catch (Exception e) {
                logger.error("Error while removing an HttpSenderListener from " + extension.getClass().getCanonicalName(), e);
            }
        }

        removeViewInEDT(extension, hook);
    }
1017160
public void removeVirtualHost(String hostname)
    {
        // Note that null hosts are also added.
        if (_vhosts.remove(hostname))
        {
            _contextName=null;
            if (_httpServer!=null)
            {
                _httpServer.removeMapping(hostname,this);
                if (_vhosts.size()==0)
                    _httpServer.addMapping(null,this);
            }
            _vhostsArray=null;
        }
    }
162444
def Delete(self):
		

		self.public_ip.source_restrictions = [o for o in self.public_ip.source_restrictions if o!=self]

		return(self.public_ip.Update())
719218
public static base_responses delete(nitro_service client, String crlname[]) throws Exception {
		base_responses result = null;
		if (crlname != null && crlname.length > 0) {
			sslcrl deleteresources[] = new sslcrl[crlname.length];
			for (int i=0;i<crlname.length;i++){
				deleteresources[i] = new sslcrl();
				deleteresources[i].crlname = crlname[i];
			}
			result = delete_bulk_request(client, deleteresources);
		}
		return result;
	}
736071
protected void unsetSslSupport(ServiceReference<ChannelFactoryProvider> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(this, tc, "disable ssl support " + ref.getProperty("type"), this);
        }
        if (sslFactoryProvider.unsetReference(ref)) {
            httpSecureChain.disable();
            // removal of ssl support includes removal of the ssl channel factory
            // the CFW is going to disable this chain once the factory goes away.
        }
    }
1357690
protected void unsetSslSupport(SSLSupport service) {
        sslSupport = null;
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "unsetSslSupport", service);
        }
    }
1296209
public static CipherRegistry registerCiphers(InputStream source) {
        try {
            if (source == null) {
                throw new IllegalArgumentException("Cipher source not found.");
            }
            
            List<String> lines = IOUtils.readLines(source);
            int start = -1;
            int index = 0;
            boolean error = false;
            
            while (index < lines.size()) {
                String line = lines.get(index);
                
                if (line.trim().isEmpty()) {
                    lines.remove(index);
                    continue;
                }
                
                if (line.equals("-----BEGIN CIPHER-----")) {
                    if (start == -1) {
                        start = index + 1;
                    } else {
                        error = true;
                    }
                } else if (line.equals("-----END CIPHER-----")) {
                    if (start > 0) {
                        int length = index - start;
                        String[] cipher = new String[length];
                        registerCipher(lines.subList(start, index).toArray(cipher));
                        start = -1;
                    } else {
                        error = true;
                    }
                }
                
                if (error) {
                    throw new IllegalArgumentException("Unexpected text in cipher: " + line);
                }
                
                index++;
            }
            
            if (start > 0) {
                throw new IllegalArgumentException("Missing end cipher token.");
            }
            
        } catch (IOException e) {
            throw MiscUtil.toUnchecked(e);
        } finally {
            IOUtils.closeQuietly(source);
        }
        
        return instance;
    }
478637
protected void removeCachedExtension(E extension)
    {
        // Remove the extension from the memory.
        this.extensions.remove(extension.getId());

        // versions
        removeCachedExtensionVersion(extension.getId().getId(), extension);
        if (!this.strictId) {
            for (String feature : extension.getFeatures()) {
                removeCachedExtensionVersion(feature, extension);
            }
        }
    }
8410
public void init() throws SSLException {
        if (sslEngine != null) {
            // We already have a SSL engine created, no need to create a new one
            return;
        }

        InetSocketAddress peer = (InetSocketAddress) session
                .getAttribute(SslFilter.PEER_ADDRESS);
        
        // Create the SSL engine here
        if (peer == null) {
            sslEngine = sslContext.createSSLEngine();
        } else {
            sslEngine = sslContext.createSSLEngine(peer.getHostName(), peer.getPort());
        }
        
        // Initialize the engine in client mode if necessary
        sslEngine.setUseClientMode(parent.isUseClientMode());

        // Initialize the different SslEngine modes
        if (parent.isWantClientAuth()) {
            sslEngine.setWantClientAuth(true);
        }

        if (parent.isNeedClientAuth()) {
            sslEngine.setNeedClientAuth(true);
        }

        if (parent.getEnabledCipherSuites() != null) {
            sslEngine.setEnabledCipherSuites(parent.getEnabledCipherSuites());
        }

        if (parent.getEnabledProtocols() != null) {
            sslEngine.setEnabledProtocols(parent.getEnabledProtocols());
        }

        // TODO : we may not need to call this method...
        sslEngine.beginHandshake();
        
        
        handshakeStatus = sslEngine.getHandshakeStatus();

        handshakeComplete = false;
        initialHandshakeComplete = false;
        writingEncryptedData = false;
    }