Commit d9db1668 authored by ASN.1 Documenter's avatar ASN.1 Documenter
Browse files

version 2022-D13

parent ddf554e5
Loading
Loading
Loading
Loading
Loading

.gitlab-ci.mk

deleted100755 → 0
+0 −24
Original line number Diff line number Diff line
ASN1_SRC   :=  $(wildcard *.asn)

ASN1_PDU := Ieee1609Dot2Data Certificate
#ASN1_KNOWN := DATE

#ASN1CDIR    ?= $(USERPROFILE)/Work/asn1c-fillabs
ifneq (,$(ASN1CDIR))
  ASN1C := $(ASN1CDIR)/asn1c/.libs/asn1c -S $(ASN1CDIR)/skeletons
else
  ASN1C := asn1c
endif

.PHONY: validate doc build

validate: iso build

doc: docs
	python3 asn2md.py -o docs $(ASN1_SRC)

iso docs:
	mkdir -p $@

build: $(ASN1_SRC) $(ASN1_SRC_VALIDATE)
	$(ASN1C) -E -F -fcompound-names $(addprefix -fknown-extern-type=,$(ASN1_KNOWN)) $(addprefix -pdu=,$(ASN1_PDU)) $^ >/dev/null
+11 −21
Original line number Diff line number Diff line
variables:
 GIT_SUBMODULE_STRATEGY: normal
include:
  - project: 'forge-tools/asn2md'
    file: '/gitlab-ci/base.yml'

image: danya25/asn1c:0.0.5
variables:
  ASN1_SRC: '*.asn'
  
validate:
  stage: test
  script: make -f .gitlab-ci.mk validate
  extends: .validate
  only:
    changes:
      - "asn/*.asn"
      - '*.asn'


documentation:
  stage: deploy
  script:
    - curl --header "PRIVATE-TOKEN:$CI_DOC_TOKEN" https://forge.etsi.org/rep/api/v4/projects/592/repository/files/asn2md.py?ref=master | python3 -c "import sys, json, base64; open('asn2md.py', 'wb').write(base64.b64decode(json.load(sys.stdin)['content']))"
    - make -f .gitlab-ci.mk doc
    - >
      if [ -z "$(git status --untracked-files=no --porcelain)" ]; then
        echo "No changes found";
      else 
        git add docs/*.md &&
        git commit -m "Documentation update" &&
        git remote rm origin && git remote add origin https://oauth2:$CI_DOC_TOKEN@forge.etsi.org/rep/$CI_PROJECT_PATH.git &&
        git push origin HEAD:$CI_COMMIT_REF_NAME;
      fi
  extends: .documentation
  only:
    changes:
      - "asn/*.asn"
      - '*.asn'
+1057 −823

File changed.

Preview size limit exceeded, changes collapsed.

+1002 −916

File changed.

Preview size limit exceeded, changes collapsed.

Ieee1609Dot2Crl.asn

0 → 100755
+72 −0
Original line number Diff line number Diff line
--***************************************************************************--
--                     IEEE Std 1609.2: CRL Data Types                       --
--***************************************************************************--

/**
 * @note Section references in this file are to clauses in IEEE Std
 * 1609.2 unless indicated otherwise. Full forms of acronyms and
 * abbreviations used in this file are specified in 3.2.
 */

Ieee1609Dot2Crl {iso(1) identified-organization(3) ieee(111)
  standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2)
  crl(3) major-version-3(3) minor-version-2(2)}

DEFINITIONS AUTOMATIC TAGS ::= BEGIN

IMPORTS
  Ieee1609Dot2Data
FROM Ieee1609Dot2 {iso(1) identified-organization(3) ieee(111)
  standards-association-numbered-series-standards(2) wave-stds(1609)
  dot2(2) base(1) schema(1) major-version-2(2) minor-version-6(6)}
WITH SUCCESSORS

  Opaque,
  Psid
FROM Ieee1609Dot2BaseTypes {iso(1) identified-organization(3) ieee(111)
  standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2)
  base(1) base-types(2) major-version-2(2) minor-version-4(4)}
WITH SUCCESSORS

  CrlContents
FROM Ieee1609Dot2CrlBaseTypes {iso(1) identified-organization(3) ieee(111)
  standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2)
  crl(3) base-types(2) major-version-3(3) minor-version-2(2)}
WITH SUCCESSORS
;

/**
 * @brief This is the PSID for the CRL application.
 */
CrlPsid ::= Psid(256)

/**
 * @brief This structure is the SPDU used to contain a signed CRL. A valid 
 * signed CRL meets the validity criteria of 7.4.
 */
SecuredCrl ::= Ieee1609Dot2Data (WITH COMPONENTS {..., 
  content (WITH COMPONENTS {
    signedData  (WITH COMPONENTS {..., 
      tbsData (WITH COMPONENTS {
        payload (WITH COMPONENTS {..., 
          data (WITH COMPONENTS {...,
             content (WITH COMPONENTS {
                unsecuredData (CONTAINING CrlContents)
            })
          })
        }),
        headerInfo (WITH COMPONENTS {..., 
          psid (CrlPsid),
          generationTime ABSENT,
          expiryTime ABSENT,
          generationLocation ABSENT,
          p2pcdLearningRequest ABSENT,
          missingCrlIdentifier ABSENT,
          encryptionKey ABSENT
        })
      })
    })
  })
})

END
Loading