是否可以使用SSL连接到站点,其中客户端只有根证书,但服务器同时具有根证书和中间证书?
我试图使用HttpUrlConnection与包含我的根的TrustManager连接,我得到通常的握手错误:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException:
Certificate chaining error
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
Run Code Online (Sandbox Code Playgroud)
我知道一般的解决方案是安装中间证书,但我想避免不断获得供应商X的新中间证书.
我熟悉使用接受所有内容的TrustManager,但这不是一个选项.
我正在尝试使用 Oracle 的“按选择创建表”功能进行快速更新。我看到的问题是“空”字段没有被保留。
我定义了下表:
create table mytable(
accountname varchar2(40) not null,
username varchar2(40)
);
Run Code Online (Sandbox Code Playgroud)
当我执行原始 CTAS 时,帐户上的 NOT NULL 被保留:
create table ctamytable as select * from mytable;
describe ctamytable;
Name Null Type
----------- -------- ------------
ACCOUNTNAME NOT NULL VARCHAR2(40)
USERNAME VARCHAR2(40)
Run Code Online (Sandbox Code Playgroud)
但是,当我对帐户名进行替换时,不会保留 NOT NULL。
create table ctamytable as
select replace(accountname, 'foo', 'foo2') accountname,
username
from mytable;
describe ctamytable;
Name Null Type
----------- ---- -------------
ACCOUNTNAME VARCHAR2(160)
USERNAME VARCHAR2(40)
Run Code Online (Sandbox Code Playgroud)
请注意,该accountname
字段不再有空值,并且该varchar2
字段从 40 个字符变为 160 个字符。有没有人见过这个?