| /freebsd-13-stable/contrib/wpa/src/tls/ |
| HD | x509v3.c | 207 if (asn1_get_oid(pos, end - pos, &id->oid, &pos)) in x509_parse_algorithm_identifier() 290 struct asn1_oid oid; in x509_parse_name() local 342 if (asn1_get_oid(seq_pos, seq_end - seq_pos, &oid, &seq_pos)) { in x509_parse_name() 371 if (oid.len == 4 && in x509_parse_name() 372 oid.oid[0] == 2 && oid.oid[1] == 5 && oid.oid[2] == 4) { in x509_parse_name() 374 switch (oid.oid[3]) { in x509_parse_name() 400 } else if (oid.len == 7 && in x509_parse_name() 401 oid.oid[0] == 1 && oid.oid[1] == 2 && in x509_parse_name() 402 oid.oid[2] == 840 && oid.oid[3] == 113549 && in x509_parse_name() 403 oid.oid[4] == 1 && oid.oid[5] == 9 && in x509_parse_name() [all …]
|
| HD | tlsv1_cred.c | 335 static int oid_is_rsadsi(struct asn1_oid *oid) in oid_is_rsadsi() argument 337 return oid->len >= 4 && in oid_is_rsadsi() 338 oid->oid[0] == 1 /* iso */ && in oid_is_rsadsi() 339 oid->oid[1] == 2 /* member-body */ && in oid_is_rsadsi() 340 oid->oid[2] == 840 /* us */ && in oid_is_rsadsi() 341 oid->oid[3] == 113549 /* rsadsi */; in oid_is_rsadsi() 345 static int pkcs12_is_bagtype_oid(struct asn1_oid *oid, unsigned long type) in pkcs12_is_bagtype_oid() argument 347 return oid->len == 9 && in pkcs12_is_bagtype_oid() 348 oid_is_rsadsi(oid) && in pkcs12_is_bagtype_oid() 349 oid->oid[4] == 1 /* pkcs */ && in pkcs12_is_bagtype_oid() [all …]
|
| HD | asn1.c | 16 .oid = { 1, 3, 14, 3, 2, 26 }, 21 .oid = { 2, 16, 840, 1, 101, 3, 4, 2, 1 }, 26 .oid = { 1, 2, 840, 10045, 2, 1 }, 31 .oid = { 1, 2, 840, 10045, 3, 1, 7 }, 36 .oid = { 1, 3, 132, 0, 34 }, 41 .oid = { 1, 3, 132, 0, 35 }, 46 .oid = { 1, 3, 36, 3, 3, 2, 8, 1, 1, 7 }, 51 .oid = { 1, 3, 36, 3, 3, 2, 8, 1, 1, 11 }, 56 .oid = { 1, 3, 36, 3, 3, 2, 8, 1, 1, 13 }, 61 .oid = { 1, 2, 840, 113549, 1, 9, 16, 3, 22 }, [all …]
|
| HD | pkcs5.c | 38 static int oid_is_rsadsi(struct asn1_oid *oid) in oid_is_rsadsi() argument 40 return oid->len >= 4 && in oid_is_rsadsi() 41 oid->oid[0] == 1 /* iso */ && in oid_is_rsadsi() 42 oid->oid[1] == 2 /* member-body */ && in oid_is_rsadsi() 43 oid->oid[2] == 840 /* us */ && in oid_is_rsadsi() 44 oid->oid[3] == 113549 /* rsadsi */; in oid_is_rsadsi() 48 static int pkcs5_is_oid(struct asn1_oid *oid, unsigned long alg) in pkcs5_is_oid() argument 50 return oid->len == 7 && in pkcs5_is_oid() 51 oid_is_rsadsi(oid) && in pkcs5_is_oid() 52 oid->oid[4] == 1 /* pkcs */ && in pkcs5_is_oid() [all …]
|
| HD | pkcs8.c | 24 struct asn1_oid oid; in pkcs8_key_import() local 72 if (asn1_get_oid(hdr.payload, hdr.length, &oid, &pos)) { in pkcs8_key_import() 78 asn1_oid_to_str(&oid, obuf, sizeof(obuf)); in pkcs8_key_import() 81 if (oid.len != 7 || in pkcs8_key_import() 82 oid.oid[0] != 1 /* iso */ || in pkcs8_key_import() 83 oid.oid[1] != 2 /* member-body */ || in pkcs8_key_import() 84 oid.oid[2] != 840 /* us */ || in pkcs8_key_import() 85 oid.oid[3] != 113549 /* rsadsi */ || in pkcs8_key_import() 86 oid.oid[4] != 1 /* pkcs */ || in pkcs8_key_import() 87 oid.oid[5] != 1 /* pkcs-1 */ || in pkcs8_key_import() [all …]
|
| /freebsd-13-stable/sys/dev/bnxt/ |
| HD | bnxt_sysctl.c | 160 struct sysctl_oid *oid; in bnxt_create_tx_sysctls() local 167 oid = SYSCTL_ADD_NODE(&softc->hw_stats, in bnxt_create_tx_sysctls() 170 if (!oid) in bnxt_create_tx_sysctls() 173 SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, in bnxt_create_tx_sysctls() 176 SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, in bnxt_create_tx_sysctls() 179 SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, in bnxt_create_tx_sysctls() 182 SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, in bnxt_create_tx_sysctls() 185 SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, in bnxt_create_tx_sysctls() 188 SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, in bnxt_create_tx_sysctls() 191 SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, in bnxt_create_tx_sysctls() [all …]
|
| /freebsd-13-stable/contrib/bsnmp/snmpd/ |
| HD | export.c | 212 struct asn_oid *oid) in oid_save() argument 216 *(struct asn_oid *)ctx->scratch->ptr1 = *oid; in oid_save() 217 *oid = value->v.oid; in oid_save() 223 oid_rollback(struct snmp_context *ctx, struct asn_oid *oid) in oid_rollback() argument 225 *oid = *(struct asn_oid *)ctx->scratch->ptr1; in oid_rollback() 236 oid_get(struct snmp_value *value, const struct asn_oid *oid) in oid_get() argument 238 value->v.oid = *oid; in oid_get() 246 index_decode(const struct asn_oid *oid, u_int sub, u_int code, ...) in index_decode() argument 265 if (sub == oid->len) in index_decode() 267 *va_arg(ap, int32_t *) = oid->subs[sub++]; in index_decode() [all …]
|
| /freebsd-13-stable/sys/cam/scsi/ |
| HD | scsi_enc_safte.c | 358 int oid, r, i, nitems; in safte_process_status() local 368 oid = r = 0; in safte_process_status() 379 cache->elm_map[oid].encstat[1] = 0; /* resvd */ in safte_process_status() 380 cache->elm_map[oid].encstat[2] = 0; /* resvd */ in safte_process_status() 382 cache->elm_map[oid].encstat[3] |= 0x40; in safte_process_status() 384 cache->elm_map[oid].encstat[3] &= ~0x40; in safte_process_status() 388 cache->elm_map[oid].encstat[0] = SES_OBJSTAT_OK; in safte_process_status() 389 if ((cache->elm_map[oid].encstat[3] & 0x37) == 0) in safte_process_status() 390 cache->elm_map[oid].encstat[3] |= 0x27; in safte_process_status() 394 cache->elm_map[oid].encstat[0] = in safte_process_status() [all …]
|
| /freebsd-13-stable/usr.sbin/wlandebug/ |
| HD | wlandebug.c | 147 setoid(char oid[], size_t oidlen, const char *wlan) in setoid() argument 151 snprintf(oid, oidlen, "net.%s.debug", wlan); in setoid() 154 snprintf(oid, oidlen, "net.wlan.%s.debug", wlan+4); in setoid() 156 snprintf(oid, oidlen, "net.wlan.debug"); in setoid() 159 snprintf(oid, oidlen, "net.link.ieee80211.%s.debug", wlan); in setoid() 161 snprintf(oid, oidlen, "net.link.ieee80211.debug"); in setoid() 168 get_orig_iface_name(char *oid, size_t oid_size, char *name) in get_orig_iface_name() argument 184 setoid(oid, oid_size, orig_name); in get_orig_iface_name() 197 char oid[256]; in main() local 200 setoid(oid, sizeof(oid), "wlan0"); in main() [all …]
|
| /freebsd-13-stable/crypto/openssh/ |
| HD | gss-genr.c | 67 return (ctx != NULL && ctx->oid != GSS_C_NO_OID && in ssh_gssapi_check_oid() 68 ctx->oid->length == len && in ssh_gssapi_check_oid() 69 memcmp(ctx->oid->elements, data, len) == 0); in ssh_gssapi_check_oid() 76 if (ctx->oid != GSS_C_NO_OID) { in ssh_gssapi_set_oid_data() 77 free(ctx->oid->elements); in ssh_gssapi_set_oid_data() 78 free(ctx->oid); in ssh_gssapi_set_oid_data() 80 ctx->oid = xcalloc(1, sizeof(gss_OID_desc)); in ssh_gssapi_set_oid_data() 81 ctx->oid->length = len; in ssh_gssapi_set_oid_data() 82 ctx->oid->elements = xmalloc(len); in ssh_gssapi_set_oid_data() 83 memcpy(ctx->oid->elements, data, len); in ssh_gssapi_set_oid_data() [all …]
|
| /freebsd-13-stable/usr.sbin/bsnmpd/modules/snmp_bridge/ |
| HD | bridge_addrs.c | 337 bridge_addrs_index_append(struct asn_oid *oid, uint sub, in bridge_addrs_index_append() argument 342 oid->len = sub + ETHER_ADDR_LEN + 1; in bridge_addrs_index_append() 343 oid->subs[sub] = ETHER_ADDR_LEN; in bridge_addrs_index_append() 346 oid->subs[sub + i] = te->tp_addr[i - 1]; in bridge_addrs_index_append() 353 bridge_addrs_get(const struct asn_oid *oid, uint sub, in bridge_addrs_get() argument 359 if (oid->len - sub != ETHER_ADDR_LEN + 1 || in bridge_addrs_get() 360 oid->subs[sub] != ETHER_ADDR_LEN) in bridge_addrs_get() 364 tp_addr[i] = oid->subs[sub + i + 1]; in bridge_addrs_get() 374 bridge_addrs_getnext(const struct asn_oid *oid, uint sub, in bridge_addrs_getnext() argument 381 if (oid->len - sub == 0) in bridge_addrs_getnext() [all …]
|
| /freebsd-13-stable/sys/kgssapi/ |
| HD | gssd_prot.c | 60 xdr_gss_OID_desc(XDR *xdrs, gss_OID_desc *oid) in xdr_gss_OID_desc() argument 65 len = oid->length; in xdr_gss_OID_desc() 66 val = oid->elements; in xdr_gss_OID_desc() 69 oid->length = len; in xdr_gss_OID_desc() 70 oid->elements = val; in xdr_gss_OID_desc() 78 gss_OID oid; in xdr_gss_OID() local 83 oid = *oidp; in xdr_gss_OID() 84 if (oid) { in xdr_gss_OID() 87 || !xdr_gss_OID_desc(xdrs, oid)) in xdr_gss_OID() 102 oid = mem_alloc(sizeof(gss_OID_desc)); in xdr_gss_OID() [all …]
|
| /freebsd-13-stable/contrib/bsnmp/snmp_vacm/ |
| HD | vacm_snmp.c | 461 struct asn_oid oid; in op_vacm_view() local 521 &oid) < 0) in op_vacm_view() 523 if ((view = vacm_new_view(vname, &oid)) == NULL) in op_vacm_view() 612 vacm_append_userindex(struct asn_oid *oid, uint sub, in vacm_append_userindex() argument 617 oid->len = sub + strlen(user->secname) + 2; in vacm_append_userindex() 618 oid->subs[sub++] = user->sec_model; in vacm_append_userindex() 619 oid->subs[sub] = strlen(user->secname); in vacm_append_userindex() 621 oid->subs[sub + i] = user->secname[i - 1]; in vacm_append_userindex() 625 vacm_user_index_decode(const struct asn_oid *oid, uint sub, in vacm_user_index_decode() argument 630 *smodel = oid->subs[sub++]; in vacm_user_index_decode() [all …]
|
| /freebsd-13-stable/crypto/heimdal/lib/gssapi/mech/ |
| HD | gss_oid_to_str.c | 37 gss_oid_to_str(OM_uint32 *minor_status, gss_OID oid, gss_buffer_t oid_str) in gss_oid_to_str() argument 46 if (oid == GSS_C_NULL_OID) in gss_oid_to_str() 49 ret = der_get_oid (oid->elements, oid->length, &o, &size); in gss_oid_to_str() 70 gss_oid_to_name(gss_const_OID oid) in gss_oid_to_name() argument 74 for (i = 0; _gss_ont_mech[i].oid; i++) { in gss_oid_to_name() 75 if (gss_oid_equal(oid, _gss_ont_mech[i].oid)) in gss_oid_to_name() 86 for (i = 0; _gss_ont_mech[i].oid; i++) { in gss_name_to_oid() 88 return _gss_ont_mech[i].oid; in gss_name_to_oid() 96 return _gss_ont_mech[partial].oid; in gss_name_to_oid()
|
| /freebsd-13-stable/lib/libc/gen/ |
| HD | setproctitle.c | 172 int oid[4]; in setproctitle_fast() local 180 oid[0] = CTL_KERN; in setproctitle_fast() 181 oid[1] = KERN_PROC; in setproctitle_fast() 182 oid[2] = KERN_PROC_ARGS; in setproctitle_fast() 183 oid[3] = -1; in setproctitle_fast() 184 sysctl(oid, 4, 0, 0, "", 0); in setproctitle_fast() 194 int oid[4]; in setproctitle() local 202 oid[0] = CTL_KERN; in setproctitle() 203 oid[1] = KERN_PROC; in setproctitle() 204 oid[2] = KERN_PROC_ARGS; in setproctitle() [all …]
|
| /freebsd-13-stable/contrib/bsnmp/lib/ |
| HD | asn1.c | 581 asn_get_objid_raw(struct asn_buf *b, asn_len_t len, struct asn_oid *oid) in asn_get_objid_raw() argument 590 oid->len = 0; in asn_get_objid_raw() 593 oid->subs[oid->len++] = 0; in asn_get_objid_raw() 594 oid->subs[oid->len++] = 0; in asn_get_objid_raw() 599 if (oid->len == ASN_MAXOIDLEN) { in asn_get_objid_raw() 600 asn_error(b, "OID too long (%u)", oid->len); in asn_get_objid_raw() 619 if (oid->len == 0) { in asn_get_objid_raw() 621 oid->subs[oid->len++] = subid / 40; in asn_get_objid_raw() 622 oid->subs[oid->len++] = subid % 40; in asn_get_objid_raw() 624 oid->subs[oid->len++] = 2; in asn_get_objid_raw() [all …]
|
| /freebsd-13-stable/sys/kern/ |
| HD | kern_sysctl.c | 179 sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intmax_t arg2, in sysctl_root_handler_locked() argument 184 if (oid->oid_kind & CTLFLAG_DYN) in sysctl_root_handler_locked() 185 atomic_add_int(&oid->oid_running, 1); in sysctl_root_handler_locked() 196 if ((oid->oid_kind & CTLFLAG_NEEDGIANT) || in sysctl_root_handler_locked() 197 (!(oid->oid_kind & CTLFLAG_MPSAFE))) in sysctl_root_handler_locked() 199 error = oid->oid_handler(oid, arg1, arg2, req); in sysctl_root_handler_locked() 200 if ((oid->oid_kind & CTLFLAG_NEEDGIANT) || in sysctl_root_handler_locked() 201 (!(oid->oid_kind & CTLFLAG_MPSAFE))) in sysctl_root_handler_locked() 211 if (oid->oid_kind & CTLFLAG_DYN) { in sysctl_root_handler_locked() 212 if (atomic_fetchadd_int(&oid->oid_running, -1) == 1 && in sysctl_root_handler_locked() [all …]
|
| /freebsd-13-stable/contrib/bsnmp/snmp_usm/ |
| HD | usm_snmp.c | 187 !(asn_is_suboid(&oid_usmUserSecurityName, &val->v.oid))) in op_usm_users() 189 if ((clone = usm_get_user(&val->v.oid, sub)) == NULL) in op_usm_users() 211 &val->v.oid) == 0) in op_usm_users() 214 &val->v.oid) == 0) in op_usm_users() 217 &val->v.oid) == 0) in op_usm_users() 244 &val->v.oid) == 0) in op_usm_users() 247 &val->v.oid) == 0) in op_usm_users() 250 &val->v.oid) == 0) in op_usm_users() 400 memcpy(&val->v.oid, &oid_zeroDotZero, sizeof(oid_zeroDotZero)); in op_usm_users() 405 memcpy(&val->v.oid, &oid_usmHMACMD5AuthProtocol, in op_usm_users() [all …]
|
| /freebsd-13-stable/usr.sbin/bsnmpd/modules/snmp_lm75/ |
| HD | snmp_lm75.c | 136 sysctlname(int *oid, int nlen, char *name, size_t len) in sysctlname() argument 145 memcpy(mib + 2, oid, nlen * sizeof(int)); in sysctlname() 154 sysctlgetnext(int *oid, int nlen, int *next, size_t *nextlen) in sysctlgetnext() argument 163 memcpy(mib + 2, oid, nlen * sizeof(int)); in sysctlgetnext() 248 int i, root[5], *next, *oid; in update_sensors() local 267 oid = (int *)malloc(sizeof(int) * rootlen); in update_sensors() 268 if (oid == NULL) { in update_sensors() 272 memcpy(oid, root, rootlen * sizeof(int)); in update_sensors() 280 if (sysctlgetnext(oid, len, NULL, &nextlen) == -1) { in update_sensors() 281 free(oid); in update_sensors() [all …]
|
| /freebsd-13-stable/contrib/wpa/src/common/ |
| HD | dpp_backup.c | 114 const struct asn1_oid *oid; in dpp_build_key_alg() local 119 oid = &asn1_prime256v1_oid; in dpp_build_key_alg() 122 oid = &asn1_secp384r1_oid; in dpp_build_key_alg() 125 oid = &asn1_secp521r1_oid; in dpp_build_key_alg() 128 oid = &asn1_brainpoolP256r1_oid; in dpp_build_key_alg() 131 oid = &asn1_brainpoolP384r1_oid; in dpp_build_key_alg() 134 oid = &asn1_brainpoolP512r1_oid; in dpp_build_key_alg() 143 asn1_put_oid(params, oid); /* namedCurve */ in dpp_build_key_alg() 218 const struct asn1_oid *oid; in dpp_build_pbkdf2_alg_id() local 235 oid = &asn1_pbkdf2_hmac_sha256_oid; in dpp_build_pbkdf2_alg_id() [all …]
|
| /freebsd-13-stable/sbin/ipfw/ |
| HD | dummynet.c | 130 oid_fill(struct dn_id *oid, int len, int type, uintptr_t id) in oid_fill() argument 132 oid->len = len; in oid_fill() 133 oid->type = type; in oid_fill() 134 oid->subtype = 0; in oid_fill() 135 oid->id = id; in oid_fill() 237 oid_fill(&ep->oid, l, DN_CMD_GET, DN_API_VERSION); in get_extra_parms() 238 ep->oid.len = l; in get_extra_parms() 239 ep->oid.subtype = subtype; in get_extra_parms() 437 bprintf(bp, "%3u%c", (ni->oid.id) & 0xff, in list_flow() 510 prefix, qs, plr, fs->oid.id, fs->buckets, red); in print_flowset_parms() [all …]
|
| /freebsd-13-stable/contrib/bearssl/src/x509/ |
| HD | encode_ec_pk8der.c | 65 const unsigned char *oid; in br_encode_ec_pkcs8_der() local 67 oid = br_get_curve_OID(sk->curve); in br_encode_ec_pkcs8_der() 68 if (oid == NULL) { in br_encode_ec_pkcs8_der() 72 len_privateKeyAlgorithm = 2 + sizeof OID_ECPUBKEY + 2 + oid[0]; in br_encode_ec_pkcs8_der() 96 *buf ++ = (sizeof OID_ECPUBKEY) + 2 + oid[0]; in br_encode_ec_pkcs8_der() 100 memcpy(buf, oid, 1 + oid[0]); in br_encode_ec_pkcs8_der() 101 buf += 1 + oid[0]; in br_encode_ec_pkcs8_der()
|
| HD | encode_ec_rawder.c | 83 const unsigned char *oid; in br_encode_ec_raw_der_inner() local 86 oid = br_get_curve_OID(sk->curve); in br_encode_ec_raw_der_inner() 87 if (oid == NULL) { in br_encode_ec_raw_der_inner() 91 oid = NULL; in br_encode_ec_raw_der_inner() 96 len_parameters = 4 + oid[0]; in br_encode_ec_raw_der_inner() 134 *buf ++ = oid[0] + 2; in br_encode_ec_raw_der_inner() 136 memcpy(buf, oid, oid[0] + 1); in br_encode_ec_raw_der_inner() 137 buf += oid[0] + 1; in br_encode_ec_raw_der_inner()
|
| /freebsd-13-stable/contrib/subversion/subversion/libsvn_subr/ |
| HD | x509info.c | 44 result->oid = apr_pmemdup(result_pool, attr->oid, attr->oid_len); in svn_x509_name_attr_dup() 54 return attr->oid; in svn_x509_name_attr_get_oid() 125 const unsigned char *oid; member 148 svn_x509_oid_to_string(const unsigned char *oid, apr_size_t oid_len, in svn_x509_oid_to_string() argument 152 const unsigned char *p = oid; in svn_x509_oid_to_string() 157 if (p == oid) in svn_x509_oid_to_string() 217 static const asn1_oid *oid_to_asn1_oid(unsigned char *oid, apr_size_t oid_len) in oid_to_asn1_oid() argument 221 for (entry = asn1_oids; entry->oid; entry++) in oid_to_asn1_oid() 224 memcmp(oid, entry->oid, oid_len) == 0) in oid_to_asn1_oid() 231 static const char *oid_to_best_label(unsigned char *oid, apr_size_t oid_len, in oid_to_best_label() argument [all …]
|
| /freebsd-13-stable/contrib/bsnmp/snmp_mibII/ |
| HD | mibII_tcp.c | 104 struct tcp_index *oid; in fetch_tcp() local 141 oid = realloc(tcpoids, tcp_total * sizeof(tcpoids[0])); in fetch_tcp() 142 if (oid == NULL) { in fetch_tcp() 147 tcpoids = oid; in fetch_tcp() 151 oid = tcpoids; in fetch_tcp() 159 oid->tp = tp; in fetch_tcp() 160 oid->index.len = 10; in fetch_tcp() 162 oid->index.subs[0] = (inaddr >> 24) & 0xff; in fetch_tcp() 163 oid->index.subs[1] = (inaddr >> 16) & 0xff; in fetch_tcp() 164 oid->index.subs[2] = (inaddr >> 8) & 0xff; in fetch_tcp() [all …]
|