Skip to content

Commit

Permalink
feat: add ca information
Browse files Browse the repository at this point in the history
  • Loading branch information
fritterhoff committed Dec 16, 2024
1 parent 57c2bec commit abf6e6a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
10 changes: 10 additions & 0 deletions backend/pki-rest-interface/pkg/api/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ const docTemplate = `{
"SMIME"
],
"summary": "SMIME List Endpoint",
"parameters": [
{
"type": "string",
"name": "email",
"in": "query"
}
],
"responses": {
"200": {
"description": "certificates",
Expand Down Expand Up @@ -399,6 +406,9 @@ const docTemplate = `{
"portal_apis.SslCertificateDetails": {
"type": "object",
"properties": {
"ca": {
"type": "string"
},
"common_name": {
"type": "string"
},
Expand Down
1 change: 1 addition & 0 deletions backend/pki-service/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ require (
github.com/hm-edu/portal-apis v0.0.0-20241128063248-b872e0b712f3
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0
go.opentelemetry.io/otel v1.33.0 // indirect
go.opentelemetry.io/otel/sdk v1.32.0 // indirect
go.opentelemetry.io/otel/trace v1.33.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
google.golang.org/protobuf v1.35.2
Expand Down
4 changes: 2 additions & 2 deletions backend/pki-service/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw=
go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I=
go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ=
go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M=
go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4=
go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU=
go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc=
go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8=
go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s=
Expand Down
5 changes: 5 additions & 0 deletions backend/pki-service/pkg/grpc/ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ func mapCertificate(x *ent.Certificate) *pb.SslCertificateDetails {
if x.Source != nil {
source = *x.Source
}
ca := ""
if x.Ca != nil {
ca = *x.Ca
}
return &pb.SslCertificateDetails{
Id: int32(x.SslId),
DbId: int32(x.ID),
Expand All @@ -72,6 +76,7 @@ func mapCertificate(x *ent.Certificate) *pb.SslCertificateDetails {
Source: source,
IssuedBy: issuedBy,
Created: created,
Ca: ca,
}
}

Expand Down

0 comments on commit abf6e6a

Please sign in to comment.