Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

PEM Regex seems questionable #12

@aschmahmann

Description

@aschmahmann

go-openssl/pem.go

Lines 22 to 25 in 6d00a81

var pemSplit *regexp.Regexp = regexp.MustCompile(`(?sm)` +
`(^-----[\s-]*?BEGIN.*?-----[\s-]*?$` +
`.*?` +
`^-----[\s-]*?END.*?-----[\s-]*?$)`)

Allows for whitespace and dashes beyond what is allowed in the spec https://tools.ietf.org/html/rfc7468. We should clean this up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions