Skip to content

Commit

Permalink
Merge pull request #17 from aspectcapital/issue16
Browse files Browse the repository at this point in the history
Change PEM variable type
  • Loading branch information
Dillon Giacoppo authored May 17, 2019
2 parents dc978cf + 8d5c638 commit 9b64e51
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions artifactory/v1/security.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/atlassian/go-artifactory/v2/artifactory/client"
"io"
"net/http"
"os"
"strings"

"github.com/atlassian/go-artifactory/v2/artifactory/client"
)

type SecurityService Service
Expand Down Expand Up @@ -1035,7 +1036,7 @@ func (s *SecurityService) GetCertificates(ctx context.Context) (*[]CertificateDe
// Adds an SSL certificate.
// Since:5.4.0
// Security: Requires an admin user
func (s *SecurityService) AddCertificate(ctx context.Context, alias string, pem *os.File) (*client.Status, *http.Response, error) {
func (s *SecurityService) AddCertificate(ctx context.Context, alias string, pem io.Reader) (*client.Status, *http.Response, error) {
path := fmt.Sprintf("/api/system/security/certificates/%s", alias)
req, err := s.client.NewRequest("POST", path, pem)
if err != nil {
Expand Down

0 comments on commit 9b64e51

Please sign in to comment.