Lines Matching refs:fn

146 x509_cache_extensions(X509 *x509, const char *fn)  in x509_cache_extensions()  argument
149 warnx("%s: could not cache X509v3 extensions", fn); in x509_cache_extensions()
161 x509_get_aki(X509 *x, const char *fn, char **aki) in x509_get_aki() argument
173 fn); in x509_get_aki()
180 "AKI: extension not non-critical", fn); in x509_get_aki()
186 fn); in x509_get_aki()
193 "Key Identifier missing", fn); in x509_get_aki()
203 fn, SHA_DIGEST_LENGTH, dsz); in x509_get_aki()
221 x509_get_ski(X509 *x, const char *fn, char **ski) in x509_get_ski() argument
233 fn); in x509_get_ski()
240 "SKI: extension not non-critical", fn); in x509_get_ski()
245 warnx("%s: X509_pubkey_digest", fn); in x509_get_ski()
252 fn, md_len, os->length); in x509_get_ski()
257 warnx("%s: SKI does not match SHA1 hash of SPK", fn); in x509_get_ski()
275 x509_get_purpose(X509 *x, const char *fn) in x509_get_purpose() argument
283 if (!x509_cache_extensions(x, fn)) in x509_get_purpose()
290 warnx("%s: RFC 6487, section 4.8.4: missing KeyUsage", fn); in x509_get_purpose()
294 warnx("%s: RFC 6487, section 4.8.4: missing KeyUsage", fn); in x509_get_purpose()
298 warnx("%s: RFC 6487, section 4.8.4: KeyUsage not critical", fn); in x509_get_purpose()
306 "no basic constraints, but keyCertSign set", fn); in x509_get_purpose()
308 warnx("%s: unexpected legacy certificate", fn); in x509_get_purpose()
317 "error parsing basic constraints", fn); in x509_get_purpose()
320 "missing basic constraints", fn); in x509_get_purpose()
325 "must be marked critical", fn); in x509_get_purpose()
330 "Constraint must be absent", fn); in x509_get_purpose()
336 fn); in x509_get_purpose()
342 fn); in x509_get_purpose()
358 "self-issued cert with AKI-SKI mismatch", fn); in x509_get_purpose()
363 warnx("%s: Basic Constraints ext in non-CA cert", fn); in x509_get_purpose()
369 fn); in x509_get_purpose()
380 warnx("%s: error parsing EKU", fn); in x509_get_purpose()
386 warnx("%s: EKU: extension must not be marked critical", fn); in x509_get_purpose()
413 x509_get_pubkey(X509 *x, const char *fn) in x509_get_pubkey() argument
426 warnx("%s: X509_get0_pubkey failed in %s", fn, __func__); in x509_get_pubkey()
430 warnx("%s: Expected EVP_PKEY_EC, got %d", fn, in x509_get_pubkey()
437 warnx("%s: Incorrect key type", fn); in x509_get_pubkey()
442 warnx("%s: EC_KEY_get0_group failed", fn); in x509_get_pubkey()
447 warnx("%s: curve encoding issue", fn); in x509_get_pubkey()
453 warnx("%s: unconventional point encoding", fn); in x509_get_pubkey()
459 warnx("%s: Expected P-256, got %s", fn, cname); in x509_get_pubkey()
464 warnx("%s: EC_KEY_check_key failed in %s", fn, __func__); in x509_get_pubkey()
470 warnx("%s: i2d_PUBKEY failed in %s", fn, __func__); in x509_get_pubkey()
487 x509_pubkey_get_ski(X509_PUBKEY *pubkey, const char *fn) in x509_pubkey_get_ski() argument
496 warnx("%s: X509_PUBKEY_get0_param failed", fn); in x509_pubkey_get_ski()
503 fn, nid2str(nid), LN_rsaEncryption); in x509_pubkey_get_ski()
508 warnx("%s: EVP_Digest failed", fn); in x509_pubkey_get_ski()
522 x509_get_aia(X509 *x, const char *fn, char **out_aia) in x509_get_aia() argument
534 fn); in x509_get_aia()
542 "AIA: extension not non-critical", fn); in x509_get_aia()
548 "a self-signed certificate", fn); in x509_get_aia()
554 "want 1 element, have %d", fn, in x509_get_aia()
562 "expected caIssuers, have %d", fn, OBJ_obj2nid(ad->method)); in x509_get_aia()
566 if (!x509_location(fn, "AIA: caIssuers", ad->location, out_aia)) in x509_get_aia()
583 x509_get_sia(X509 *x, const char *fn, char **out_sia) in x509_get_sia() argument
595 warnx("%s: error parsing SIA", fn); in x509_get_sia()
603 "SIA: extension not non-critical", fn); in x509_get_sia()
622 " not contain rpkiNotify accessMethod", fn); in x509_get_sia()
630 " accessMethod: %s", fn, buf); in x509_get_sia()
635 if (!x509_location(fn, "SIA: signedObject", ad->location, &sia)) in x509_get_sia()
648 fnlen = strlen(fn); in x509_get_sia()
651 if (fnlen < plen || strcmp(p, fn + fnlen - plen) != 0) { in x509_get_sia()
653 "(%s)", fn, sia); in x509_get_sia()
663 "ignoring location %s", fn, sia); in x509_get_sia()
669 "SIA without rsync accessLocation", fn); in x509_get_sia()
684 x509_get_notbefore(X509 *x, const char *fn, time_t *tt) in x509_get_notbefore() argument
690 warnx("%s: X509_get0_notBefore failed", fn); in x509_get_notbefore()
694 warnx("%s: ASN1_TIME_to_tm failed", fn); in x509_get_notbefore()
704 x509_get_notafter(X509 *x, const char *fn, time_t *tt) in x509_get_notafter() argument
710 warnx("%s: X509_get0_notafter failed", fn); in x509_get_notafter()
714 warnx("%s: ASN1_TIME_to_tm failed", fn); in x509_get_notafter()
809 x509_get_crl(X509 *x, const char *fn, char **out_crl) in x509_get_crl() argument
823 "CRL distribution points", fn); in x509_get_crl()
831 "CRL distribution point: extension not non-critical", fn); in x509_get_crl()
837 "want 1 element, have %d", fn, in x509_get_crl()
845 " disallowed", fn); in x509_get_crl()
850 " disallowed", fn); in x509_get_crl()
855 "no distribution point name", fn); in x509_get_crl()
860 " disallowed", fn); in x509_get_crl()
866 " expected fullName, have %d", fn, dp->distpoint->type); in x509_get_crl()
876 if (!x509_location(fn, "CRL distribution point", name, &crl)) in x509_get_crl()
886 fn, crl); in x509_get_crl()
892 "in CRL distributionPoint", fn); in x509_get_crl()
929 x509_location(const char *fn, const char *descr, GENERAL_NAME *location, in x509_location() argument
937 warnx("%s: RFC 6487 section 4.8: %s not URI", fn, descr); in x509_location()
944 warnx("%s: RFC 6487 section 4.8: %s bad location", fn, descr); in x509_location()
959 x509_valid_name(const char *fn, const char *descr, const X509_NAME *xn) in x509_valid_name() argument
969 warnx("%s: X509_NAME_get_entry", fn); in x509_valid_name()
973 warnx("%s: X509_NAME_ENTRY_get_object", fn); in x509_valid_name()
982 fn, descr); in x509_valid_name()
987 fn); in x509_valid_name()
1001 " not PrintableString", fn); in x509_valid_name()
1009 fn, descr); in x509_valid_name()
1014 warnx("%s: OBJ_obj2nid failed", fn); in x509_valid_name()
1018 " %s in %s", fn, nid2str(nid), descr); in x509_valid_name()
1025 fn, descr); in x509_valid_name()
1037 x509_seqnum_to_bn(const char *fn, const char *descr, const ASN1_INTEGER *i) in x509_seqnum_to_bn() argument
1042 warnx("%s: %s: ASN1_INTEGER_to_BN error", fn, descr); in x509_seqnum_to_bn()
1047 warnx("%s: %s should be non-negative", fn, descr); in x509_seqnum_to_bn()
1053 warnx("%s: %s should fit in 20 octets", fn, descr); in x509_seqnum_to_bn()
1070 x509_convert_seqnum(const char *fn, const char *descr, const ASN1_INTEGER *i) in x509_convert_seqnum() argument
1078 if ((bn = x509_seqnum_to_bn(fn, descr, i)) == NULL) in x509_convert_seqnum()
1082 warnx("%s: %s: BN_bn2hex error", fn, descr); in x509_convert_seqnum()
1090 x509_valid_seqnum(const char *fn, const char *descr, const ASN1_INTEGER *i) in x509_valid_seqnum() argument
1094 if ((bn = x509_seqnum_to_bn(fn, descr, i)) == NULL) in x509_valid_seqnum()