|
32 | 32 | import org.jruby.RubyModule;
|
33 | 33 |
|
34 | 34 | /**
|
| 35 | + * OpenSSL::Config (native parts) |
35 | 36 | * @author <a href="mailto:[email protected]">Ola Bini</a>
|
36 | 37 | */
|
37 | 38 | public class Config {
|
38 | 39 | // TODO: we cannot detect OS's default config file. ignore?
|
39 |
| - public static final String DEFAULT_CONFIG_FILE = "./openssl.cnf"; |
| 40 | + // public static final String DEFAULT_CONFIG_FILE = "./openssl.cnf"; |
40 | 41 |
|
41 |
| - public static void createConfig(Ruby runtime, RubyModule mOSSL) { |
42 |
| - RubyClass cConfig = mOSSL.defineClassUnder("Config", runtime.getObject(), runtime.getObject().getAllocator()); |
43 |
| - cConfig.defineAnnotatedMethods(Config.class); |
44 |
| - RubyClass openSSLError = mOSSL.getClass("OpenSSLError"); |
45 |
| - mOSSL.defineClassUnder("ConfigError", openSSLError, openSSLError.getAllocator()); |
| 42 | + public static void createConfig(Ruby runtime, RubyModule OpenSSL) { |
| 43 | + RubyClass Config = OpenSSL.defineClassUnder("Config", runtime.getObject(), runtime.getObject().getAllocator()); |
| 44 | + Config.defineAnnotatedMethods(Config.class); |
| 45 | + RubyClass openSSLError = OpenSSL.getClass("OpenSSLError"); |
| 46 | + OpenSSL.defineClassUnder("ConfigError", openSSLError, openSSLError.getAllocator()); |
46 | 47 | // TODO: we should define this constant with proper path. (see above)
|
47 |
| - //cConfig.setConstant("DEFAULT_CONFIG_FILE", runtime.newString(DEFAULT_CONFIG_FILE)); |
| 48 | + Config.setConstant("DEFAULT_CONFIG_FILE", runtime.getNil()); // runtime.newString(DEFAULT_CONFIG_FILE) |
48 | 49 | }
|
49 |
| -}// Config |
| 50 | + |
| 51 | +} |
0 commit comments