Home | History | Annotate | Line # | Download | only in ssl-tests
      1 # -*- mode: perl; -*-
      2 # Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
      3 #
      4 # Licensed under the Apache License 2.0 (the "License").  You may not use
      5 # this file except in compliance with the License.  You can obtain a copy
      6 # in the file LICENSE in the source distribution or at
      7 # https://www.openssl.org/source/license.html
      8 
      9 use strict;
     10 use warnings;
     11 
     12 package ssltests;
     13 
     14 # SRP is only supported up to TLSv1.2
     15 
     16 our @tests = (
     17     {
     18         name => "srp",
     19         server => {
     20             "CipherString" => "SRP",
     21             "MaxProtocol" => "TLSv1.2",
     22             extra => {
     23                 "SRPUser" => "user",
     24                 "SRPPassword" => "password",
     25             },
     26         },
     27         client => {
     28             "CipherString" => "SRP",
     29             "MaxProtocol" => "TLSv1.2",
     30             extra => {
     31                 "SRPUser" => "user",
     32                 "SRPPassword" => "password",
     33             },
     34         },
     35         test => {
     36             "ExpectedResult" => "Success"
     37         },
     38     },
     39     {
     40         name => "srp-bad-password",
     41         server => {
     42             "CipherString" => "SRP",
     43             "MaxProtocol" => "TLSv1.2",
     44             extra => {
     45                 "SRPUser" => "user",
     46                 "SRPPassword" => "password",
     47             },
     48         },
     49         client => {
     50             "CipherString" => "SRP",
     51             "MaxProtocol" => "TLSv1.2",
     52             extra => {
     53                 "SRPUser" => "user",
     54                 "SRPPassword" => "passw0rd",
     55             },
     56         },
     57         test => {
     58             # Server fails first with bad client Finished.
     59             "ExpectedResult" => "ServerFail"
     60         },
     61     },
     62     {
     63         name => "srp-auth",
     64         server => {
     65             "CipherString" => "aSRP",
     66             "MaxProtocol" => "TLSv1.2",
     67             extra => {
     68                 "SRPUser" => "user",
     69                 "SRPPassword" => "password",
     70             },
     71         },
     72         client => {
     73             "CipherString" => "aSRP",
     74             "MaxProtocol" => "TLSv1.2",
     75             extra => {
     76                 "SRPUser" => "user",
     77                 "SRPPassword" => "password",
     78             },
     79         },
     80         test => {
     81             "ExpectedResult" => "Success"
     82         },
     83     },
     84     {
     85         name => "srp-auth-bad-password",
     86         server => {
     87             "CipherString" => "aSRP",
     88             "MaxProtocol" => "TLSv1.2",
     89             extra => {
     90                 "SRPUser" => "user",
     91                 "SRPPassword" => "password",
     92             },
     93         },
     94         client => {
     95             "CipherString" => "aSRP",
     96             "MaxProtocol" => "TLSv1.2",
     97             extra => {
     98                 "SRPUser" => "user",
     99                 "SRPPassword" => "passw0rd",
    100             },
    101         },
    102         test => {
    103             # Server fails first with bad client Finished.
    104             "ExpectedResult" => "ServerFail"
    105         },
    106     },
    107 );
    108