简体   繁体   English

Java的SSLSocket安全吗?

[英]Is Java's SSLSocket Secure?

I Need to create a Secure socket Communication in java. 我需要在Java中创建安全套接字通信。 Can i just use the sslsocket class or is there any other thing that i have to Take care of? 我可以只使用sslsocket类,还是有其他需要照顾的事情?

Does the sslsocket do everything of the encryption? sslsocket会进行所有加密吗?

public abstract class SSLSocket extends Socket 公共抽象类SSLSocket扩展了Socket

This class extends Sockets and provides secure socket using protocols such as the "Secure Sockets Layer" (SSL) or IETF "Transport Layer Security" (TLS) protocols. 此类扩展了套接字,并使用诸如“安全套接字层”(SSL)或IETF“传输层安全性”(TLS)协议之类的协议提供了安全套接字。 Such sockets are normal stream sockets, but they add a layer of security protections over the underlying network transport protocol, such as TCP. 这样的套接字是普通的流套接字,但是它们在基础网络传输协议(例如TCP)上增加了一层安全保护。 Those protections include: • Integrity Protection. 这些保护包括:•完整性保护。 SSL protects against modification of messages by an active wiretapper. SSL可以防止活动的窃听者对消息进行修改。 • Authentication. •身份验证。 In most modes, SSL provides peer authentication. 在大多数模式下,SSL提供对等身份验证。 Servers are usually authenticated, and clients may be authenticated as requested by servers. 通常对服务器进行身份验证,并且可以根据服务器的请求对客户端进行身份验证。 • Confidentiality (Privacy Protection). •机密性(隐私保护)。 In most modes, SSL encrypts data being sent between client and server. 在大多数模式下,SSL会加密在客户端和服务器之间发送的数据。 This protects the confidentiality of data, so that passive wiretappers won't see sensitive data such as financial information or personal information of many kinds. 这样可以保护数据的机密性,从而使被动窃听者不会看到敏感数据,例如财务信息或多种个人信息。

These kinds of protection are specified by a "cipher suite", which is a combination of cryptographic algorithms used by a given SSL connection. 这些保护由“密码套件”指定,该密码套件是给定SSL连接使用的密码算法的组合。 During the negotiation process, the two endpoints must agree on a ciphersuite that is available in both environments. 在协商过程中,两个端点必须就两种环境中可用的密码套件达成一致。 If there is no such suite in common, no SSL connection can be established, and no data can be exchanged. 如果没有这样的通用套件,则无法建立SSL连接,也无法交换数据。

http://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLSocket.html http://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLSocket.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM