MCPcopy Create free account
hub / github.com/apache/httpd / md_pkey_spec_eq

Function md_pkey_spec_eq

modules/md/md_crypt.c:485–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485int md_pkey_spec_eq(const md_pkey_spec_t *s1, const md_pkey_spec_t *s2)
486{
487 if (s1 == s2) {
488 return 1;
489 }
490 if (s1 && s2 && s1->type == s2->type) {
491 switch (s1->type) {
492 case MD_PKEY_TYPE_DEFAULT:
493 return 1;
494 case MD_PKEY_TYPE_RSA:
495 if (s1->params.rsa.bits == s2->params.rsa.bits) {
496 return 1;
497 }
498 break;
499 case MD_PKEY_TYPE_EC:
500 if (s1->params.ec.curve == s2->params.ec.curve) {
501 return 1;
502 }
503 else if (!s1->params.ec.curve || !s2->params.ec.curve) {
504 return 0;
505 }
506 return !strcmp(s1->params.ec.curve, s2->params.ec.curve);
507 }
508 }
509 return 0;
510}
511
512int md_pkeys_spec_eq(md_pkeys_spec_t *pks1, md_pkeys_spec_t *pks2)
513{

Callers 2

md_pkeys_spec_eqFunction · 0.85
ad_setup_orderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected