Skip to content

Commit

Permalink
fixed the TODOs ,notations and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
priyacj committed Jan 16, 2025
1 parent 775a0e1 commit dedd685
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
2 changes: 2 additions & 0 deletions feature/security/gnsi/certz/test_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Creation of test data for use in TLS tests.
* server_cert.cnf/server_cert_ext.cnf - server openssl profile configuration
* client_cert.cnf/client_cert_ext.cnf - client openssl profile configuration

## TODO:Perform this for the permutations of 20000 CA trust_bundle configurations

Each CA set includes, for both RSA and ECDSA signature types:
* CA key
* CA public certificate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ identification information. The client certificate should have a
SPIFFE Idenitifier embedded in it to be used as the identifier of
the client to the server.


## Baseline Setup

### Input Args
Expand Down Expand Up @@ -42,8 +43,11 @@ gRPC service.

Perform this for both RSA and ECDSA signed CA bundles and
certificates.
Perform this for the permutations of 1, 2, 10, 1000, 20000 CA
trust_bundle configurations: (## indicates the 1, 2, 10, 1000, 20000 CA testdata)

## TODO:Perform this for the permutations of 20000 CA
## TODO:trust_bundle configurations: ( 20000 CA testdata)
Perform this for the permutations of 1, 2, 10, 1000 CA
trust_bundle configurations: (## indicates the 1, 2, 10, 1000 CA testdata)

1) Load the correct key-type trust bundle onto the device and client system:
ca-##/trust_bundle_##_rsa.pem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package client_certificates_test

import (
context "context"
"context"
"crypto/tls"
"crypto/x509"
"os"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package setupservice

import (
context "context"
"context"
"crypto/tls"
"crypto/x509"
"encoding/pem"
Expand Down Expand Up @@ -147,16 +147,20 @@ func CreateCertzChain(t *testing.T, certData CertificateChainRequest) certzpb.Ce
t.Fatalf("Error reading Server Key file at: %v with error: %v", certData.ServerKeyFile, err)
}
return certzpb.CertificateChain{Certificate: &certzpb.Certificate{
Type: certzpb.CertificateType_CERTIFICATE_TYPE_X509,
Encoding: certzpb.CertificateEncoding_CERTIFICATE_ENCODING_PEM,
Certificate: serverCertContent,
PrivateKey: serverKeyContent}, Parent: nil}
Type: certzpb.CertificateType_CERTIFICATE_TYPE_X509,
Encoding: certzpb.CertificateEncoding_CERTIFICATE_ENCODING_PEM,
Certificate: serverCertContent,
PrivateKey: serverKeyContent,
PrivateKeyType: &certzpb.Certificate_RawPrivateKey{RawPrivateKey: serverKeyContent},
CertificateType: &certzpb.Certificate_RawCertificate{RawCertificate: serverCertContent}}, Parent: nil}
}
return certzpb.CertificateChain{Certificate: &certzpb.Certificate{
Type: certzpb.CertificateType_CERTIFICATE_TYPE_X509,
Encoding: certzpb.CertificateEncoding_CERTIFICATE_ENCODING_PEM,
Certificate: serverCertContent,
PrivateKey: nil}, Parent: nil}
Type: certzpb.CertificateType_CERTIFICATE_TYPE_X509,
Encoding: certzpb.CertificateEncoding_CERTIFICATE_ENCODING_PEM,
Certificate: serverCertContent,
PrivateKey: nil,
PrivateKeyType: nil,
CertificateType: &certzpb.Certificate_RawCertificate{RawCertificate: serverCertContent}}, Parent: nil}

case EntityTypeTrustBundle:
if len(certData.TrustBundleFile) == 0 {
Expand Down

0 comments on commit dedd685

Please sign in to comment.