github.com/Venafi/vcert/v5@v5.10.2/aruba/features/enroll/enroll-deprecated-options.feature (about)

     1  @TPP
     2  Feature: Tests with deprecated TPP options
     3  
     4    As a user
     5    I want to be sure they all pass
     6  
     7    Background:
     8      And the default aruba exit timeout is 180 seconds
     9  
    10  # cls
    11  # title ~ Service Generated CSR with RSA key ~
    12  # VCert enroll -tpp-url %TPP_URL% -tpp-user %TPP_USER% -tpp-password %TPP_PASS% -z "%POLICY%" -csr service -key-type rsa -key-size 4096 -cn service-gen-rsa.vcert.example -format json -key-password %KEY_PASS%
    13  # if ERRORLEVEL 1 goto :DONE
    14  # timeout /t 10
    15    Scenario: ~ Service Generated CSR with RSA key ~
    16      When I enroll a certificate with dummy password in TPPdeprecated with -csr service -key-type rsa -key-size 4096 -cn service-gen-rsa.vcert.example -format json
    17      Then it should retrieve certificate
    18      Then I get JSON response
    19      And that certificate should contain "Public-Key: (4096 bit)"
    20  
    21  # cls
    22  # title ~ Service Generated CSR pickup later ID as param ~
    23  # for /f "tokens=2 delims==" %%i in ( 'VCert enroll -tpp-url %TPP_URL% -tpp-user %TPP_USER% -tpp-password %TPP_PASS% -z "%POLICY%" -csr service -cn service-gen-pickup-id-as-param.vcert.example -no-pickup 2^>^&1 ^| find "PickupID="' ) do set PICKUP_ID=%%i
    24  # echo PickupID=%PICKUP_ID%
    25  # timeout /t 15 /nobreak
    26  # echo.
    27  # VCert pickup -tpp-url %TPP_URL% -tpp-user %TPP_USER% -tpp-password %TPP_PASS% -pickup-id %PICKUP_ID% -key-password %KEY_PASS%
    28  # if ERRORLEVEL 1 goto :DONE
    29  # timeout /t 10
    30  
    31    Scenario: ~ Service Generated CSR pickup later ID as param ~
    32      When I enroll certificate using TPPdeprecated with -csr service -cn service-gen-pickup-id-as-param.vcert.example -no-pickup
    33      Then it should post certificate request
    34      And I retrieve the certificate from TPPdeprecated using the same Pickup ID and using a dummy password with -timeout 59
    35      Then it should retrieve certificate
    36      Then it should output encrypted private key
    37  
    38  # cls
    39  # title ~ Service Generated CSR pickup later ID in file~
    40  # VCert enroll -tpp-url %TPP_URL% -tpp-user %TPP_USER% -tpp-password %TPP_PASS% -z "%POLICY%" -csr service -cn service-gen-pickup-id-in-file.vcert.example -no-pickup -pickup-id-file pickup_id.txt
    41  # timeout /t 15 /nobreak
    42  # echo.
    43  # VCert pickup -tpp-url %TPP_URL% -tpp-user %TPP_USER% -tpp-password %TPP_PASS% -pickup-id-file pickup_id.txt -key-password %KEY_PASS%
    44  # if ERRORLEVEL 1 goto :DONE
    45  # timeout /t 10
    46    Scenario: ~ Service Generated CSR pickup later ID in file~
    47      When I enroll certificate using TPPdeprecated with -csr service -cn service-gen-pickup-id-in-file.vcert.example -no-pickup -pickup-id-file pickup_id.txt
    48      Then it should post certificate request
    49      And I retrieve the certificate using a dummy password from TPPdeprecated with -pickup-id-file pickup_id.txt -timeout 59
    50      Then it should retrieve certificate
    51      Then it should output encrypted private key
    52  
    53  
    54  # cls
    55  # title ~ User Provided CSR with RSA key ~
    56  # VCert gencsr -cn user-provided-rsa.vcert.example -key-type rsa -key-size 4096 -key-file user-provided-rsa.key -csr-file user-provided-rsa.req -no-prompt
    57  # echo.
    58  # VCert enroll -tpp-url %TPP_URL% -tpp-user %TPP_USER% -tpp-password %TPP_PASS% -z "%POLICY%" -csr file:user-provided-rsa.req
    59  # if ERRORLEVEL 1 goto :DONE
    60  # timeout /t 10
    61    Scenario: ~ User Provided CSR with RSA key ~
    62      Given I generate CSR with -cn user-provided-rsa.vcert.example -key-type rsa -key-size 4096 -key-file user-provided-rsa.key -csr-file user-provided-rsa.req -no-prompt
    63      When I enroll certificate using TPPdeprecated with -csr file:user-provided-rsa.req -cert-file c.pem
    64      And it should retrieve certificate
    65      And I decode certificate from file "c.pem"
    66      Then that certificate should contain "Public-Key: (4096 bit)"
    67