Answer the question
In order to leave comments, you need to log in
Escaping double quotes on MS DOS command line?
There is some command line application (who knows cryptcp). A large number of parameters are passed to this application. One of the parameters is enclosed in double quotes. And inside this parameter there is a value also containing double quotes (pay attention to the value of the -dn parameter - it is just in double quotes, and in the value itself there is O = OOO "Test organization")
cryptcp -creatrqst p20.der -provtype 75 -cont Petrov20 -dn "T=Manager,OID.1.2.840.113549.1.9.2=INN=0123456789/KPP=123456789/OGRN=0123456789123,CN=Petr Petr Petrovich,OU=Test subdivision,O=LLC "Test Organization",L=Krasnodar,S=23 Krasnodar Territory,C=RU,[email protected],TIN=001234567890,OGRN=0123456789123,SNILS=12345678901" -certusage "1.2.643.1 -both -ku -provname "Crypto-Pro GOST R 34.10-2001 Cryptographic Service Provider"
What I have already tried: -
framing the value in ' or ` instead of double quotes;
- escaping double quotes in O=OOO "Test organization" with \, ^ symbols;
- replacement of O=LLC "Test Organization" with O=LLC "" Test organization"";
- replace " with x22 or \x22 or ^\x22;
- replacing spaces in the value with %20 so that the entire value is not enclosed in double quotes.
Please suggest other options.
Thanks
Answer the question
In order to leave comments, you need to log in
cryptcp -creatrqst p20.der -provtype 75 -cont Petrov20 -dn "T=Manager,OID.1.2.840.113549.1.9.2=INN=0123456789/KPP=123456789/OGRN=0123456789123,CN=Petr Petr Petrovich,OU=Test subdivision,O=""LLC""""Test organization"""""",L=Krasnodar,S=23 Krasnodar Territory,C=RU,[email protected],TIN=001234567890, PSRN=0123456789123, SNILS=12345678901" -certusage "1.2.643.1.1,1.2.643.1.2,1.2.643.1.3.1,1.2.643.1.4.5,1.2.643.1.5,1.2.643.1.6" -both -ku -provname " Crypto-Pro GOST R 34.10-2001 Cryptographic Service Provider"
cryptcp -creatrqst p20.der -provtype 75 -cont Petrov20 -dn "T=Manager,OID.1.2.840.113549.1.9.2=INN=0123456789/KPP=123456789/OGRN=0123456789123,CN=Petr Petr Petrovich,OU=Test subdivision,O=LLC '"'Test Organization'"',L=Krasnodar,S=23 Krasnodar Territory,C=RU,[email protected],TIN=001234567890,OGRN=0123456789123,SNILS=12345678901" -certusage 1.2.643.1.1,1.2.643.1.2,1.2.643.1.3.1,1.2.643.1.4.5,1.2.643.1.5,1.2.643.1.6 -2001 Cryptographic Service Provider"
escaping double quotes with '
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question