本文整理汇总了C++中Owned::generate方法的典型用法代码示例。如果您正苦于以下问题:C++ Owned::generate方法的具体用法?C++ Owned::generate怎么用?C++ Owned::generate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Owned
的用法示例。
在下文中一共展示了Owned::generate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
printf("Organization Name (eg, company): ");
myfgets(buf,128,stdin);
orgbuf.append(buf);
}
if(oubuf.length() == 0)
{
printf("Organizational Unit Name: ");
myfgets(buf,128,stdin);
oubuf.append(buf);
}
if(ebuf.length() == 0)
{
printf("Email: ");
myfgets(buf, 128, stdin);
ebuf.append(buf);
}
if(cnbuf.length() == 0)
{
printf("Common Name (Server's hostname or IP address): ");
myfgets(buf, 128, stdin);
cnbuf.append(buf);
}
if(action == CRT)
{
printf("Number of days for the certificate to be valid: ");
myfgets(buf, 128, stdin);
if(strlen(buf) > 0)
daysbuf.append(buf);
printf("Private Key file(leave it blank if you want to generate a private key): ");
myfgets(buf,128,stdin);
pfbuf.append(buf);
getpassword("Enter PEM pass phrase: ", pbuf);
}
else if(action == CSR)
{
printf("Private Key file(leave it blank if you want to generate a private key): ");
myfgets(buf,128,stdin);
pfbuf.append(buf);
getpassword("Enter PEM pass phrase: ", pbuf);
}
}
else if(action == SIGN)
{
printf("csr file: ");
myfgets(buf,128,stdin);
rfbuf.append(buf);
printf("CA certificate file: ");
myfgets(buf,128,stdin);
cfbuf.append(buf);
printf("CA privatekey file: ");
myfgets(buf,128,stdin);
pfbuf.append(buf);
getpassword("CA private key passphrase: ", pbuf);
printf("\nNumber of days for the certificate to be valid: ");
myfgets(buf,128,stdin);