ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/startup/CertificateCreateRule.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/startup/CertificateCreateRule.java
Status
scanned
Type
file
Name
CertificateCreateRule.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2525 (2.5 KB)
MD5
51d7e4f1695e9410e4f38d0caf6b331d
SHA1
a4a87f0d93e0fab031852c68edb802f8cbc39d9b
SHA256
f28759287aaf43bc2a7d76ef19ff080c194c89b5eafa1c3d23093fe89c510375
SHA512

      
    
SHA1_git
ae919dadb37db7f69b879c29903230a3f47b00de
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
CertificateCreateRule.java | 2.5 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina.startup; import org.apache.tomcat.util.digester.Rule; import org.apache.tomcat.util.net.SSLHostConfig; import org.apache.tomcat.util.net.SSLHostConfigCertificate; import org.apache.tomcat.util.net.SSLHostConfigCertificate.Type; import org.xml.sax.Attributes; /** * Rule implementation that creates an SSLHostConfigCertificate. */ public class CertificateCreateRule extends Rule { @Override public void begin(String namespace, String name, Attributes attributes) throws Exception { SSLHostConfig sslHostConfig = (SSLHostConfig) digester.peek(); Type type; String typeValue = attributes.getValue("type"); if (typeValue == null || typeValue.isEmpty()) { type = Type.UNDEFINED; } else { type = Type.valueOf(typeValue); } SSLHostConfigCertificate certificate = new SSLHostConfigCertificate(sslHostConfig, type); digester.push(certificate); StringBuilder code = digester.getGeneratedCode(); if (code != null) { code.append(SSLHostConfigCertificate.class.getName()).append(' ') .append(digester.toVariableName(certificate)); code.append(" = new ").append(SSLHostConfigCertificate.class.getName()); code.append('(').append(digester.toVariableName(sslHostConfig)); code.append(", ").append(Type.class.getName().replace('$', '.')).append('.').append(type).append(");"); code.append(System.lineSeparator()); } } @Override public void end(String namespace, String name) throws Exception { digester.pop(); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
44.4
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9