| 1 | // Copyright 2015 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package x509scip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/ |
| 6 | |
| 7 | func (p PublicKeyAlgorithmscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/PublicKeyAlgorithm#) Stringscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/PublicKeyAlgorithm#String().() string { |
| 8 | if p >= total_key_algorithmsscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/total_key_algorithms. || p < 0 { |
| 9 | p = UnknownPublicKeyAlgorithmscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/UnknownPublicKeyAlgorithm. |
| 10 | } |
| 11 | return keyAlgorithmNamesscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/keyAlgorithmNames.[p] |
| 12 | } |
| 13 | |
| 14 | func (c *Certificatescip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/Certificate#) SignatureAlgorithmNamescip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/Certificate#SignatureAlgorithmName().() string { |
| 15 | switch c.SignatureAlgorithmscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/Certificate#SignatureAlgorithm. { |
| 16 | case UnknownSignatureAlgorithmscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/UnknownSignatureAlgorithm.: |
| 17 | return c.SignatureAlgorithmOIDscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/Certificate#SignatureAlgorithmOID..Stringscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/encoding/asn1`/ObjectIdentifier#String().() |
| 18 | default: |
| 19 | return c.SignatureAlgorithmscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/Certificate#SignatureAlgorithm..Stringscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/SignatureAlgorithm#String().() |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | func (c *Certificatescip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/Certificate#) PublicKeyAlgorithmNamescip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/Certificate#PublicKeyAlgorithmName().() string { |
| 24 | switch c.PublicKeyAlgorithmscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/Certificate#PublicKeyAlgorithm. { |
| 25 | case UnknownPublicKeyAlgorithmscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/UnknownPublicKeyAlgorithm.: |
| 26 | return c.PublicKeyAlgorithmOIDscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/Certificate#PublicKeyAlgorithmOID..Stringscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/encoding/asn1`/ObjectIdentifier#String().() |
| 27 | default: |
| 28 | return c.PublicKeyAlgorithmscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/Certificate#PublicKeyAlgorithm..Stringscip-go gomod github.com/zmap/zcrypto . `github.com/zmap/zcrypto/x509`/PublicKeyAlgorithm#String().() |
| 29 | } |
| 30 | } |