equal
deleted
inserted
replaced
533 break; |
533 break; |
534 } |
534 } |
535 } |
535 } |
536 |
536 |
537 // compute the root hash value if requested |
537 // compute the root hash value if requested |
538 if (x509_ctx->current_issuer != NULL) |
538 if (x509_ctx->chain != NULL) |
539 { |
539 { |
540 sprintf(root_hash,"%08lX",X509_issuer_name_hash(x509_ctx->current_issuer)); |
540 X509* root = sk_X509_value(x509_ctx->chain,sk_X509_num(x509_ctx->chain) - 1); |
|
541 if (root != NULL) |
|
542 { |
|
543 sprintf(root_hash,"%08lX",X509_issuer_name_hash(root)); |
|
544 // no need to free the root explicitly since it will be |
|
545 // freed when freeing all the roots from roots_certs_st |
|
546 // stack |
|
547 } |
541 } |
548 } |
542 // add the '\0' |
549 // add the '\0' |
543 root_hash[MD5_DIGEST_LEN] = '\0'; |
550 root_hash[MD5_DIGEST_LEN] = '\0'; |
544 |
551 |
545 // 1. get the public key of the signing cert |
552 // 1. get the public key of the signing cert |