parent
c2f6935824
commit
e6149dee47
@ -4,7 +4,7 @@
|
|||||||
Summary: SSL certificate and key management utilities
|
Summary: SSL certificate and key management utilities
|
||||||
Name: crypto-utils
|
Name: crypto-utils
|
||||||
Version: 2.4.1
|
Version: 2.4.1
|
||||||
Release: 60%{?dist}
|
Release: 61%{?dist}
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
# certwatch.c is GPLv2
|
# certwatch.c is GPLv2
|
||||||
# pemutil.c etc are (MPLv1.1+ or GPLv2+ or LPGLv2+)
|
# pemutil.c etc are (MPLv1.1+ or GPLv2+ or LPGLv2+)
|
||||||
@ -135,6 +135,9 @@ chmod -R u+w $RPM_BUILD_ROOT
|
|||||||
%{perl_vendorarch}/auto/Crypt
|
%{perl_vendorarch}/auto/Crypt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 11 2016 Joe Orton <jorton@redhat.com> - 2.4.1-61
|
||||||
|
- fix build failure with GCC 6 (#1306632)
|
||||||
|
|
||||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-60
|
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-60
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
49
keyutil.c
49
keyutil.c
@ -673,7 +673,6 @@ CertReq(SECKEYPrivateKey *privk, SECKEYPublicKey *pubk, KeyType keyType,
|
|||||||
/* Encode request in specified format */
|
/* Encode request in specified format */
|
||||||
if (ascii) {
|
if (ascii) {
|
||||||
char *obuf;
|
char *obuf;
|
||||||
char *name, *email, *org, *state, *country;
|
|
||||||
SECItem *it;
|
SECItem *it;
|
||||||
int total;
|
int total;
|
||||||
|
|
||||||
@ -682,43 +681,19 @@ CertReq(SECKEYPrivateKey *privk, SECKEYPublicKey *pubk, KeyType keyType,
|
|||||||
obuf = BTOA_ConvertItemToAscii(it);
|
obuf = BTOA_ConvertItemToAscii(it);
|
||||||
total = PL_strlen(obuf);
|
total = PL_strlen(obuf);
|
||||||
|
|
||||||
name = CERT_GetCommonName(subject);
|
PR_fprintf(outFile, "%s\n", NS_CERTREQ_HEADER);
|
||||||
if (!name) {
|
numBytes = PR_Write(outFile, obuf, total);
|
||||||
name = strdup("(not specified)");
|
if (numBytes != total) {
|
||||||
|
SECU_PrintSystemError(progName, "write error");
|
||||||
|
return SECFailure;
|
||||||
|
}
|
||||||
|
PR_fprintf(outFile, "\n%s\n", NS_CERTREQ_TRAILER);
|
||||||
|
} else {
|
||||||
|
numBytes = PR_Write(outFile, result.data, result.len);
|
||||||
|
if (numBytes != (int)result.len) {
|
||||||
|
SECU_PrintSystemError(progName, "write error");
|
||||||
|
return SECFailure;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!phone)
|
|
||||||
phone = strdup("(not specified)");
|
|
||||||
|
|
||||||
email = CERT_GetCertEmailAddress(subject);
|
|
||||||
if (!email)
|
|
||||||
email = strdup("(not specified)");
|
|
||||||
|
|
||||||
org = CERT_GetOrgName(subject);
|
|
||||||
if (!org)
|
|
||||||
org = strdup("(not specified)");
|
|
||||||
|
|
||||||
state = CERT_GetStateName(subject);
|
|
||||||
if (!state)
|
|
||||||
state = strdup("(not specified)");
|
|
||||||
|
|
||||||
country = CERT_GetCountryName(subject);
|
|
||||||
if (!country)
|
|
||||||
country = strdup("(not specified)");
|
|
||||||
|
|
||||||
PR_fprintf(outFile, "%s\n", NS_CERTREQ_HEADER);
|
|
||||||
numBytes = PR_Write(outFile, obuf, total);
|
|
||||||
if (numBytes != total) {
|
|
||||||
SECU_PrintSystemError(progName, "write error");
|
|
||||||
return SECFailure;
|
|
||||||
}
|
|
||||||
PR_fprintf(outFile, "\n%s\n", NS_CERTREQ_TRAILER);
|
|
||||||
} else {
|
|
||||||
numBytes = PR_Write(outFile, result.data, result.len);
|
|
||||||
if (numBytes != (int)result.len) {
|
|
||||||
SECU_PrintSystemError(progName, "write error");
|
|
||||||
return SECFailure;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return SECSuccess;
|
return SECSuccess;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user