Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for toASN1OID (0.11 sec)

  1. src/crypto/x509/oid_test.go

    				asn1OID = nil
    				break
    			}
    			asn1OID = append(asn1OID, int(v))
    		}
    
    		o, ok := oid.toASN1OID()
    		if shouldOk := asn1OID != nil; shouldOk != ok {
    			t.Errorf("(%#v).toASN1OID() = (%v, %v); want = (%v, %v)", oid, o, ok, asn1OID, shouldOk)
    			continue
    		}
    
    		if asn1OID != nil && !o.Equal(asn1OID) {
    			t.Errorf("(%#v).toASN1OID() = (%v, true); want = (%v, true)", oid, o, asn1OID)
    		}
    
    		if v.ints != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 19:10:38 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  2. src/crypto/x509/oid.go

    				}
    			} else {
    				b.Write(strconv.AppendUint(numBuf, val, 10))
    			}
    			val = 0
    			start = i + 1
    		}
    	}
    	return b.String()
    }
    
    func (oid OID) toASN1OID() (asn1.ObjectIdentifier, bool) {
    	out := make([]int, 0, len(oid.der)+1)
    
    	const (
    		valSize         = 31 // amount of usable bits of val for OIDs.
    		bitsPerByte     = 7
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 19:10:38 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  3. src/crypto/x509/parser.go

    				if err != nil {
    					return err
    				}
    				out.PolicyIdentifiers = make([]asn1.ObjectIdentifier, 0, len(out.Policies))
    				for _, oid := range out.Policies {
    					if oid, ok := oid.toASN1OID(); ok {
    						out.PolicyIdentifiers = append(out.PolicyIdentifiers, oid)
    					}
    				}
    			default:
    				// Unknown extensions are recorded if critical.
    				unhandled = true
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 38.5K bytes
    - Viewed (0)
Back to top