Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ReadASN1UTCTime (0.14 sec)

  1. src/vendor/golang.org/x/crypto/cryptobyte/asn1.go

    		return false
    	}
    	*out = res
    	return true
    }
    
    const defaultUTCTimeFormatStr = "060102150405Z0700"
    
    // ReadASN1UTCTime decodes an ASN.1 UTCTime into out and advances.
    // It reports whether the read was successful.
    func (s *String) ReadASN1UTCTime(out *time.Time) bool {
    	var bytes String
    	if !s.ReadASN1(&bytes, asn1.UTCTime) {
    		return false
    	}
    	t := string(bytes)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 29 21:28:33 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  2. src/crypto/x509/parser.go

    	ai.Parameters.FullBytes = params
    	return ai, nil
    }
    
    func parseTime(der *cryptobyte.String) (time.Time, error) {
    	var t time.Time
    	switch {
    	case der.PeekASN1Tag(cryptobyte_asn1.UTCTime):
    		if !der.ReadASN1UTCTime(&t) {
    			return t, errors.New("x509: malformed UTCTime")
    		}
    	case der.PeekASN1Tag(cryptobyte_asn1.GeneralizedTime):
    		if !der.ReadASN1GeneralizedTime(&t) {
    			return t, errors.New("x509: malformed GeneralizedTime")
    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