Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for checkSignature (0.28 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt

              ),
          )
        assertThat(okHttpCertificateWithBadSignature.checkSignature(root.keyPair.public)).isFalse()
    
        // Wrong public key.
        assertThat(okHttpCertificate.checkSignature(certificate.keyPair.public)).isFalse()
      }
    
      @Test
      fun `EC issuer and signature`() {
        val root =
          HeldCertificate.Builder()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 43.9K bytes
    - Viewed (0)
  2. pkg/controller/certificates/authority/authority.go

    	cr, err := x509.ParseCertificateRequest(crDER)
    	if err != nil {
    		return nil, fmt.Errorf("unable to parse certificate request: %v", err)
    	}
    	if err := cr.CheckSignature(); err != nil {
    		return nil, fmt.Errorf("unable to verify certificate request signature: %v", err)
    	}
    
    	serialNumber, err := rand.Int(rand.Reader, serialNumberLimit)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 23 19:36:11 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  3. security/pkg/pki/util/generate_csr_test.go

    		if pemBlock == nil {
    			t.Fatalf("%s: failed to decode csr", id)
    		}
    		csr, err := x509.ParseCertificateRequest(pemBlock.Bytes)
    		if err != nil {
    			t.Fatalf("%s: failed to parse csr", id)
    		}
    		if err = csr.CheckSignature(); err != nil {
    			t.Errorf("%s: csr signature is invalid", id)
    		}
    		if csr.Subject.Organization[0] != "MyOrg" {
    			t.Errorf("%s: csr subject does not match", id)
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 25 09:40:13 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  4. pkg/test/csrctrl/authority/authority.go

    	}
    
    	cr, err := x509.ParseCertificateRequest(crDER)
    	if err != nil {
    		return nil, fmt.Errorf("unable to parse certificate request: %v", err)
    	}
    	if err := cr.CheckSignature(); err != nil {
    		return nil, fmt.Errorf("unable to verify certificate request signature: %v", err)
    	}
    
    	serialNumber, err := rand.Int(rand.Reader, serialNumberLimit)
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jul 28 18:22:37 UTC 2021
    - 3K bytes
    - Viewed (0)
  5. src/crypto/x509/x509.go

    			if err != nil {
    				return nil, err
    			}
    		}
    	}
    
    	return out, nil
    }
    
    // CheckSignature reports whether the signature on c is valid.
    func (c *CertificateRequest) CheckSignature() error {
    	return checkSignature(c.SignatureAlgorithm, c.RawTBSCertificateRequest, c.Signature, c.PublicKey, true)
    }
    
    // RevocationListEntry represents an entry in the revokedCertificates
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:20:15 UTC 2024
    - 82K bytes
    - Viewed (0)
  6. security/pkg/pki/ra/common.go

    func ValidateCSR(csrPEM []byte, subjectIDs []string) bool {
    	csr, err := util.ParsePemEncodedCSR(csrPEM)
    	if err != nil {
    		return false
    	}
    	if err := csr.CheckSignature(); err != nil {
    		return false
    	}
    	csrIDs, err := util.ExtractIDs(csr.Extensions)
    	if err != nil {
    		return false
    	}
    	for _, s1 := range csrIDs {
    		if !slices.Contains(subjectIDs, s1) {
    			return false
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Sep 11 19:57:30 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Certificate.kt

            it.id == ObjectIdentifiers.BASIC_CONSTRAINTS
          }
        }
    
      /** Returns true if the certificate was signed by [issuer]. */
      @Throws(SignatureException::class)
      fun checkSignature(issuer: PublicKey): Boolean {
        val signedData = CertificateAdapters.tbsCertificate.toDer(tbsCertificate)
    
        return Signature.getInstance(tbsCertificate.signatureAlgorithmName).run {
          initVerify(issuer)
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  8. subprojects/core/src/integTest/groovy/org/gradle/internal/classpath/BuildScriptClasspathIntegrationSpec.groovy

                    }
                }
    
                tasks.register('checkSignature') {
                    doLast {
                        def signedClass = org.bouncycastle.jce.provider.BouncyCastleProvider.class
                        assert signedClass.signers != null
                    }
                }
            """
    
            when:
            succeeds 'checkSignature'
    
            then:
            noExceptionThrown()
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 03 15:21:47 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  9. src/crypto/x509/root_windows.go

    	// ones we parsed. (We don't support custom curves ourselves.)
    	for i, parent := range chain[1:] {
    		if parent.PublicKeyAlgorithm != ECDSA {
    			continue
    		}
    		if err := parent.CheckSignature(chain[i].SignatureAlgorithm,
    			chain[i].RawTBSCertificate, chain[i].Signature); err != nil {
    			return nil, err
    		}
    	}
    	return chain, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 19:41:40 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  10. pkg/apis/certificates/validation/validation.go

    func validateCSR(obj *certificates.CertificateSigningRequest) error {
    	csr, err := certificates.ParseCSR(obj.Spec.Request)
    	if err != nil {
    		return err
    	}
    	// check that the signature is valid
    	return csr.CheckSignature()
    }
    
    func validateCertificate(pemData []byte) error {
    	if len(pemData) == 0 {
    		return nil
    	}
    
    	blocks := 0
    	for {
    		block, remainingData := pem.Decode(pemData)
    		if block == nil {
    			break
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:49 UTC 2023
    - 20.1K bytes
    - Viewed (0)
Back to top