制作复杂的Android XML Drawables(Making Complex Android XML Drawables)
基于android XML的drawables有多强大?
我真的想知道是否有可能只使用xml形状替换半复杂的位图资产,例如以下箭头图标。
到目前为止,除了基本形状之外,我还没有看到很多很好的例子。 我知道
<layer-list>
可以用来组合形状,但我在使用它们时遇到了困难。 特别是,具有<layer-list>
的形状的相对尺寸和偏移似乎不能很好地工作。How powerful are android XML based drawables?
I'm really wondering if it is possible to replace semi-complex bitmap assets, such as the following arrow icons, using only xml shapes.
So far I haven't seen many good example of anything other than basic shapes. I know
<layer-list>
can be used to combine shapes, but I've had a difficult time working with them. Particularly, relative sizing and offsets of shapes with<layer-list>
does not seem to work well.
原文:https://stackoverflow.com/questions/25431365
最满意答案
要获得DH密码(DHE-RSA -...)的支持,您需要有一个DH params文件并指定它:
context.load_tmp_dh("dhparams.pem")
要创建此类文件,您可以使用OpenSSL
openssl dhparam -out dhparams.pem 2048
要支持ECDH密码,您需要指定应使用哪条曲线。 我没有支持它的pyOpenSSL版本,但根据它应该是文档
context.set_tmp_ecdh( OpenSSL.crypto.get_elliptic_curve( "prime256v1" ))
To have support for DH ciphers (DHE-RSA-...) you need to have a DH params file and specify it:
context.load_tmp_dh("dhparams.pem")
To create such file you might use OpenSSL
openssl dhparam -out dhparams.pem 2048
To support ECDH ciphers you need to specify which curve should be used. I don't have a pyOpenSSL version which supports it but according to the documentation it should be
context.set_tmp_ecdh( OpenSSL.crypto.get_elliptic_curve( "prime256v1" ))
相关问答
更多-
Python使用TLSv1.2和Forward Secrecy粘贴SSL服务器(Python Paste SSL server with TLSv1.2 and Forward Secrecy)[2023-03-03]
要获得DH密码(DHE-RSA -...)的支持,您需要有一个DH params文件并指定它: context.load_tmp_dh("dhparams.pem") 要创建此类文件,您可以使用OpenSSL openssl dhparam -out dhparams.pem 2048 要支持ECDH密码,您需要指定应使用哪条曲线。 我没有支持它的pyOpenSSL版本,但根据它应该是文档 context.set_tmp_ecdh( OpenSSL.crypto.get_elliptic_curve ... -
TLSv1.2与Java 7和Wildlfy 8 - handshake_failure(TLSv1.2 with Java 7 and Wildlfy 8 - handshake_failure)[2023-10-29]
Java 7仅支持TLSv1而不支持TLSv1.2。 除了众所周知的扫描工具,SSL Labs还有一个很好的“用户代理Cabailities”部分: https ://www.ssllabs.com/ssltest/clients.html 以下是Java 7的详细信息https://www.ssllabs.com/ssltest/viewClient.html?name=Java&version=7u25 这也应该出现在Java 7无法连接的站点扫描报告下。 I solved my problem alr ... -
尝试将此开关添加到/runtime/bin/jvm.config文件中的Java args(此文件的位置可能因CF安装的类型而异)。 -Djavax.net.debug=all 然后检查输出日志(标准安装的运行时/日志中的cfusion-out.log),以获取有关每次握手(传出)的信息。 您可能会在那里看到一些线索,并能够确定来自服务器的SSL连接达到了哪种协议/级别的TLS。 这个关于诊断TLS的链接也有一些有用的花絮 - 尽管你必须弄清楚它们如何转化为ColdFusion。 请注意,CPL for ...
-
使用perl 5.8.8和OpenSSL 1.0.1连接到TLSv1.2(Using perl 5.8.8 with OpenSSL 1.0.1 to connect with TLSv1.2)[2021-12-26]
...使用CPAN更新/安装perl模块。 而不是我得到perl模块的rpm和安装。 我不知道你安装了哪个rpm。 但是你需要一个Net :: SSLeay(或Crypt :: SSLeay - 无论你使用了什么)的模块,它与新版本的OpenSSL链接。 仅仅安装默认的RPM将无济于事,因为它与旧的OpenSSL版本相关联。 这意味着您需要手动安装模块,并且注意将其与新的OpenSSL库链接。 对于Net :: SSLeay,这意味着将正确的OPENSSL_PREFIX设置为新版本的OpenSSL,如Net ... -
什么是RECV TLSv1 ALERT:致命,handshake_failure? 这意味着我们收到了来自服务器的警报(在Java SSL / TLS代码中,JSSE),其严重程度为致命,并输入handshake_failure。 由于它在发送一个握手消息后立即发生,如果您没有忽略您发布的日志摘录中的其他相关信息,我们可能会收到此警报以响应ClientHello消息,这是发送的第一个握手消息。 这里的'TLSv1'可能会引起误解。 它是SSLSocketImpl对象中的一个变量,它初始化为TLSv1,并且在 ...
-
如何在使用TLSv1.2的Apache HttpClient中忽略“localhost”?(How to ignore “localhost” in Apache HttpClient using TLSv1.2?)[2022-04-06]
使用本地主机证书,以下构造设法与TLSv1.2连接: // solution for localhost certificates and TLSv1.2 // copied from: http://stackoverflow.com/questions/34655031/javax-net-ssl-sslpeerunverifiedexception-host-name-does-not-match-the-certifica/34657512 // thanks final S ... -
即使我指定TLSv1.1,Python也会使用TLSv1.2请求模块(Python requests module using TLSv1.2 even though I am specifying TLSv1.1)[2024-05-01]
解决方案是使用s.get(带有挂载的HTTPAdapter的Session)而不是requests.get。 The solution is to use s.get (the Session with the mounted HTTPAdapter) instead of requests.get. -
我遇到了同样的问题,因为我是在使用Apache HTTP Client库发出请求,所以我用这种方式初始化了我的HttpClient CloseableHttpClient client = HttpClients.custom() .setSSLSocketFactory(getSSLContext()) .build(); 其中getSSLContext()方法就是这样 p ...
-
发现Chromium和Firefox都不支持这些更高的密码。 可用的最强/最高密码是TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 不支持SHA384且不支持AES_256_GCM https://www.ssllabs.com/ssltest/viewMyClient.html 密码套房(按优先顺序排列) TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256(0xc02b) TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ...
-
NoSuchAlgorithmException:TLSv1.2未知协议(NoSuchAlgorithmException : TLSv1.2 unknown protocol)[2022-06-07]
您必须使用不支持TLS 1.2的某些古老版本的Java。 升级。 You must be using some ancient version of Java that doesn't support TLS 1.2. Upgrade.