Changes On Branch rkeene-peercertificate

Changes In Branch rkeene-peercertificate Excluding Merge-Ins

This is equivalent to a diff from 2aadaa4c28 to 0c7fd93cac

2016-11-22
21:43
Merged in several outstanding patches check-in: 6aedc8c1b5 user: rkeene tags: trunk
17:58
Create new branch named "rkeene-unthreaded" check-in: d5802f3587 user: rkeene tags: rkeene-unthreaded
17:58
Create new branch named "rkeene-fixcrosscompile" check-in: 4c0d71df82 user: rkeene tags: rkeene-fixcrosscompile
17:58
Applied patch Closed-Leaf check-in: 0c7fd93cac user: rkeene tags: rkeene-peercertificate
17:58
Create new branch named "rkeene-peercertificate" check-in: 583f2d9de9 user: rkeene tags: rkeene-peercertificate
17:58
Create new branch named "rkeene-fixmemleak-bugid3041925" Closed-Leaf check-in: a0f200572d user: rkeene tags: rkeene-fixmemleak-bugid3041925
17:57
Create new branch named "rkeene-eoffix" check-in: ff2f52648e user: rkeene tags: rkeene-eoffix
2015-07-07
17:16
Updated with dhparam.2.patch for tls ticket #59. check-in: 2aadaa4c28 user: andreas_kupries tags: trunk
2015-06-08
20:53
Regenerated configure for 1.6.6. check-in: f7a76c9416 user: andreas_kupries tags: trunk

Modified tlsX509.c from [3f68dadacd] to [24e0063023].
96
97
98
99
100
101
102

103
104
105
106
107
108

109
110
111
112
113
114
115
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117







+






+







    int n;
    unsigned long flags;
    char subject[BUFSIZ];
    char issuer[BUFSIZ];
    char serial[BUFSIZ];
    char notBefore[BUFSIZ];
    char notAfter[BUFSIZ];
    char certStr[BUFSIZ];
#ifndef NO_SSL_SHA
    int shai;
    char sha_hash[SHA_DIGEST_LENGTH*2];
    const char *shachars="0123456789ABCDEF";
#endif

    certStr[0] = 0;
    if ((bio = BIO_new(BIO_s_mem())) == NULL) {
	subject[0] = 0;
	issuer[0]  = 0;
	serial[0]  = 0;
    } else {
	flags = XN_FLAG_RFC2253 | ASN1_STRFLGS_UTF8_CONVERT;
	flags &= ~ASN1_STRFLGS_ESC_MSB;
127
128
129
130
131
132
133







134
135
136
137
138
139
140
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149







+
+
+
+
+
+
+







	BIO_flush(bio);

	i2a_ASN1_INTEGER(bio, X509_get_serialNumber(cert));
	n = BIO_read(bio, serial, min(BIO_pending(bio), BUFSIZ - 1));
	n = max(n, 0);
	serial[n] = 0;
	BIO_flush(bio);

        if (PEM_write_bio_X509(bio, cert)) {
            n = BIO_read(bio, certStr, min(BIO_pending(bio), BUFSIZ - 1));
            n = max(n, 0);
            certStr[n] = 0;
            BIO_flush(bio);
        }

	BIO_free(bio);
    }

    strcpy( notBefore, ASN1_UTCTIME_tostr( X509_get_notBefore(cert) ));
    strcpy( notAfter, ASN1_UTCTIME_tostr( X509_get_notAfter(cert) ));

170
171
172
173
174
175
176





177
178
179
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193







+
+
+
+
+



    Tcl_ListObjAppendElement( interp, certPtr,
	    Tcl_NewStringObj( notAfter, -1) );

    Tcl_ListObjAppendElement( interp, certPtr,
	    Tcl_NewStringObj( "serial", -1) );
    Tcl_ListObjAppendElement( interp, certPtr,
	    Tcl_NewStringObj( serial, -1) );

    Tcl_ListObjAppendElement( interp, certPtr,
	    Tcl_NewStringObj( "certificate", -1) );
    Tcl_ListObjAppendElement( interp, certPtr,
	    Tcl_NewStringObj( certStr, -1) );

    return certPtr;
}