Add missing 'RETURN VALUES' sections in doc#4976
Add missing 'RETURN VALUES' sections in doc#4976InfoHunter wants to merge 3 commits intoopenssl:masterfrom
Conversation
doc/man3/ASN1_STRING_length.pod
Outdated
doc/man3/ASN1_STRING_length.pod
Outdated
There was a problem hiding this comment.
This sounds like different negative values would indicate different error codes, but apparently it's just negative value to signal an error condition...
doc/man3/ASN1_STRING_length.pod
Outdated
There was a problem hiding this comment.
On side note one can wonder if it's appropriate to elaborate on length units. I mean that it's buffer length, not character count...
doc/man3/BIO_should_retry.pod
Outdated
There was a problem hiding this comment.
One can wonder if it would be appropriate to reword the description. I mean it doesn't actually return a mask, but rather a union [determined by masking specific flags]...
doc/man3/DES_random_key.pod
Outdated
There was a problem hiding this comment.
Hmm.... I'm struggling with "a null-terminated string" here. I mean "a" kind of implies "some", while it's quite specific. In DES_fcrypt case it's either buffer supplied by caller or NULL, and in DES_crypt - static buffer or NULL.
[On side note one can wonder if it would be appropriate to not modify buffer if error is returned. I mean DES_fcrypt modifies buffer in case error is returned, and maybe it shouldn't. Once again, this is side note.]
There was a problem hiding this comment.
Or could we say 'null terminated buffer' or something like that?
There was a problem hiding this comment.
Just in case of misunderstanding, I'm struggling specifically with "a", i.e. with it being indefinite article. And underlying question rather is if one should be more specific than referring to unnamed buffer, with or without article. After all, description says nothing about return value, only input arguments, so it might be appropriate to say explicitly how it is. So that reader doesn't have to consult source code...
There was a problem hiding this comment.
How about this:
DES_fcrypt() and DES_crypt() return NULL if an error occurred. On success, DES_fcrypt() returns a null-terminated string in user provided buffer and DES_crypt() returns a null-terminated string in a static buffer.
There was a problem hiding this comment.
Well, to me it appears more of a function description than description of return value. I mean part of placing null-terminated string to a buffer. Consider 'man strcpy' for example... So I'd say it should rather read "On success DES_fcrypt() returns pointer to the caller-provided buffer, and DES_crypt() - to a static buffer."
Or related side note one can wonder if DESCRIPTION part needs some adjustments. Most notably mention that returned string is null-terminated. [On related note one can also wonder if "this version takes only a small amount of space" "bragging" clause is actually relevant today.]
There was a problem hiding this comment.
This is fixed and the 'null-terminated' description is added to section DESCRIPTION.
doc/man3/OPENSSL_VERSION_NUMBER.pod
Outdated
There was a problem hiding this comment.
I'd rather say "requested [immutable?] version string". I mean it has lesser to do with format, but different information...
doc/man3/SSL_CIPHER_get_name.pod
Outdated
There was a problem hiding this comment.
Looks like it's "(NONE)", not "(NULL)".
doc/man3/SSL_CIPHER_get_name.pod
Outdated
There was a problem hiding this comment.
"NID values" stings my eye a little, but that might be just me. I mean ping native English speakers if it should be "NID value"...
There was a problem hiding this comment.
NID value - it is a singular return.
There was a problem hiding this comment.
I'd write explicitly "extra data pointer" or "application-supplied extra data"... No?
doc/man3/UI_new.pod
Outdated
There was a problem hiding this comment.
So far functions were listed without arguments, i.e. as UI_process()...
|
On common note |
|
Addressed almost all comments and left some comments for native English speakers either... |
doc/man3/BIO_should_retry.pod
Outdated
There was a problem hiding this comment.
In such case "flag combination presenting the cause"... Though "representing" might be better...
|
Fixed
… On 28 Dec 2017, at 16:06, Tim Hudson ***@***.***> wrote:
@t-j-h commented on this pull request.
In doc/man3/SSL_CIPHER_get_name.pod <#4976 (comment)>:
> @@ -150,6 +150,31 @@ Some examples for the output of SSL_CIPHER_description():
ECDHE-RSA-AES256-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
RSA-PSK-AES256-CBC-SHA384 TLSv1.0 Kx=RSAPSK Au=RSA Enc=AES(256) Mac=SHA384
+=head1 RETURN VALUES
+
+SSL_CIPHER_get_name(), SSL_CIPHER_standard_name(), OPENSSL_cipher_name(),
+SSL_CIPHER_get_version() and SSL_CIPHER_description() return the corresponding
+value in null-terminated string for a specific cipher or "(NULL)"
+if the cipher is not found.
+
+SSL_CIPHER_get_bits() returns a positive integer or 0 if an error occurred.
+
+SSL_CIPHER_get_cipher_nid(), SSL_CIPHER_get_digest_nid(),
+SSL_CIPHER_get_kx_nid() and SSL_CIPHER_get_auth_nid() return NID values or
+B<NID_undef> if an error occurred.
NID value - it is a singular return.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#4976 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAwyxouhroQcgi7aTWfDvAo5E3TRrzAnks5tE0wAgaJpZM4RMObi>.
|
mattcaswell
left a comment
There was a problem hiding this comment.
This is an awesome piece of work!
doc/man3/ASN1_STRING_length.pod
Outdated
There was a problem hiding this comment.
"returns the number of bytes"
doc/man3/ASN1_STRING_length.pod
Outdated
There was a problem hiding this comment.
Should we say something about who is responsible for freeing this data?
There was a problem hiding this comment.
This is described in the DESCRIPTION section, then still need to re-describe here?
There was a problem hiding this comment.
Ok - no need if we say it elsewhere.
doc/man3/ASN1_STRING_length.pod
Outdated
There was a problem hiding this comment.
"according to whether B<a> is greater than..."
doc/man3/ASN1_STRING_print_ex.pod
Outdated
doc/man3/BIO_f_ssl.pod
Outdated
There was a problem hiding this comment.
Should "BIO method" be written as "BIO_METHOD"?
doc/man3/X509_LOOKUP_hash_dir.pod
Outdated
There was a problem hiding this comment.
Preferred is to avoid contractions: it's => it is (and below)
doc/man3/X509_NAME_print_ex.pod
Outdated
doc/man3/d2i_DHparams.pod
Outdated
doc/man3/d2i_PKCS8PrivateKey_bio.pod
Outdated
|
First off, @InfoHunter, congratulations and thanks for doing this! |
Yes, glad to do so. |
|
All unnecessary 'void' return values are removed. But some ones are left there if all functions in a POD file are all 'void' functions - it's necessary to put words in the section otherwise the section will be empty which is not valid for doc-nits checking. |
doc/man3/DES_random_key.pod
Outdated
There was a problem hiding this comment.
It looks like I was concentrating on wrong "a", huh? I mean initially I was tipped off by "a string", but it's still "a pointer", but to "the buffer". Sorry about possible confusion...
There was a problem hiding this comment.
I don't quite get the point, could you explain a bit more? Seems it's fine saying 'a point to the buffer'....
There was a problem hiding this comment.
Point is that my English sucks. I mean originally I made fuzz about "a" being indefinite article as if it has no bearing here. But it apparently does, "a pointer to the buffer"... Oh well... It was inessential comment...
doc/man3/DES_random_key.pod
Outdated
There was a problem hiding this comment.
I find this a bit ambiguous. NULL customarily refers to NULL pointer, while we are obviously talking about character here. In other words "terminated by null character" would presumably be better. And I wouldn't be surprised if it should read "terminated by a null character"...
There was a problem hiding this comment.
ascii(7) clearly shows the value 0 as NUL '\0' (null character)
There was a problem hiding this comment.
Yeah, but NULL, i.e. with double L, still has quite too strong pointer "clang"... In other words "NUL character" would also do, "NULL" alone ... not so much....
There was a problem hiding this comment.
Yes, NULL means pointer and NUL means \0 byte. It would be nice to fix this, or a new PR.
doc/man3/BIO_s_mem.pod
Outdated
There was a problem hiding this comment.
I realize that "BIO method function" is taken from description that was there earlier, but I find the term confusing. I mean it doesn't actually return a function, but rather a dispatch table. Thoughts?
There was a problem hiding this comment.
How about just remove "function":
memroy BIO method, a structure of function pointers
There was a problem hiding this comment.
That structure contains other data than function pointers...
There was a problem hiding this comment.
It might be better by just saying 'return a valid memory B<BIO_METHOD> structure'...
doc/man3/BIO_s_mem.pod
Outdated
doc/man3/BIO_s_mem.pod
Outdated
doc/man3/UI_new.pod
Outdated
|
On more essential note could you clarify what needs to be squashed. It looks like everything except perhaps find-doc-nits? Maybe find-doc-nits should even be standalone? Or shall we just squash everything? |
|
Yes, I think all commits should be squashed into one commit except the 'find-doc-nits' commit - which is 2015e92 exactly... |
|
Grrr....I tried to merge this but there are conflicts with master and it now needs a rebase. |
c770f8a to
7c0e305
Compare
|
@mattcaswell rebase is done and I've squashed all necessary commits. |
|
Errr, I just noticed seems all changed files' copyright date should be updated to end with 2018, would you guys like to do this in this PR or in a separate one? |
|
Lets do it in this one - if you don't mind doing the updates? |
All missing sections are added.
To avoid check failure, make dummy RETURN VALUES sections in the docs which have no real functions decribed inside...
Because the related PR/commits are merged in 2018...
7c0e305 to
db88336
Compare
|
Don't mind and a new commit is added to update the dates - which seems no need to be squashed... |
|
As the new commit is trivial I am assuming @dot-asm's approval still applies and will merge shortly. |
All missing sections are added. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from #4976)
To avoid check failure, make dummy RETURN VALUES sections in the docs which have no real functions decribed inside... Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from #4976)
Because the related PR/commits are merged in 2018... Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from #4976)
|
Pushed. Thanks. |
|
@InfoHunter , this was a tour de force PR. Thank you! |
|
Thanks! |
All missing ones are added.
Checklist