anchor.diff:  	#alert{} = Alert ->
   	    Alert;
   	_ ->
  -	    ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER)
  +	    throw(?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER))
       end.
   
   psk_secret(PSKIdentity, PSKLookup, PremasterSecret) ->
  
positive.code: %%     end.
  
  premaster_secret(OtherPublicDhKey, MyPrivateKey, #'DHParameter'{} = Params) ->
      public_key:compute_key(OtherPublicDhKey, MyPrivateKey, Params);
  
  premaster_secret(PublicDhKey, PrivateDhKey, #server_dh_params{dh_p = Prime, dh_g = Base}) ->
      crypto:compute_key(dh, PublicDhKey, PrivateDhKey, [Prime, Base]);
  premaster_secret(#client_srp_public{srp_a = ClientPublicKey}, ServerKey, #srp_user{prime = Prime,
  										   verifier = Verifier}) ->
      case crypto:compute_key(srp, ClientPublicKey, ServerKey, {host, [Verifier, Prime, '6a']}) of
  	error ->
  	    ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER);
  	PremasterSecret ->
  	    PremasterSecret
      end;
  
  premaster_secret(#server_srp_params{srp_n = Prime, srp_g = Generator, srp_s = Salt, srp_b = Public},
  		 ClientKeys, {Username, Password}) ->
      case ssl_srp_primes:check_srp_params(Generator, Prime) of
  
negative.code: 		    LookupFun) ->
      PremasterSecret = premaster_secret(PublicDhKey, PrivateDhKey, Params),
      psk_secret(IdentityHint, LookupFun, PremasterSecret);
  premaster_secret({rsa_psk, PSKIdentity}, PSKLookup, RSAPremasterSecret) ->
      psk_secret(PSKIdentity, PSKLookup, RSAPremasterSecret).
  
  