33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
* None
*
*-----------------------------------------------------------------------------
*/
Tcl_Obj *String_to_Hex(unsigned char* input, int ilen) {
unsigned char *iptr = input;
Tcl_Obj *resultObj = Tcl_NewByteArrayObj(NULL, 0);
unsigned char *data = Tcl_SetByteArrayLength(resultObj, ilen*2);
unsigned char *dptr = &data[0];
const char *hex = "0123456789abcdef";
if (resultObj == NULL) {
return NULL;
}
|
|
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
* None
*
*-----------------------------------------------------------------------------
*/
Tcl_Obj *String_to_Hex(unsigned char* input, int ilen) {
unsigned char *iptr = input;
Tcl_Obj *resultObj = Tcl_NewByteArrayObj(NULL, 0);
unsigned char *data = Tcl_SetByteArrayLength(resultObj, (Tcl_Size)ilen*2);
unsigned char *dptr = &data[0];
const char *hex = "0123456789abcdef";
if (resultObj == NULL) {
return NULL;
}
|
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
|
unsigned int ulen;
uint32_t xflags;
unsigned long flags = XN_FLAG_RFC2253 | ASN1_STRFLGS_UTF8_CONVERT;
flags &= ~ASN1_STRFLGS_ESC_MSB;
char *buffer = ckalloc(BUFSIZ > EVP_MAX_MD_SIZE ? BUFSIZ : EVP_MAX_MD_SIZE);
printf("Called\n");
if (interp == NULL || cert == NULL || bio == NULL || resultObj == NULL || buffer == NULL) {
Tcl_DecrRefCount(resultObj);
BIO_free(bio);
if (buffer != NULL) ckfree(buffer);
return NULL;
}
|
|
|
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
|
unsigned int ulen;
uint32_t xflags;
unsigned long flags = XN_FLAG_RFC2253 | ASN1_STRFLGS_UTF8_CONVERT;
flags &= ~ASN1_STRFLGS_ESC_MSB;
char *buffer = ckalloc(BUFSIZ > EVP_MAX_MD_SIZE ? BUFSIZ : EVP_MAX_MD_SIZE);
dprintf("Called");
if (interp == NULL || cert == NULL || bio == NULL || resultObj == NULL || buffer == NULL) {
Tcl_DecrRefCount(resultObj);
BIO_free(bio);
if (buffer != NULL) ckfree(buffer);
return NULL;
}
|