This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git clone https://github.com/h2o/picotls | |
cd picotls | |
export CFLAGS="-fprofile-arcs -ftest-coverage -g -O0 -fsanitize=address -fno-omit-frame-pointer" | |
export LDFLAGS="-fsanitize=address" | |
cmake \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/t/cli.c b/t/cli.c | |
index 8d9b68b..99cc4ab 100644 | |
--- a/t/cli.c | |
+++ b/t/cli.c | |
@@ -19,6 +19,11 @@ | |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | |
* IN THE SOFTWARE. | |
*/ | |
+ | |
+/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class SecurityConfiguration extends WebSecurityConfigurerAdapter { | |
private static final String readScope = "#oauth2.isOAuth() && #oauth2.hasScope('read')"; | |
@Bean | |
@Override | |
public AuthenticationManager authenticationManagerBean() throws Exception { | |
return super.authenticationManagerBean(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gypsyengineer.tlsbunny.jsse; | |
import javax.net.ssl.SSLServerSocket; | |
import javax.net.ssl.SSLServerSocketFactory; | |
import javax.net.ssl.SSLSocket; | |
import javax.net.ssl.SSLSocketFactory; | |
import java.io.*; | |
/* | |
* Don't forget to set the following system properties when you run the class: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gypsyengineer.innerclass.field; | |
public class Outer { | |
private int secret = 10; | |
public void check() { | |
if (secret < 0) { | |
System.out.println("Oops"); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class A { | |
private int secret; | |
public class B { | |
public go() { | |
// do something | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gypsyengineer.innerclass.field; | |
public class AccessPrivateField { | |
public static void test01() throws Exception { | |
System.out.println("Test #1: try to modify a private field with the same classloader"); | |
System.out.println(" (no exception is expected, 'oops' should be printed out)"); | |
Outer outer = new Outer(); | |
go(outer); | |
outer.check(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gypsyengineer.innerclass.field; | |
public class AccessPrivateField { | |
public static void test02(ClassLoader cl) throws Exception { | |
System.out.println("Test #2: try to modify a private field with different classloader"); | |
System.out.println(" (an exception is expected)"); | |
// Load AccessPrivateField class with different classloader | |
Class clazz = cl.loadClass( | |
"com.gypsyengineer.innerclass.field.AccessPrivateField"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebSecurity | |
public class ChannelSecurityConfig extends WebSecurityConfigurerAdapter { | |
@Override | |
protected void configure(HttpSecurity http) throws Exception { | |
http.requiresChannel().anyRequest().requiresSecure(); | |
http.headers().httpStrictTransportSecurity(); | |
// ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebSecurity | |
public class SecurityConfig extends WebSecurityConfigurerAdapter { | |
@Override | |
protected void configure(HttpSecurity http) throws Exception { | |
http.sessionManagement() | |
.sessionCreationPolicy(SessionCreationPolicy.STATELESS); | |
// ... | |
} |