Overview
Comment: | Added get digest info command to return properties of a digest |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | crypto |
Files: | files | file ages | folders |
SHA3-256: |
e47bd35656a2b193910b4d3998585a32 |
User & Date: | bohagan on 2023-11-18 18:55:03 |
Other Links: | branch diff | manifest | tags |
Context
2023-11-19
| ||
02:55 | Added get cipher info command to return properties of a cipher check-in: 35832d0765 user: bohagan tags: crypto | |
2023-11-18
| ||
18:55 | Added get digest info command to return properties of a digest check-in: e47bd35656 user: bohagan tags: crypto | |
06:58 | Updated documentation for digest, cmac, and hmac command changes. check-in: 220a9947b7 user: bohagan tags: crypto | |
Changes
Modified doc/tls.html
from [939cd85094]
to [268ee1f2cf].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + | <dd><b>tls::handshake</b> <em> channel</em></dd> <dd><b>tls::status </b> <em>?-local? channel</em></dd> <dd><b>tls::connection </b> <em>channel</em></dd> <dd><b>tls::import</b> <em>channel ?options?</em></dd> <dd><b>tls::unimport</b> <em>channel</em></dd> <dt> </dt> <dd><b>tls::ciphers</b> <em>?protocol? ?verbose? ?supported?</em></dd> |
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + | <a href="#tls::status"><b>tls::status</b> <i>?-local? channel</i></a><br> <a href="#tls::connection"><b>tls::connection</b> <i>channel</i></a><br> <a href="#tls::handshake"><b>tls::handshake</b> <i>channel</i></a><br> <a href="#tls::import"><b>tls::import</b> <i>channel ?options?</i></a><br> <a href="#tls::unimport"><b>tls::unimport</b> <i>channel</i></a><br> <br> <a href="#tls::ciphers"><b>tls::ciphers</b> <i>?protocol? ?verbose? ?supported?</i></a><br> |
︙ | |||
442 443 444 445 446 447 448 | 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | - - + + + + + | only the ciphers supported for that protocol are returned. See <b>tls::protocols</b> command for the supported protocols. If <em>verbose</em> is specified as true then a verbose, human readable list is returned with additional information on the cipher. If <em>supported</em> is specified as true, then only the ciphers supported for protocol will be listed.</dd> |
︙ |
Modified generic/tlsInfo.c
from [bed510f6e3]
to [f456ff7952].
︙ | |||
247 248 249 250 251 252 253 254 255 256 257 258 259 260 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | return TCL_OK; clientData = clientData; } /* *------------------------------------------------------------------- * * DigestInfo -- * * Return a list of properties and values for digestName. * * Results: * A standard Tcl list. * * Side effects: * None. * *------------------------------------------------------------------- */ int DigestInfo(Tcl_Interp *interp, char *digestName) { Tcl_Obj *objPtr, *listPtr; EVP_MD *md = EVP_get_digestbyname(digestName); unsigned long flags; if (md == NULL) { Tcl_AppendResult(interp, "Invalid digest \"", digestName, "\"", NULL); return TCL_ERROR; } /* Get properties */ objPtr = Tcl_NewListObj(0, NULL); LAPPEND_STR(interp, objPtr, "name", EVP_MD_name(md), -1); LAPPEND_STR(interp, objPtr, "description", "", -1); LAPPEND_INT(interp, objPtr, "size", EVP_MD_size(md)); LAPPEND_INT(interp, objPtr, "block_size", EVP_MD_block_size(md)); LAPPEND_STR(interp, objPtr, "provider", "", -1); LAPPEND_STR(interp, objPtr, "type", OBJ_nid2ln(EVP_MD_type(md)), -1); LAPPEND_STR(interp, objPtr, "pkey_type", OBJ_nid2ln(EVP_MD_pkey_type(md)), -1); flags = EVP_MD_flags(md); /* Flags */ listPtr = Tcl_NewListObj(0, NULL); LAPPEND_BOOL(interp, listPtr, "One-shot", flags & EVP_MD_FLAG_ONESHOT); LAPPEND_BOOL(interp, listPtr, "XOF", flags & EVP_MD_FLAG_XOF); LAPPEND_BOOL(interp, listPtr, "DigestAlgorithmId_NULL", flags & EVP_MD_FLAG_DIGALGID_NULL); LAPPEND_BOOL(interp, listPtr, "DigestAlgorithmId_Abscent", flags & EVP_MD_FLAG_DIGALGID_ABSENT); LAPPEND_BOOL(interp, listPtr, "DigestAlgorithmId_Custom", flags & EVP_MD_FLAG_DIGALGID_CUSTOM); LAPPEND_BOOL(interp, listPtr, "FIPS", flags & EVP_MD_FLAG_FIPS); LAPPEND_OBJ(interp, objPtr, "flags", listPtr); Tcl_SetObjResult(interp, objPtr); return TCL_OK; } /* *------------------------------------------------------------------- * * DigestsObjCmd -- * * Return a list of all valid hash algorithms or message digests. * * Results: * A standard Tcl list. * |
︙ | |||
269 270 271 272 273 274 275 | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | - - + + + + + | dprintf("Called"); #if OPENSSL_VERSION_NUMBER < 0x10100000L OpenSSL_add_all_digests(); /* Make sure they're loaded */ #endif /* Validate arg count */ |
︙ |