< prev index next >

src/java.base/share/classes/sun/security/ssl/DHServerKeyExchange.java

Print this page




  31 import java.security.CryptoPrimitive;
  32 import java.security.GeneralSecurityException;
  33 import java.security.InvalidAlgorithmParameterException;
  34 import java.security.InvalidKeyException;
  35 import java.security.Key;
  36 import java.security.KeyFactory;
  37 import java.security.NoSuchAlgorithmException;
  38 import java.security.PrivateKey;
  39 import java.security.PublicKey;
  40 import java.security.Signature;
  41 import java.security.SignatureException;
  42 import java.text.MessageFormat;
  43 import java.util.EnumSet;
  44 import java.util.Locale;
  45 import javax.crypto.interfaces.DHPublicKey;
  46 import javax.crypto.spec.DHParameterSpec;
  47 import javax.crypto.spec.DHPublicKeySpec;
  48 import sun.security.ssl.DHKeyExchange.DHECredentials;
  49 import sun.security.ssl.DHKeyExchange.DHEPossession;
  50 import sun.security.ssl.SSLHandshake.HandshakeMessage;

  51 import sun.security.ssl.X509Authentication.X509Credentials;
  52 import sun.security.ssl.X509Authentication.X509Possession;
  53 import sun.security.util.HexDumpEncoder;
  54 import sun.security.util.KeyUtil;
  55 
  56 /**
  57  * Pack of the ServerKeyExchange handshake message.
  58  */
  59 final class DHServerKeyExchange {
  60     static final SSLConsumer dhHandshakeConsumer =
  61             new DHServerKeyExchangeConsumer();
  62     static final HandshakeProducer dhHandshakeProducer =
  63             new DHServerKeyExchangeProducer();
  64 
  65     /**
  66      * The DiffieHellman ServerKeyExchange handshake message.
  67      */
  68     private static final
  69             class DHServerKeyExchangeMessage extends HandshakeMessage {
  70         // public key encapsulated in this message




  31 import java.security.CryptoPrimitive;
  32 import java.security.GeneralSecurityException;
  33 import java.security.InvalidAlgorithmParameterException;
  34 import java.security.InvalidKeyException;
  35 import java.security.Key;
  36 import java.security.KeyFactory;
  37 import java.security.NoSuchAlgorithmException;
  38 import java.security.PrivateKey;
  39 import java.security.PublicKey;
  40 import java.security.Signature;
  41 import java.security.SignatureException;
  42 import java.text.MessageFormat;
  43 import java.util.EnumSet;
  44 import java.util.Locale;
  45 import javax.crypto.interfaces.DHPublicKey;
  46 import javax.crypto.spec.DHParameterSpec;
  47 import javax.crypto.spec.DHPublicKeySpec;
  48 import sun.security.ssl.DHKeyExchange.DHECredentials;
  49 import sun.security.ssl.DHKeyExchange.DHEPossession;
  50 import sun.security.ssl.SSLHandshake.HandshakeMessage;
  51 import sun.security.ssl.SupportedGroupsExtension.NamedGroup;
  52 import sun.security.ssl.X509Authentication.X509Credentials;
  53 import sun.security.ssl.X509Authentication.X509Possession;
  54 import sun.security.util.HexDumpEncoder;
  55 import sun.security.util.KeyUtil;
  56 
  57 /**
  58  * Pack of the ServerKeyExchange handshake message.
  59  */
  60 final class DHServerKeyExchange {
  61     static final SSLConsumer dhHandshakeConsumer =
  62             new DHServerKeyExchangeConsumer();
  63     static final HandshakeProducer dhHandshakeProducer =
  64             new DHServerKeyExchangeProducer();
  65 
  66     /**
  67      * The DiffieHellman ServerKeyExchange handshake message.
  68      */
  69     private static final
  70             class DHServerKeyExchangeMessage extends HandshakeMessage {
  71         // public key encapsulated in this message


< prev index next >