equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
26 package sun.security.pkcs11; |
26 package sun.security.pkcs11; |
27 |
27 |
28 import java.io.*; |
28 import java.io.*; |
29 import static java.io.StreamTokenizer.*; |
29 import static java.io.StreamTokenizer.*; |
30 import java.math.BigInteger; |
30 import java.math.BigInteger; |
|
31 import java.nio.charset.StandardCharsets; |
31 import java.util.*; |
32 import java.util.*; |
32 |
33 |
33 import java.security.*; |
34 import java.security.*; |
34 |
35 |
35 import sun.security.util.PropertyExpander; |
36 import sun.security.util.PropertyExpander; |
200 // inline config |
201 // inline config |
201 String config = filename.substring(2).replace("\\n", "\n"); |
202 String config = filename.substring(2).replace("\\n", "\n"); |
202 reader = new StringReader(config); |
203 reader = new StringReader(config); |
203 } else { |
204 } else { |
204 reader = new BufferedReader(new InputStreamReader |
205 reader = new BufferedReader(new InputStreamReader |
205 (new FileInputStream(expand(filename)))); |
206 (new FileInputStream(expand(filename)), |
|
207 StandardCharsets.ISO_8859_1)); |
206 } |
208 } |
207 parsedKeywords = new HashSet<String>(); |
209 parsedKeywords = new HashSet<String>(); |
208 st = new StreamTokenizer(reader); |
210 st = new StreamTokenizer(reader); |
209 setupTokenizer(); |
211 setupTokenizer(); |
210 parse(); |
212 parse(); |