Diff

Differences From Artifact [4877e33878]:

To Artifact [23d48db6e4]:


1872
1873
1874
1875
1876
1877
1878
1879
1880


1881
1882

1883
1884
1885
1886
1887
1888


1889
1890

1891
1892
1893
1894
1895
1896
1897
1872
1873
1874
1875
1876
1877
1878


1879
1880
1881

1882
1883
1884
1885
1886


1887
1888
1889

1890
1891
1892
1893
1894
1895
1896
1897







-
-
+
+

-
+




-
-
+
+

-
+







    for (i = 0; i < lenof(hostkey_algs); i++) {
        ssh2_pkt_addstring_str(hostkey_algs[i]->name);
        if (i < lenof(hostkey_algs)-1)
            ssh2_pkt_addstring_str(",");
    }
    /* List client->server encryption algorithms. */
    ssh2_pkt_addstring_start();
    for (i = -1; i < lenof(ciphers); i++) {
        const struct ssh_cipher *c = i<0 ? preferred_cipher : ciphers[i];
    for (i = 0; i < lenof(ciphers)+1; i++) {
        const struct ssh_cipher *c = i==0 ? preferred_cipher : ciphers[i-1];
        ssh2_pkt_addstring_str(c->name);
        if (i < lenof(ciphers)-1)
        if (i < lenof(ciphers))
            ssh2_pkt_addstring_str(",");
    }
    /* List server->client encryption algorithms. */
    ssh2_pkt_addstring_start();
    for (i = -1; i < lenof(ciphers); i++) {
        const struct ssh_cipher *c = i<0 ? preferred_cipher : ciphers[i];
    for (i = 0; i < lenof(ciphers)+1; i++) {
        const struct ssh_cipher *c = i==0 ? preferred_cipher : ciphers[i-1];
        ssh2_pkt_addstring_str(c->name);
        if (i < lenof(ciphers)-1)
        if (i < lenof(ciphers))
            ssh2_pkt_addstring_str(",");
    }
    /* List client->server MAC algorithms. */
    ssh2_pkt_addstring_start();
    for (i = 0; i < lenof(macs); i++) {
        ssh2_pkt_addstring_str(macs[i]->name);
        if (i < lenof(macs)-1)
1954
1955
1956
1957
1958
1959
1960
1961
1962


1963
1964

1965
1966
1967
1968
1969
1970


1971
1972

1973
1974
1975
1976
1977
1978
1979
1954
1955
1956
1957
1958
1959
1960


1961
1962
1963

1964
1965
1966
1967
1968


1969
1970
1971

1972
1973
1974
1975
1976
1977
1978
1979







-
-
+
+

-
+




-
-
+
+

-
+







    for (i = 0; i < lenof(hostkey_algs); i++) {
        if (in_commasep_string(hostkey_algs[i]->name, str, len)) {
            hostkey = hostkey_algs[i];
            break;
        }
    }
    ssh2_pkt_getstring(&str, &len);    /* client->server cipher */
    for (i = -1; i < lenof(ciphers); i++) {
        const struct ssh_cipher *c = i<0 ? preferred_cipher : ciphers[i];
    for (i = 0; i < lenof(ciphers)+1; i++) {
        const struct ssh_cipher *c = i==0 ? preferred_cipher : ciphers[i-1];
        if (in_commasep_string(c->name, str, len)) {
            cscipher_tobe = ciphers[i];
            cscipher_tobe = c;
            break;
        }
    }
    ssh2_pkt_getstring(&str, &len);    /* server->client cipher */
    for (i = -1; i < lenof(ciphers); i++) {
        const struct ssh_cipher *c = i<0 ? preferred_cipher : ciphers[i];
    for (i = 0; i < lenof(ciphers)+1; i++) {
        const struct ssh_cipher *c = i==0 ? preferred_cipher : ciphers[i-1];
        if (in_commasep_string(c->name, str, len)) {
            sccipher_tobe = ciphers[i];
            sccipher_tobe = c;
            break;
        }
    }
    ssh2_pkt_getstring(&str, &len);    /* client->server mac */
    for (i = 0; i < lenof(macs); i++) {
        if (in_commasep_string(macs[i]->name, str, len)) {
            csmac_tobe = macs[i];