206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
}
#else
tag_len = EVP_CIPHER_CTX_get_tag_length(ctx);
#endif
EVP_CIPHER_CTX_free(ctx);
LAPPEND_INT(interp, resultObj, "tag_length", tag_len);
}
/* AEAD properties */
{
int aad_len = 0;
if (flags & EVP_CIPH_FLAG_AEAD_CIPHER) {
aad_len = EVP_AEAD_TLS1_AAD_LEN;
}
LAPPEND_INT(interp, resultObj, "aad_length", aad_len);
|
|
|
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
}
#else
tag_len = EVP_CIPHER_CTX_get_tag_length(ctx);
#endif
EVP_CIPHER_CTX_free(ctx);
LAPPEND_INT(interp, resultObj, "tag_length", tag_len);
}
/* AEAD properties */
{
int aad_len = 0;
if (flags & EVP_CIPH_FLAG_AEAD_CIPHER) {
aad_len = EVP_AEAD_TLS1_AAD_LEN;
}
LAPPEND_INT(interp, resultObj, "aad_length", aad_len);
|
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
|
for (int i = 0; i < sk_SSL_CIPHER_num(sk); i++) {
const SSL_CIPHER *c = sk_SSL_CIPHER_value(sk, i);
if (c == NULL) continue;
/* cipher name or (NONE) */
cp = SSL_CIPHER_get_name(c);
if (cp == NULL) break;
Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj((char *) cp, -1));
}
} else {
char buf[BUFSIZ];
resultObj = Tcl_NewStringObj("", 0);
if (resultObj == NULL) {
res = TCL_ERROR;
|
|
|
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
|
for (int i = 0; i < sk_SSL_CIPHER_num(sk); i++) {
const SSL_CIPHER *c = sk_SSL_CIPHER_value(sk, i);
if (c == NULL) continue;
/* cipher name or (NONE) */
cp = SSL_CIPHER_get_name(c);
if (cp == NULL) break;
Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj(cp, -1));
}
} else {
char buf[BUFSIZ];
resultObj = Tcl_NewStringObj("", 0);
if (resultObj == NULL) {
res = TCL_ERROR;
|